From 31d7745db8dffbbdc2322b896b01759f4b1433ed Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Wed, 17 Jan 2018 10:42:36 -0800 Subject: [PATCH 01/10] EventHub - cli extension --- .github/CODEOWNERS | 2 + src/eventhubs/azext_eventhub/__init__.py | 33 + .../azext_eventhub/_client_factory.py | 26 + src/eventhubs/azext_eventhub/_help.py | 309 +++++ src/eventhubs/azext_eventhub/_params.py | 159 +++ src/eventhubs/azext_eventhub/_utils.py | 18 + src/eventhubs/azext_eventhub/commands.py | 92 ++ src/eventhubs/azext_eventhub/custom.py | 82 ++ .../azext_eventhub/eventhub/__init__.py | 17 + .../eventhub/event_hub_management_client.py | 105 ++ .../eventhub/models/__init__.py | 80 ++ .../eventhub/models/access_keys.py | 70 + .../eventhub/models/arm_disaster_recovery.py | 68 + .../models/arm_disaster_recovery_paged.py | 27 + .../eventhub/models/authorization_rule.py | 47 + .../models/authorization_rule_paged.py | 27 + .../eventhub/models/capture_description.py | 56 + .../check_name_availability_parameter.py | 31 + .../models/check_name_availability_result.py | 46 + .../eventhub/models/consumer_group.py | 59 + .../eventhub/models/consumer_group_paged.py | 27 + .../eventhub/models/destination.py | 43 + .../eventhub/models/eh_namespace.py | 90 ++ .../eventhub/models/eh_namespace_paged.py | 27 + .../eventhub/models/error_response.py | 45 + .../event_hub_management_client_enums.py | 80 ++ .../eventhub/models/eventhub.py | 80 ++ .../eventhub/models/eventhub_paged.py | 27 + .../eventhub/models/operation.py | 38 + .../eventhub/models/operation_display.py | 45 + .../eventhub/models/operation_paged.py | 27 + .../regenerate_access_key_parameters.py | 38 + .../eventhub/models/resource.py | 44 + .../azext_eventhub/eventhub/models/sku.py | 43 + .../eventhub/models/tracked_resource.py | 50 + .../eventhub/operations/__init__.py | 24 + .../operations/consumer_groups_operations.py | 317 +++++ .../disaster_recovery_configs_operations.py | 694 ++++++++++ .../operations/event_hubs_operations.py | 719 ++++++++++ .../operations/namespaces_operations.py | 937 +++++++++++++ .../eventhub/operations/operations.py | 96 ++ .../azext_eventhub/eventhub/version.py | 12 + .../azext_eventhub/tests/__init__.py | 4 + .../recordings/latest/test_eh_alias.yaml | 1222 +++++++++++++++++ .../latest/test_eh_consumergroup.yaml | 436 ++++++ .../recordings/latest/test_eh_eventhub.yaml | 494 +++++++ .../recordings/latest/test_eh_namespace.yaml | 545 ++++++++ .../tests/test_eventhub_commands.py | 316 +++++ src/eventhubs/setup.cfg | 2 + src/eventhubs/setup.py | 41 + 50 files changed, 7917 insertions(+) create mode 100644 src/eventhubs/azext_eventhub/__init__.py create mode 100644 src/eventhubs/azext_eventhub/_client_factory.py create mode 100644 src/eventhubs/azext_eventhub/_help.py create mode 100644 src/eventhubs/azext_eventhub/_params.py create mode 100644 src/eventhubs/azext_eventhub/_utils.py create mode 100644 src/eventhubs/azext_eventhub/commands.py create mode 100644 src/eventhubs/azext_eventhub/custom.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/__init__.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/event_hub_management_client.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/__init__.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/access_keys.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/arm_disaster_recovery.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/arm_disaster_recovery_paged.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/authorization_rule.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/authorization_rule_paged.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/capture_description.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/check_name_availability_parameter.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/check_name_availability_result.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/consumer_group.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/consumer_group_paged.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/destination.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/eh_namespace.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/eh_namespace_paged.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/error_response.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/event_hub_management_client_enums.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/eventhub.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/eventhub_paged.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/operation.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/operation_display.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/operation_paged.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/regenerate_access_key_parameters.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/resource.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/sku.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/models/tracked_resource.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/operations/__init__.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/operations/consumer_groups_operations.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/operations/disaster_recovery_configs_operations.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/operations/event_hubs_operations.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/operations/namespaces_operations.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/operations/operations.py create mode 100644 src/eventhubs/azext_eventhub/eventhub/version.py create mode 100644 src/eventhubs/azext_eventhub/tests/__init__.py create mode 100644 src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml create mode 100644 src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml create mode 100644 src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml create mode 100644 src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml create mode 100644 src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py create mode 100644 src/eventhubs/setup.cfg create mode 100644 src/eventhubs/setup.py diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b349363eb8a..0c7925c2e36 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,3 +3,5 @@ /src/index.json @derekbekoe /src/image-copy/ @tamirkamara + +/src/eventhubs/ @tamirkamara diff --git a/src/eventhubs/azext_eventhub/__init__.py b/src/eventhubs/azext_eventhub/__init__.py new file mode 100644 index 00000000000..d5071abf38b --- /dev/null +++ b/src/eventhubs/azext_eventhub/__init__.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader + +# pylint: disable=unused-import +# pylint: disable=line-too-long + +from ._help import helps + +class EventhubCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + eventhub_custom = CliCommandType(operations_tmpl='azext_eventhub.custom#{}') + super(EventhubCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=eventhub_custom, min_profile="2017-03-10-profile") + + def load_command_table(self, args): + from azext_eventhub.commands import load_command_table + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_eventhub._params import load_arguments_namespace, load_arguments_eventhub, load_arguments_consumergroup, load_arguments_geodr + load_arguments_namespace(self, command) + load_arguments_eventhub(self, command) + load_arguments_consumergroup(self, command) + load_arguments_geodr(self, command) + + +COMMAND_LOADER_CLS = EventhubCommandsLoader diff --git a/src/eventhubs/azext_eventhub/_client_factory.py b/src/eventhubs/azext_eventhub/_client_factory.py new file mode 100644 index 00000000000..02c5c6c97e8 --- /dev/null +++ b/src/eventhubs/azext_eventhub/_client_factory.py @@ -0,0 +1,26 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def cf_eventhub(cli_ctx, **_): + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from azext_eventhub.eventhub import EventHubManagementClient + return get_mgmt_service_client(cli_ctx, EventHubManagementClient) + + +def namespaces_mgmt_client_factory(cli_ctx, _): + return cf_eventhub(cli_ctx).namespaces + + +def event_hub_mgmt_client_factory(cli_ctx, _): + return cf_eventhub(cli_ctx).event_hubs + + +def consumer_groups_mgmt_client_factory(cli_ctx, _): + return cf_eventhub(cli_ctx).consumer_groups + + +def disaster_recovery_mgmt_client_factory(cli_ctx, _): + return cf_eventhub(cli_ctx).disaster_recovery_configs diff --git a/src/eventhubs/azext_eventhub/_help.py b/src/eventhubs/azext_eventhub/_help.py new file mode 100644 index 00000000000..efabac8ae16 --- /dev/null +++ b/src/eventhubs/azext_eventhub/_help.py @@ -0,0 +1,309 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.help_files import helps + +helps['eventhubs'] = """ + type: group + short-summary: Manage Azure Event Hubs namespace, eventhub, consumergroup and Geo Recovery configuration - Alias +""" + +helps['eventhubs namespace'] = """ + type: group + short-summary: Manage Azure Event Hubs namespace and authorizationrule +""" + +helps['eventhubs eventhub'] = """ + type: group + short-summary: Manage Azure Event Hubs eventhub and authorization-rule +""" + +helps['eventhubs consumergroup'] = """ + type: group + short-summary: Manage Azure Event Hubs consumergroup +""" + +helps['eventhubs georecovery-alias'] = """ + type: group + short-summary: Manage Azure Event Hubs Geo Recovery configuration - Alias +""" + +helps['eventhubs namespace exists'] = """ + type: command + short-summary: check for the availability of the given name for the Namespace + examples: + - name: Create a new topic. + text: az eventhubs namespace exists --name mynamespace +""" + +helps['eventhubs namespace create'] = """ + type: command + short-summary: Creates the Event Hubs Namespace + examples: + - name: Create a new namespace. + text: az eventhubs namespace create --resource-group myresourcegroup --name mynamespace --location westus + --tags tag1=value1 tag2=value2 --sku-name Standard --sku-tier Standard' --is-auto-inflate-enabled False --maximum-throughput-units 30 +""" + +helps['eventhubs namespace show'] = """ + type: command + short-summary: shows the Event Hubs Namespace Details + examples: + - name: shows the Namespace details. + text: az eventhubs namespace show --resource-group myresourcegroup --name mynamespace +""" + +helps['eventhubs namespace list'] = """ + type: command + short-summary: Lists the Event Hubs Namespaces + examples: + - name: List the Event Hubs Namespaces by resource group. + text: az eventhubs namespace list --resource-group myresourcegroup + - name: Get the Namespaces by Subscription. + text: az eventhubs namespace list +""" + +helps['eventhubs namespace delete'] = """ + type: command + short-summary: Deletes the Namespaces + examples: + - name: Deletes the Namespace + text: az eventhubs namespace delete --resource-group myresourcegroup --name mynamespace +""" + +helps['eventhubs namespace authorizationrule create'] = """ + type: command + short-summary: Creates AuthorizationRule for the given Namespace + examples: + - name: Creates Authorization rules + text: az eventhubs namespace authorizationrule create --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --access-rights Send Listen +""" + +helps['eventhubs namespace authorizationrule show'] = """ + type: command + short-summary: Shows the details of AuthorizationRule + examples: + - name: Shows the details of AuthorizationRule + text: az eventhubs namespace authorizationrule show --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +""" + +helps['eventhubs namespace authorizationrule list'] = """ + type: command + short-summary: Shows the list of AuthorizationRule by Namespace + examples: + - name: Shows the list of AuthorizationRule by Namespace + text: az eventhubs namespace authorizationrule show --resource-group myresourcegroup --namespace-name mynamespace +""" + +helps['eventhubs namespace authorizationrule keys list'] = """ + type: command + short-summary: Shows the connection strings for namespace + examples: + - name: Shows the connectionstrings of AuthorizationRule for the namespace. + text: az eventhubs namespace authorizationrule list-keys --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +""" + +helps['eventhubs namespace authorizationrule keys renew'] = """ + type: command + short-summary: Regenerate the connectionstrings of AuthorizationRule for the namespace. + examples: + - name: Regenerate the connectionstrings of AuthorizationRule for the namespace. + text: az eventhubs namespace authorizationrule regenerate-keys --resource-group myresourcegroup + --namespace-name mynamespace --name myauthorule --key PrimaryKey +""" + +helps['eventhubs namespace authorizationrule delete'] = """ + type: command + short-summary: Deletes the AuthorizationRule of the namespace. + examples: + - name: Deletes the AuthorizationRule of the namespace. + text: az eventhubs namespace authorizationrule delete --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +""" + +helps['eventhubs eventhub create'] = """ + type: command + short-summary: Creates the Event Hubs Eventhub + examples: + - name: Create a new Eventhub. + text: az eventhubs eventhub create --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub --message-retention-in-days 4 ---partition-count 15 +""" + +helps['eventhubs eventhub show'] = """ + type: command + short-summary: shows the Eventhub Details + examples: + - name: Shows the Eventhub details. + text: az eventhubs eventhub show --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub +""" + +helps['eventhubs eventhub list'] = """ + type: command + short-summary: List the EventHub by Namepsace + examples: + - name: Get the Eventhubs by Namespace. + text: az eventhubs eventhub list --resource-group myresourcegroup --namespace-name mynamespace +""" + +helps['eventhubs eventhub delete'] = """ + type: command + short-summary: Deletes the Eventhub + examples: + - name: Deletes the Eventhub + text: az eventhubs eventhub delete --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub +""" + +helps['eventhubs eventhub authorizationrule create'] = """ + type: command + short-summary: Creates Authorization rule for the given Eventhub + examples: + - name: Creates Authorization rules + text: az eventhubs eventhub authorizationrule create --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub --name myauthorule --access-rights Listen +""" + +helps['eventhubs eventhub authorizationrule show'] = """ + type: command + short-summary: shows the details of AuthorizationRule + examples: + - name: shows the details of AuthorizationRule + text: az eventhubs eventhub authorizationrule show --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub --name myauthorule +""" + +helps['eventhubs eventhub authorizationrule list'] = """ + type: command + short-summary: shows the list of AuthorizationRule by Eventhub + examples: + - name: shows the list of AuthorizationRule by Eventhub + text: az eventhubs eventhub authorizationrule show --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub +""" + +helps['eventhubs eventhub authorizationrule keys list'] = """ + type: command + short-summary: Shows the connectionstrings of AuthorizationRule for the Eventhub. + examples: + - name: Shows the connectionstrings of AuthorizationRule for the eventhub. + text: az eventhubs eventhub authorizationrule list-keys --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub --name myauthorule +""" + +helps['eventhubs eventhub authorizationrule keys renew'] = """ + type: command + short-summary: Regenerate the connectionstrings of AuthorizationRule for the namespace. + examples: + - name: Regenerate the connectionstrings of AuthorizationRule for the namespace. + text: az eventhubs eventhub authorizationrule regenerate-keys --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub --name myauthorule --key PrimaryKey +""" + +helps['eventhubs eventhub authorizationrule delete'] = """ + type: command + short-summary: Deletes the AuthorizationRule of the Eventhub. + examples: + - name: Deletes the AuthorizationRule of the Eventhub. + text: az eventhubs eventhub authorizationrule delete --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub --name myauthorule +""" + +helps['eventhubs consumergroup create'] = """ + type: command + short-summary: Creates the EventHub ConsumerGroup + examples: + - name: Create a new ConsumerGroup. + text: az eventhubs consumergroup create --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub --name myconsumergroup +""" + +helps['eventhubs consumergroup show'] = """ + type: command + short-summary: Shows the ConsumerGroup Details + examples: + - name: Shows the ConsumerGroup details. + text: az eventhubs consumergroup show --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub --name myconsumergroup +""" + +helps['eventhubs consumergroup list'] = """ + type: command + short-summary: List the ComsumerGroup by Eventhub + examples: + - name: Shows the ComsumerGroup by Eventhub. + text: az eventhubs consumergroup get --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub +""" + +helps['eventhubs consumergroup delete'] = """ + type: command + short-summary: Deletes the ConsumerGroup + examples: + - name: Deletes the ConsumerGroup + text: az eventhubs consumergroup delete --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub --name myconsumergroup +""" + +helps['eventhubs georecovery-alias exists'] = """ + type: command + short-summary: Check the availability of the Geo Recovery - Alias Name + examples: + - name: Check the availability of the Geo Recovery configuration - Alias Name + text: az eventhubs georecovery-alias check-name-availability --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname +""" + +helps['eventhubs georecovery-alias create'] = """ + type: command + short-summary: Creates a Geo Recovery - Alias for the give Namespace + examples: + - name: Creats Geo Recovery configuration - Alias for the give Namespace + text: az eventhubs georecovery-alias create --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname --partner-namespace recourcearmid +""" + +helps['eventhubs georecovery-alias show'] = """ + type: command + short-summary: shows details of Geo Recovery configuration - Alias for Primay/Secondary Namespace + examples: + - name: show details of Geo Recovery configuration - Alias of the Primary Namespace + text: az eventhubs alias show --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname + - name: Get details of Geo Recovery configuration - Alias of the Secondary Namespace + text: az eventhubs georecovery-alias show --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname +""" + +helps['eventhubs georecovery-alias authorizationrule show'] = """ + type: command + short-summary: Shows the details of Event Hubs Geo Recovery Alias and Namespace AuthorizationRule + examples: + - name: Shows the details AuthorizationRule by Event Hubs Namespace + text: az eventhubs georecovery-alias authorizationrule show --resource-group myresourcegroup --namespace-name mynamespace +""" + +helps['servicebus georecovery-alias authorizationrule list'] = """ + type: command + short-summary: Shows the list of AuthorizationRule by Event Hubs Namespace + examples: + - name: Shows the list of AuthorizationRule by Event Hubs Namespace + text: az eventhubs georecovery-alias authorizationrule show --resource-group myresourcegroup --namespace-name mynamespace +""" + +helps['eventhubs georecovery-alias authorizationrule keys list'] = """ + type: command + short-summary: Shows the connection strings of AuthorizationRule for the Event Hubs Namespace + examples: + - name: Shows the connection strings of AuthorizationRule for the namespace. + text: az eventhubs georecovery-alias authorizationrule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +""" + +helps['eventhubs georecovery-alias break-pair'] = """ + type: command + short-summary: Disables the Geo Recovery and stops replicating changes from primary to secondary namespaces + examples: + - name: Disables the Geo Recovery and stops replicating changes from primary to secondary namespaces + text: az eventhubs georecovery-alias break-pair --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname +""" + +helps['eventhubs georecovery-alias fail-over'] = """ + type: command + short-summary: Envokes Geo Recovery configuration - Alias to point to the secondary namespace + examples: + - name: Envokes GEO DR failover and reconfigure the alias to point to the secondary namespace + text: az eventhubs georecovery-alias fail-over --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname +""" + +helps['eventhubs georecovery-alias delete'] = """ + type: command + short-summary: Delete Geo Recovery - Alias + examples: + - name: Delete Geo Recovery configuration - Alias + text: az eventhubs georecovery-alias delete --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname +""" diff --git a/src/eventhubs/azext_eventhub/_params.py b/src/eventhubs/azext_eventhub/_params.py new file mode 100644 index 00000000000..9413d603e79 --- /dev/null +++ b/src/eventhubs/azext_eventhub/_params.py @@ -0,0 +1,159 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.commands.parameters import (tags_type, get_enum_type, resource_group_name_type) + + +# pylint: disable=line-too-long +def load_arguments_namespace(self, _): + with self.argument_context('eventhubs namespace exists') as c: + c.argument('namespace_name', options_list=['--name'], help='name of the Namespace') + + with self.argument_context('eventhubs namespace create') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--name'], help='Name of the Namespace') + c.argument('tags', options_list=['--tags', '-t'], arg_type=tags_type, help='tags for the namespace in Key value pair format') + c.argument('sku', options_list=['--sku-name'], arg_type=get_enum_type(['Basic', 'Standard'])) + c.argument('location', options_list=['--location', '-l'], help='Location') + c.argument('skutier', options_list=['--sku-tier'], arg_type=get_enum_type(['Basic', 'Standard'])) + c.argument('capacity', options_list=['--capacity'], type=int, help='Capacity for Sku') + c.argument('is_auto_inflate_enabled', options_list=['--is-auto-inflate-enabled'], type=bool, help='Value that indicates whether AutoInflate is enabled for eventhub namespace.') + c.argument('maximum_throughput_units', options_list=['--maximum-throughput-units'], type=int, help='Upper limit of throughput units when AutoInflate is enabled, vaule should be within 0 to 20 throughput units. ( 0 if AutoInflateEnabled = true)') + + # region Namespace Get + for scope in ['eventhubs namespace show', 'eventhubs namespace delete']: + with self.argument_context(scope) as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--name', '-n'], help='name of the Namespace') + + with self.argument_context('eventhubs namespace list') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + + # region Namespace Authorizationrule + for scope in ['eventhubs namespace authorizationrule', 'eventhubs namespace authorizationrule keys list', 'eventhubs namespace authorizationrule keys renew']: + with self.argument_context(scope) as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('authorization_rule_name', options_list=['--name'], help='name of the Namespace AuthorizationRule') + + with self.argument_context('eventhubs namespace authorizationrule create') as c: + c.argument('accessrights', options_list=['--access-rights'], + help='Authorization rule rights of type list, allowed values are Send, Listen or Manage') + + with self.argument_context('eventhubs namespace authorizationrule keys renew') as c: + c.argument('key_type', options_list=['--key-name'], arg_type=get_enum_type(['PrimaryKey', 'SecondaryKey'])) + + +# region - Eventhub Create +def load_arguments_eventhub(self, _): + with self.argument_context('eventhubs eventhub create') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('event_hub_name', options_list=['--name', '-n'], help='Name of Evnethub') + c.argument('message_retention_in_days', options_list=['--message-retention-in-days'], type=int, help='Number of days to retain the events for this Event Hub, value should be 1 to 7 days') + c.argument('partition_count', options_list=['--partition-count'], type=int, help='Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.') + c.argument('status', options_list=['--status'], arg_type=get_enum_type(['Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'])) + c.argument('enabled', options_list=['--enabled'], help='A value that indicates whether capture description is enabled.') + c.argument('encoding', options_list=['--encoding'], arg_type=get_enum_type(['Avro']), help='Enumerates the possible values for the encoding format of capture description.') + c.argument('capture_interval_seconds', type=int, options_list=['--capture-interval-seconds'], help='The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds') + c.argument('capture_size_bytes', type=int, options_list=['--capture-size-bytes'], help='The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes') + c.argument('destination_name', options_list=['--destination-name'], help='Name for capture destination') + c.argument('storage_account_resource_id', options_list=['--storage-account-resource-id'], help='Resource id of the storage account to be used to create the blobs') + c.argument('blob_container', options_list=['--blob-container'], help='Blob container Name') + c.argument('archive_name_format', options_list=['--archive-name-format'], help='Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order') + + # region EventHub Get + for scope in ['eventhubs eventhub show', 'eventhubs eventhub delete']: + with self.argument_context(scope) as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('event_hub_name', options_list=['--name', '-n'], help='EventHub Name') + + # region EventHub Get + with self.argument_context('eventhubs eventhub list') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + + # region EventHub Authorizationrule + for scope in ['eventhubs eventhub authorizationrule', 'eventhubs eventhub authorizationrule keys list', 'eventhubs eventhub authorizationrule keys renew']: + with self.argument_context(scope) as c: + c.argument('authorization_rule_name', options_list=['--name'], help='name of the EventHub AuthorizationRule') + c.argument('namespace', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the EventHub') + + with self.argument_context('eventhubs eventhub authorizationrule create') as c: + c.argument('accessrights', options_list=['--access-rights'], help='AuthorizationRule rights of type list, allowed values are Send, Listen or Manage') + + with self.argument_context('eventhubs eventhub authorizationrule keys renew') as c: + c.argument('key_type', options_list=['--key-name'], arg_type=get_enum_type(['PrimaryKey', 'SecondaryKey'])) + + +# - ConsumerGroup Region +def load_arguments_consumergroup(self, _): + with self.argument_context('eventhubs consumergroup create') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the Eventhub') + c.argument('consumer_group_name', options_list=['--name', '-n'], help='Name of ConsumerGroup') + c.argument('user_metadata', options_list=['--user-metadata'], help='Usermetadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.') + + # region ConsumerGroup Get + for scope in ['eventhubs consumergroup show', 'eventhubs consumergroup delete']: + with self.argument_context(scope) as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the EventHub') + c.argument('consumer_group_name', options_list=['--name', '-n'], help='Name of ConsumerGroup') + + with self.argument_context('eventhubs consumergroup list') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the EventHub') + + +# : Region +def load_arguments_geodr(self, _): + with self.argument_context('eventhubs georecovery-alias exists') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('name', options_list=['--name'], + help='Name of the Geo Recovery Configs - Alias to check availability') + + with self.argument_context('eventhubs georecovery-alias create') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('alias', options_list=['--alias'], help='Name of the Alias (Disaster Recovery)') + c.argument('partner_namespace', options_list=['--partner-namespace'], + help='ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing') + c.argument('alternate_name', options_list=['--alternate-name'], + help='Alternate Name for the Alias, when the Namespace name and Alias name are same') + + for scope in ['eventhubs georecovery-alias show', 'eventhubs georecovery-alias delete']: + with self.argument_context(scope) as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('alias', options_list=['--alias'], help='Name of the Alias (Disaster Recovery)') + + with self.argument_context('eventhubs georecovery-alias list') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + + for scope in ['eventhubs georecovery-alias break-pair', 'eventhubs georecovery-alias fail-over', 'eventhubs georecovery-alias authorizationrule list']: + with self.argument_context(scope)as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], + help='name of the Namespace') + c.argument('alias', options_list=['--alias'], + help='Name of the Alias (Disaster Recovery)') + + for scope in ['eventhubs georecovery-alias authorizationrule show', 'eventhubs georecovery-alias authorizationrule keys lists']: + with self.argument_context(scope)as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], + help='name of the Namespace') + c.argument('alias', options_list=['--alias'], + help='Name of the Alias (Disaster Recovery)') + c.argument('authorization_rule_name', options_list=['--name'], + help='name of the Namespace AuthorizationRule') diff --git a/src/eventhubs/azext_eventhub/_utils.py b/src/eventhubs/azext_eventhub/_utils.py new file mode 100644 index 00000000000..9f85ade7392 --- /dev/null +++ b/src/eventhubs/azext_eventhub/_utils.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azext_eventhub.eventhub.models.event_hub_management_client_enums import AccessRights + + +def accessrights_converter(accessrights): + accessrights_new = [] + if accessrights == 'Send': + accessrights_new.append(AccessRights.send) + if accessrights == 'Manage': + accessrights_new.append(AccessRights.manage) + if accessrights == 'Listen': + accessrights_new.append(AccessRights.listen) + + return accessrights_new diff --git a/src/eventhubs/azext_eventhub/commands.py b/src/eventhubs/azext_eventhub/commands.py new file mode 100644 index 00000000000..0ef6d857d16 --- /dev/null +++ b/src/eventhubs/azext_eventhub/commands.py @@ -0,0 +1,92 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-statements + +from azure.cli.core.commands import CliCommandType +from azext_eventhub._client_factory import (namespaces_mgmt_client_factory, event_hub_mgmt_client_factory, + consumer_groups_mgmt_client_factory, + disaster_recovery_mgmt_client_factory) + + +def load_command_table(self, _): + + eh_namespace_util = CliCommandType( + operations_tmpl='azext_eventhub.eventhub.operations.namespaces_operations#NamespacesOperations.{}', + client_factory=namespaces_mgmt_client_factory, + client_arg_name='self' + ) + + eh_event_hub_util = CliCommandType( + operations_tmpl='azext_eventhub.eventhub.operations.event_hubs_operations#EventHubsOperations.{}', + client_factory=event_hub_mgmt_client_factory, + client_arg_name='self' + ) + + eh_consumer_groups_util = CliCommandType( + operations_tmpl='azext_eventhub.eventhub.operations.consumer_groups_operations#ConsumerGroupsOperations.{}', + client_factory=consumer_groups_mgmt_client_factory, + client_arg_name='self' + ) + + eh_geodr_util = CliCommandType( + operations_tmpl='azext_eventhub.eventhub.operations.disaster_recovery_configs_operations#DisasterRecoveryConfigsOperations.{}', + client_factory=disaster_recovery_mgmt_client_factory, + client_arg_name='self' + ) + +# Namespace Region + with self.command_group('eventhubs namespace', eh_namespace_util, client_factory=namespaces_mgmt_client_factory) as g: + g.custom_command('create', 'cli_namespace_create') + g.command('show', 'get') + g.custom_command('list', 'cli_namespace_list') + g.command('delete', 'delete') + g.command('exists', 'check_name_availability') + + with self.command_group('eventhubs namespace authorizationrule', eh_namespace_util, client_factory=namespaces_mgmt_client_factory) as g: + g.custom_command('create', 'cli_namespaceautho_create') + g.command('show', 'get_authorization_rule') + g.command('list', 'list_authorization_rules') + g.command('keys list', 'list_keys') + g.command('keys renew', 'regenerate_keys') + g.command('delete', 'delete_authorization_rule') + +# EventHub Region + with self.command_group('eventhubs eventhub', eh_event_hub_util, client_factory=event_hub_mgmt_client_factory) as g: + g.custom_command('create', 'cli_eheventhub_create') + g.command('show', 'get') + g.command('list', 'list_by_namespace') + g.command('delete', 'delete') + + with self.command_group('eventhubs eventhub authorizationrule', eh_event_hub_util, client_factory=event_hub_mgmt_client_factory) as g: + g.custom_command('create', 'cli_eheventhubautho_create') + g.command('show', 'get_authorization_rule') + g.command('list', 'list_authorization_rules') + g.command('keys list', 'list_keys') + g.command('keys renew', 'regenerate_keys') + g.command('delete', 'delete_authorization_rule') + +# ConsumerGroup Region + with self.command_group('eventhubs consumergroup', eh_consumer_groups_util, client_factory=consumer_groups_mgmt_client_factory) as g: + g.command('create', 'create_or_update') + g.command('show', 'get') + g.command('list', 'list_by_event_hub') + g.command('delete', 'delete') + +# DisasterRecoveryConfigs Region + with self.command_group('eventhubs georecovery-alias', eh_geodr_util, client_factory=disaster_recovery_mgmt_client_factory) as g: + g.command('create', 'create_or_update') + g.command('show', 'get') + g.command('list', 'list') + g.command('break-pair', 'break_pairing') + g.command('fail-over', 'fail_over') + g.command('exists', 'check_name_availability') + g.command('delete', 'delete') + + with self.command_group('eventhubs georecovery-alias authorizationrule', eh_geodr_util, client_factory=disaster_recovery_mgmt_client_factory) as g: + g.command('list', 'list_authorization_rules') + g.command('show', 'get_authorization_rule') + g.command('keys list', 'list_keys') diff --git a/src/eventhubs/azext_eventhub/custom.py b/src/eventhubs/azext_eventhub/custom.py new file mode 100644 index 00000000000..aff6c416c4a --- /dev/null +++ b/src/eventhubs/azext_eventhub/custom.py @@ -0,0 +1,82 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.util import CLIError + +from azext_eventhub._utils import accessrights_converter + +from azext_eventhub.eventhub.models import (EHNamespace, Sku, Eventhub, CaptureDescription, Destination) + + + +# Namespace Region +def cli_namespace_create(client, resource_group_name, namespace_name, location, tags=None, sku='Standard', skutier=None, capacity=None, is_auto_inflate_enabled=None, maximum_throughput_units=None): + return client.create_or_update(resource_group_name, namespace_name, EHNamespace(location, tags, + Sku(sku, + skutier, + capacity), is_auto_inflate_enabled, maximum_throughput_units)) + + +def cli_namespace_list(client, resource_group_name=None, namespace_name=None): + cmd_result = None + if resource_group_name and namespace_name: + cmd_result = client.get(resource_group_name, namespace_name) + + if resource_group_name and not namespace_name: + cmd_result = client.list_by_resource_group(resource_group_name, namespace_name) + + if not resource_group_name and not namespace_name: + cmd_result = client.list(resource_group_name, namespace_name) + + if not cmd_result: + raise CLIError('--resource-group name required when namespace name is provided') + + return cmd_result + + +# Namespace Authorization rule: +def cli_namespaceautho_create(client, resource_group_name, namespace_name, name, accessrights=None): + return client.create_or_update_authorization_rule(resource_group_name, namespace_name, name, + accessrights_converter(accessrights)) + + +# Eventhub Region +def cli_eheventhub_create(client, resource_group_name, namespace_name, name, message_retention_in_days=None, partition_count=None, status=None, + enabled=None, encoding=None, capture_interval_seconds=None, capture_size_limit_bytes=None, destination_name=None, storage_account_resource_id=None, blob_container=None, archive_name_format=None): + eventhubparameter1 = Eventhub() + if message_retention_in_days: + eventhubparameter1.message_retention_in_days = message_retention_in_days + + if partition_count: + eventhubparameter1.partition_count = partition_count + + if status: + eventhubparameter1.status = status + + if enabled and enabled is True: + eventhubparameter1.capture_description = CaptureDescription( + enabled=enabled, + encoding=encoding, + interval_in_seconds=capture_interval_seconds, + size_limit_in_bytes=capture_size_limit_bytes, + destination=Destination( + name=destination_name, + storage_account_resource_id=storage_account_resource_id, + blob_container=blob_container, + archive_name_format=archive_name_format) + ) + return client.create_or_update(resource_group_name, namespace_name, name, eventhubparameter1) + + +def cli_eheventhubautho_create(client, resource_group_name, namespace_name, event_hub_name, name, accessrights=None): + return client.create_or_update_authorization_rule(resource_group_name, namespace_name, event_hub_name, name, + accessrights_converter(accessrights)) + + +def cli_ehconsumergroup_create(client, resource_group_name, namespace_name, event_hub_name, name, user_metadata): + return client.create_or_update(resource_group_name, namespace_name, event_hub_name, name, user_metadata) diff --git a/src/eventhubs/azext_eventhub/eventhub/__init__.py b/src/eventhubs/azext_eventhub/eventhub/__init__.py new file mode 100644 index 00000000000..ba4a2e57961 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/__init__.py @@ -0,0 +1,17 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .event_hub_management_client import EventHubManagementClient +from .version import VERSION + +__all__ = ['EventHubManagementClient'] + +__version__ = VERSION diff --git a/src/eventhubs/azext_eventhub/eventhub/event_hub_management_client.py b/src/eventhubs/azext_eventhub/eventhub/event_hub_management_client.py new file mode 100644 index 00000000000..71a30fe7027 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/event_hub_management_client.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.operations import Operations +from .operations.namespaces_operations import NamespacesOperations +from .operations.disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations +from .operations.event_hubs_operations import EventHubsOperations +from .operations.consumer_groups_operations import ConsumerGroupsOperations +from . import models + + +class EventHubManagementClientConfiguration(AzureConfiguration): + """Configuration for EventHubManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials that uniquely identify a + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(EventHubManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-eventhub/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class EventHubManagementClient(object): + """Azure Event Hubs client + + :ivar config: Configuration for client. + :vartype config: EventHubManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.eventhub.operations.Operations + :ivar namespaces: Namespaces operations + :vartype namespaces: azure.mgmt.eventhub.operations.NamespacesOperations + :ivar disaster_recovery_configs: DisasterRecoveryConfigs operations + :vartype disaster_recovery_configs: azure.mgmt.eventhub.operations.DisasterRecoveryConfigsOperations + :ivar event_hubs: EventHubs operations + :vartype event_hubs: azure.mgmt.eventhub.operations.EventHubsOperations + :ivar consumer_groups: ConsumerGroups operations + :vartype consumer_groups: azure.mgmt.eventhub.operations.ConsumerGroupsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials that uniquely identify a + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = EventHubManagementClientConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2017-04-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.namespaces = NamespacesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.disaster_recovery_configs = DisasterRecoveryConfigsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.event_hubs = EventHubsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.consumer_groups = ConsumerGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/eventhubs/azext_eventhub/eventhub/models/__init__.py b/src/eventhubs/azext_eventhub/eventhub/models/__init__.py new file mode 100644 index 00000000000..4b11427822c --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/__init__.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource +from .resource import Resource +from .sku import Sku +from .eh_namespace import EHNamespace +from .authorization_rule import AuthorizationRule +from .access_keys import AccessKeys +from .regenerate_access_key_parameters import RegenerateAccessKeyParameters +from .destination import Destination +from .capture_description import CaptureDescription +from .eventhub import Eventhub +from .consumer_group import ConsumerGroup +from .check_name_availability_parameter import CheckNameAvailabilityParameter +from .check_name_availability_result import CheckNameAvailabilityResult +from .operation_display import OperationDisplay +from .operation import Operation +from .error_response import ErrorResponse, ErrorResponseException +from .arm_disaster_recovery import ArmDisasterRecovery +from .operation_paged import OperationPaged +from .eh_namespace_paged import EHNamespacePaged +from .authorization_rule_paged import AuthorizationRulePaged +from .arm_disaster_recovery_paged import ArmDisasterRecoveryPaged +from .eventhub_paged import EventhubPaged +from .consumer_group_paged import ConsumerGroupPaged +from .event_hub_management_client_enums import ( + SkuName, + SkuTier, + AccessRights, + KeyType, + EntityStatus, + EncodingCaptureDescription, + UnavailableReason, + ProvisioningStateDR, + RoleDisasterRecovery, +) + +__all__ = [ + 'TrackedResource', + 'Resource', + 'Sku', + 'EHNamespace', + 'AuthorizationRule', + 'AccessKeys', + 'RegenerateAccessKeyParameters', + 'Destination', + 'CaptureDescription', + 'Eventhub', + 'ConsumerGroup', + 'CheckNameAvailabilityParameter', + 'CheckNameAvailabilityResult', + 'OperationDisplay', + 'Operation', + 'ErrorResponse', 'ErrorResponseException', + 'ArmDisasterRecovery', + 'OperationPaged', + 'EHNamespacePaged', + 'AuthorizationRulePaged', + 'ArmDisasterRecoveryPaged', + 'EventhubPaged', + 'ConsumerGroupPaged', + 'SkuName', + 'SkuTier', + 'AccessRights', + 'KeyType', + 'EntityStatus', + 'EncodingCaptureDescription', + 'UnavailableReason', + 'ProvisioningStateDR', + 'RoleDisasterRecovery', +] diff --git a/src/eventhubs/azext_eventhub/eventhub/models/access_keys.py b/src/eventhubs/azext_eventhub/eventhub/models/access_keys.py new file mode 100644 index 00000000000..3cd0e415dde --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/access_keys.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessKeys(Model): + """Namespace/EventHub Connection String. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_connection_string: Primary connection string of the created + namespace AuthorizationRule. + :vartype primary_connection_string: str + :ivar secondary_connection_string: Secondary connection string of the + created namespace AuthorizationRule. + :vartype secondary_connection_string: str + :ivar alias_primary_connection_string: Primary connection string of the + alias if GEO DR is enabled + :vartype alias_primary_connection_string: str + :ivar alias_secondary_connection_string: Secondary connection string of + the alias if GEO DR is enabled + :vartype alias_secondary_connection_string: str + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the AuthorizationRule. + :vartype key_name: str + """ + + _validation = { + 'primary_connection_string': {'readonly': True}, + 'secondary_connection_string': {'readonly': True}, + 'alias_primary_connection_string': {'readonly': True}, + 'alias_secondary_connection_string': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + } + + _attribute_map = { + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'alias_primary_connection_string': {'key': 'aliasPrimaryConnectionString', 'type': 'str'}, + 'alias_secondary_connection_string': {'key': 'aliasSecondaryConnectionString', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self): + self.primary_connection_string = None + self.secondary_connection_string = None + self.alias_primary_connection_string = None + self.alias_secondary_connection_string = None + self.primary_key = None + self.secondary_key = None + self.key_name = None diff --git a/src/eventhubs/azext_eventhub/eventhub/models/arm_disaster_recovery.py b/src/eventhubs/azext_eventhub/eventhub/models/arm_disaster_recovery.py new file mode 100644 index 00000000000..116320fdf73 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/arm_disaster_recovery.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ArmDisasterRecovery(Resource): + """Single item in List or Get Alias(Disaster Recovery configuration) + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar provisioning_state: Provisioning state of the Alias(Disaster + Recovery configuration) - possible values 'Accepted' or 'Succeeded' or + 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.eventhub.models.ProvisioningStateDR + :param partner_namespace: ARM Id of the Primary/Secondary eventhub + namespace name, which is part of GEO DR pairning + :type partner_namespace: str + :param alternate_name: Alternate name specified when alias and namespace + names are same. + :type alternate_name: str + :ivar role: role of namespace in GEO DR - possible values 'Primary' or + 'PrimaryNotReplicating' or 'Secondary'. Possible values include: + 'Primary', 'PrimaryNotReplicating', 'Secondary' + :vartype role: str or ~azure.mgmt.eventhub.models.RoleDisasterRecovery + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateDR'}, + 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, + 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, + } + + def __init__(self, partner_namespace=None, alternate_name=None): + super(ArmDisasterRecovery, self).__init__() + self.provisioning_state = None + self.partner_namespace = partner_namespace + self.alternate_name = alternate_name + self.role = None diff --git a/src/eventhubs/azext_eventhub/eventhub/models/arm_disaster_recovery_paged.py b/src/eventhubs/azext_eventhub/eventhub/models/arm_disaster_recovery_paged.py new file mode 100644 index 00000000000..bdd10227b64 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/arm_disaster_recovery_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ArmDisasterRecoveryPaged(Paged): + """ + A paging container for iterating over a list of :class:`ArmDisasterRecovery ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArmDisasterRecovery]'} + } + + def __init__(self, *args, **kwargs): + + super(ArmDisasterRecoveryPaged, self).__init__(*args, **kwargs) diff --git a/src/eventhubs/azext_eventhub/eventhub/models/authorization_rule.py b/src/eventhubs/azext_eventhub/eventhub/models/authorization_rule.py new file mode 100644 index 00000000000..9df5d358d98 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/authorization_rule.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class AuthorizationRule(Resource): + """Single item in a List or Get AuthorizationRule operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param rights: The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.eventhub.models.AccessRights] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'rights': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rights': {'key': 'properties.rights', 'type': '[str]'}, + } + + def __init__(self, rights): + super(AuthorizationRule, self).__init__() + self.rights = rights diff --git a/src/eventhubs/azext_eventhub/eventhub/models/authorization_rule_paged.py b/src/eventhubs/azext_eventhub/eventhub/models/authorization_rule_paged.py new file mode 100644 index 00000000000..584b91a033a --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/authorization_rule_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class AuthorizationRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`AuthorizationRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AuthorizationRule]'} + } + + def __init__(self, *args, **kwargs): + + super(AuthorizationRulePaged, self).__init__(*args, **kwargs) diff --git a/src/eventhubs/azext_eventhub/eventhub/models/capture_description.py b/src/eventhubs/azext_eventhub/eventhub/models/capture_description.py new file mode 100644 index 00000000000..6d629cdde79 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/capture_description.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CaptureDescription(Model): + """Properties to configure capture description for eventhub. + + :param enabled: A value that indicates whether capture description is + enabled. + :type enabled: bool + :param encoding: Enumerates the possible values for the encoding format of + capture description. Possible values include: 'Avro', 'AvroDeflate' + :type encoding: str or + ~azure.mgmt.eventhub.models.EncodingCaptureDescription + :param interval_in_seconds: The time window allows you to set the + frequency with which the capture to Azure Blobs will happen, value should + between 60 to 900 seconds + :type interval_in_seconds: int + :param size_limit_in_bytes: The size window defines the amount of data + built up in your Event Hub before an capture operation, value should be + between 10485760 to 524288000 bytes + :type size_limit_in_bytes: int + :param destination: Properties of Destination where capture will be + stored. (Storage Account, Blob Names) + :type destination: ~azure.mgmt.eventhub.models.Destination + """ + + _validation = { + 'interval_in_seconds': {'maximum': 900, 'minimum': 60}, + 'size_limit_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encoding': {'key': 'encoding', 'type': 'EncodingCaptureDescription'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + 'size_limit_in_bytes': {'key': 'sizeLimitInBytes', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'Destination'}, + } + + def __init__(self, enabled=None, encoding=None, interval_in_seconds=None, size_limit_in_bytes=None, destination=None): + self.enabled = enabled + self.encoding = encoding + self.interval_in_seconds = interval_in_seconds + self.size_limit_in_bytes = size_limit_in_bytes + self.destination = destination diff --git a/src/eventhubs/azext_eventhub/eventhub/models/check_name_availability_parameter.py b/src/eventhubs/azext_eventhub/eventhub/models/check_name_availability_parameter.py new file mode 100644 index 00000000000..e633b101641 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/check_name_availability_parameter.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityParameter(Model): + """Parameter supplied to check Namespace name availability operation . + + :param name: Name to check the namespace name availability + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, name): + self.name = name diff --git a/src/eventhubs/azext_eventhub/eventhub/models/check_name_availability_result.py b/src/eventhubs/azext_eventhub/eventhub/models/check_name_availability_result.py new file mode 100644 index 00000000000..9dd4bb1f109 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/check_name_availability_result.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """The Result of the CheckNameAvailability operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar message: The detailed info regarding the reason associated with the + Namespace. + :vartype message: str + :param name_available: Value indicating Namespace is availability, true if + the Namespace is available; otherwise, false. + :type name_available: bool + :param reason: The reason for unavailability of a Namespace. Possible + values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', + 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' + :type reason: str or ~azure.mgmt.eventhub.models.UnavailableReason + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'UnavailableReason'}, + } + + def __init__(self, name_available=None, reason=None): + self.message = None + self.name_available = name_available + self.reason = reason diff --git a/src/eventhubs/azext_eventhub/eventhub/models/consumer_group.py b/src/eventhubs/azext_eventhub/eventhub/models/consumer_group.py new file mode 100644 index 00000000000..54f44f7b3ce --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/consumer_group.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ConsumerGroup(Resource): + """Single item in List or Get Consumer group operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar created_at: Exact time the message was created. + :vartype created_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :param user_metadata: Usermetadata is a placeholder to store user-defined + string data with maximum length 1024. e.g. it can be used to store + descriptive data, such as list of teams and their contact information also + user-defined configuration settings can be stored. + :type user_metadata: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, + } + + def __init__(self, user_metadata=None): + super(ConsumerGroup, self).__init__() + self.created_at = None + self.updated_at = None + self.user_metadata = user_metadata diff --git a/src/eventhubs/azext_eventhub/eventhub/models/consumer_group_paged.py b/src/eventhubs/azext_eventhub/eventhub/models/consumer_group_paged.py new file mode 100644 index 00000000000..9284a0f4163 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/consumer_group_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ConsumerGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`ConsumerGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ConsumerGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(ConsumerGroupPaged, self).__init__(*args, **kwargs) diff --git a/src/eventhubs/azext_eventhub/eventhub/models/destination.py b/src/eventhubs/azext_eventhub/eventhub/models/destination.py new file mode 100644 index 00000000000..7bdacd2cb1a --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/destination.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Destination(Model): + """Capture storage details for capture description. + + :param name: Name for capture destination + :type name: str + :param storage_account_resource_id: Resource id of the storage account to + be used to create the blobs + :type storage_account_resource_id: str + :param blob_container: Blob container Name + :type blob_container: str + :param archive_name_format: Blob naming convention for archive, e.g. + {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. + Here all the parameters (Namespace,EventHub .. etc) are mandatory + irrespective of order + :type archive_name_format: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'blob_container': {'key': 'properties.blobContainer', 'type': 'str'}, + 'archive_name_format': {'key': 'properties.archiveNameFormat', 'type': 'str'}, + } + + def __init__(self, name=None, storage_account_resource_id=None, blob_container=None, archive_name_format=None): + self.name = name + self.storage_account_resource_id = storage_account_resource_id + self.blob_container = blob_container + self.archive_name_format = archive_name_format diff --git a/src/eventhubs/azext_eventhub/eventhub/models/eh_namespace.py b/src/eventhubs/azext_eventhub/eventhub/models/eh_namespace.py new file mode 100644 index 00000000000..7b05c4d6d48 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/eh_namespace.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class EHNamespace(TrackedResource): + """Single Namespace item in List or Get Operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: Properties of sku resource + :type sku: ~azure.mgmt.eventhub.models.Sku + :ivar provisioning_state: Provisioning state of the Namespace. + :vartype provisioning_state: str + :ivar created_at: The time the Namespace was created. + :vartype created_at: datetime + :ivar updated_at: The time the Namespace was updated. + :vartype updated_at: datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus + operations. + :vartype service_bus_endpoint: str + :ivar metric_id: Identifier for Azure Insights metrics. + :vartype metric_id: str + :param is_auto_inflate_enabled: Value that indicates whether AutoInflate + is enabled for eventhub namespace. + :type is_auto_inflate_enabled: bool + :param maximum_throughput_units: Upper limit of throughput units when + AutoInflate is enabled, vaule should be within 0 to 20 throughput units. ( + '0' if AutoInflateEnabled = true) + :type maximum_throughput_units: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'readonly': True}, + 'maximum_throughput_units': {'maximum': 20, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + 'is_auto_inflate_enabled': {'key': 'properties.isAutoInflateEnabled', 'type': 'bool'}, + 'maximum_throughput_units': {'key': 'properties.maximumThroughputUnits', 'type': 'int'}, + } + + def __init__(self, location=None, tags=None, sku=None, is_auto_inflate_enabled=None, maximum_throughput_units=None): + super(EHNamespace, self).__init__(location=location, tags=tags) + self.sku = sku + self.provisioning_state = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.metric_id = None + self.is_auto_inflate_enabled = is_auto_inflate_enabled + self.maximum_throughput_units = maximum_throughput_units diff --git a/src/eventhubs/azext_eventhub/eventhub/models/eh_namespace_paged.py b/src/eventhubs/azext_eventhub/eventhub/models/eh_namespace_paged.py new file mode 100644 index 00000000000..b4e66e5f7e9 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/eh_namespace_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class EHNamespacePaged(Paged): + """ + A paging container for iterating over a list of :class:`EHNamespace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EHNamespace]'} + } + + def __init__(self, *args, **kwargs): + + super(EHNamespacePaged, self).__init__(*args, **kwargs) diff --git a/src/eventhubs/azext_eventhub/eventhub/models/error_response.py b/src/eventhubs/azext_eventhub/eventhub/models/error_response.py new file mode 100644 index 00000000000..5d51f399861 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/error_response.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error reponse indicates EventHub service is not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, code=None, message=None): + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/src/eventhubs/azext_eventhub/eventhub/models/event_hub_management_client_enums.py b/src/eventhubs/azext_eventhub/eventhub/models/event_hub_management_client_enums.py new file mode 100644 index 00000000000..ac7264c6e77 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/event_hub_management_client_enums.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class SkuName(Enum): + + basic = "Basic" + standard = "Standard" + + +class SkuTier(Enum): + + basic = "Basic" + standard = "Standard" + + +class AccessRights(Enum): + + manage = "Manage" + send = "Send" + listen = "Listen" + + +class KeyType(Enum): + + primary_key = "PrimaryKey" + secondary_key = "SecondaryKey" + + +class EntityStatus(Enum): + + active = "Active" + disabled = "Disabled" + restoring = "Restoring" + send_disabled = "SendDisabled" + receive_disabled = "ReceiveDisabled" + creating = "Creating" + deleting = "Deleting" + renaming = "Renaming" + unknown = "Unknown" + + +class EncodingCaptureDescription(Enum): + + avro = "Avro" + avro_deflate = "AvroDeflate" + + +class UnavailableReason(Enum): + + none = "None" + invalid_name = "InvalidName" + subscription_is_disabled = "SubscriptionIsDisabled" + name_in_use = "NameInUse" + name_in_lockdown = "NameInLockdown" + too_many_namespace_in_current_subscription = "TooManyNamespaceInCurrentSubscription" + + +class ProvisioningStateDR(Enum): + + accepted = "Accepted" + succeeded = "Succeeded" + failed = "Failed" + + +class RoleDisasterRecovery(Enum): + + primary = "Primary" + primary_not_replicating = "PrimaryNotReplicating" + secondary = "Secondary" diff --git a/src/eventhubs/azext_eventhub/eventhub/models/eventhub.py b/src/eventhubs/azext_eventhub/eventhub/models/eventhub.py new file mode 100644 index 00000000000..5e9aff617d4 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/eventhub.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class Eventhub(Resource): + """Single item in List or Get Event Hub operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar partition_ids: Current number of shards on the Event Hub. + :vartype partition_ids: list[str] + :ivar created_at: Exact time the Event Hub was created. + :vartype created_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :param message_retention_in_days: Number of days to retain the events for + this Event Hub, value should be 1 to 7 days + :type message_retention_in_days: long + :param partition_count: Number of partitions created for the Event Hub, + allowed values are from 1 to 32 partitions. + :type partition_count: long + :param status: Enumerates the possible values for the status of the Event + Hub. Possible values include: 'Active', 'Disabled', 'Restoring', + 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', + 'Unknown' + :type status: str or ~azure.mgmt.eventhub.models.EntityStatus + :param capture_description: Properties of capture description + :type capture_description: ~azure.mgmt.eventhub.models.CaptureDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'partition_ids': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'message_retention_in_days': {'minimum': 1}, + 'partition_count': {'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'partition_ids': {'key': 'properties.partitionIds', 'type': '[str]'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'message_retention_in_days': {'key': 'properties.messageRetentionInDays', 'type': 'long'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'long'}, + 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'capture_description': {'key': 'properties.captureDescription', 'type': 'CaptureDescription'}, + } + + def __init__(self, message_retention_in_days=None, partition_count=None, status=None, capture_description=None): + super(Eventhub, self).__init__() + self.partition_ids = None + self.created_at = None + self.updated_at = None + self.message_retention_in_days = message_retention_in_days + self.partition_count = partition_count + self.status = status + self.capture_description = capture_description diff --git a/src/eventhubs/azext_eventhub/eventhub/models/eventhub_paged.py b/src/eventhubs/azext_eventhub/eventhub/models/eventhub_paged.py new file mode 100644 index 00000000000..c3627a7bab1 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/eventhub_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class EventhubPaged(Paged): + """ + A paging container for iterating over a list of :class:`Eventhub ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Eventhub]'} + } + + def __init__(self, *args, **kwargs): + + super(EventhubPaged, self).__init__(*args, **kwargs) diff --git a/src/eventhubs/azext_eventhub/eventhub/models/operation.py b/src/eventhubs/azext_eventhub/eventhub/models/operation.py new file mode 100644 index 00000000000..c625335b114 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/operation.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """A Event Hub REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.eventhub.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, display=None): + self.name = None + self.display = display diff --git a/src/eventhubs/azext_eventhub/eventhub/models/operation_display.py b/src/eventhubs/azext_eventhub/eventhub/models/operation_display.py new file mode 100644 index 00000000000..6d2846dc981 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/operation_display.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.EventHub + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Invoice, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self): + self.provider = None + self.resource = None + self.operation = None diff --git a/src/eventhubs/azext_eventhub/eventhub/models/operation_paged.py b/src/eventhubs/azext_eventhub/eventhub/models/operation_paged.py new file mode 100644 index 00000000000..3fbb5521d2e --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/src/eventhubs/azext_eventhub/eventhub/models/regenerate_access_key_parameters.py b/src/eventhubs/azext_eventhub/eventhub/models/regenerate_access_key_parameters.py new file mode 100644 index 00000000000..3e526ab736f --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/regenerate_access_key_parameters.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegenerateAccessKeyParameters(Model): + """Parameters supplied to the Regenerate Authorization Rule operation, + specifies which key neeeds to be reset. + + :param key_type: The access key to regenerate. Possible values include: + 'PrimaryKey', 'SecondaryKey' + :type key_type: str or ~azure.mgmt.eventhub.models.KeyType + :param key: Optional, if the key value provided, is set for KeyType or + autogenerated Key value set for keyType + :type key: str + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'KeyType'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, key_type, key=None): + self.key_type = key_type + self.key = key diff --git a/src/eventhubs/azext_eventhub/eventhub/models/resource.py b/src/eventhubs/azext_eventhub/eventhub/models/resource.py new file mode 100644 index 00000000000..74f2f6956a5 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/resource.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """The Resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self): + self.id = None + self.name = None + self.type = None diff --git a/src/eventhubs/azext_eventhub/eventhub/models/sku.py b/src/eventhubs/azext_eventhub/eventhub/models/sku.py new file mode 100644 index 00000000000..250a2b2ed06 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/sku.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """SKU parameters supplied to the create namespace operation. + + :param name: Name of this SKU. Possible values include: 'Basic', + 'Standard' + :type name: str or ~azure.mgmt.eventhub.models.SkuName + :param tier: The billing tier of this particular SKU. Possible values + include: 'Basic', 'Standard' + :type tier: str or ~azure.mgmt.eventhub.models.SkuTier + :param capacity: The Event Hubs throughput units, vaule should be 0 to 20 + throughput units. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + 'capacity': {'maximum': 20, 'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, name, tier=None, capacity=None): + self.name = name + self.tier = tier + self.capacity = capacity diff --git a/src/eventhubs/azext_eventhub/eventhub/models/tracked_resource.py b/src/eventhubs/azext_eventhub/eventhub/models/tracked_resource.py new file mode 100644 index 00000000000..1de5cd2d21b --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/models/tracked_resource.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class TrackedResource(Resource): + """Definition of Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location=None, tags=None): + super(TrackedResource, self).__init__() + self.location = location + self.tags = tags diff --git a/src/eventhubs/azext_eventhub/eventhub/operations/__init__.py b/src/eventhubs/azext_eventhub/eventhub/operations/__init__.py new file mode 100644 index 00000000000..754191f262b --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/operations/__init__.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .operations import Operations +from .namespaces_operations import NamespacesOperations +from .disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations +from .event_hubs_operations import EventHubsOperations +from .consumer_groups_operations import ConsumerGroupsOperations + +__all__ = [ + 'Operations', + 'NamespacesOperations', + 'DisasterRecoveryConfigsOperations', + 'EventHubsOperations', + 'ConsumerGroupsOperations', +] diff --git a/src/eventhubs/azext_eventhub/eventhub/operations/consumer_groups_operations.py b/src/eventhubs/azext_eventhub/eventhub/operations/consumer_groups_operations.py new file mode 100644 index 00000000000..396c9144be0 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/operations/consumer_groups_operations.py @@ -0,0 +1,317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ConsumerGroupsOperations(object): + """ConsumerGroupsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client API Version. Constant value: "2017-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-01" + + self.config = config + + def create_or_update( + self, resource_group_name, namespace_name, event_hub_name, consumer_group_name, user_metadata=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Event Hubs consumer group as a nested resource + within a Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param consumer_group_name: The consumer group name + :type consumer_group_name: str + :param user_metadata: Usermetadata is a placeholder to store + user-defined string data with maximum length 1024. e.g. it can be used + to store descriptive data, such as list of teams and their contact + information also user-defined configuration settings can be stored. + :type user_metadata: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConsumerGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.ConsumerGroup or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.ConsumerGroup(user_metadata=user_metadata) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ConsumerGroup') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConsumerGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers=None, raw=False, **operation_config): + """Deletes a consumer group from the specified Event Hub and resource + group. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param consumer_group_name: The consumer group name + :type consumer_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def get( + self, resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a description for the specified consumer group. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param consumer_group_name: The consumer group name + :type consumer_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConsumerGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.ConsumerGroup or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConsumerGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_by_event_hub( + self, resource_group_name, namespace_name, event_hub_name, custom_headers=None, raw=False, **operation_config): + """Gets all the consumer groups in a Namespace. An empty feed is returned + if no consumer group exists in the Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ConsumerGroup + :rtype: + ~azure.mgmt.eventhub.models.ConsumerGroupPaged[~azure.mgmt.eventhub.models.ConsumerGroup] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ConsumerGroupPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConsumerGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized diff --git a/src/eventhubs/azext_eventhub/eventhub/operations/disaster_recovery_configs_operations.py b/src/eventhubs/azext_eventhub/eventhub/operations/disaster_recovery_configs_operations.py new file mode 100644 index 00000000000..0c84a6938c8 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/operations/disaster_recovery_configs_operations.py @@ -0,0 +1,694 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DisasterRecoveryConfigsOperations(object): + """DisasterRecoveryConfigsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client API Version. Constant value: "2017-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-01" + + self.config = config + + def check_name_availability( + self, resource_group_name, namespace_name, name, custom_headers=None, raw=False, **operation_config): + """Check the give Namespace name availability. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param name: Name to check the namespace name availability + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.CheckNameAvailabilityParameter(name=name) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameter') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets all Alias(Disaster Recovery configurations). + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ArmDisasterRecovery + :rtype: + ~azure.mgmt.eventhub.models.ArmDisasterRecoveryPaged[~azure.mgmt.eventhub.models.ArmDisasterRecovery] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ArmDisasterRecoveryPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ArmDisasterRecoveryPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, namespace_name, alias, partner_namespace=None, alternate_name=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a new Alias(Disaster Recovery configuration). + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param alias: The Disaster Recovery configuration name + :type alias: str + :param partner_namespace: ARM Id of the Primary/Secondary eventhub + namespace name, which is part of GEO DR pairning + :type partner_namespace: str + :param alternate_name: Alternate name specified when alias and + namespace names are same. + :type alternate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ArmDisasterRecovery or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.ArmDisasterRecovery or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.ArmDisasterRecovery(partner_namespace=partner_namespace, alternate_name=alternate_name) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ArmDisasterRecovery') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ArmDisasterRecovery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, namespace_name, alias, custom_headers=None, raw=False, **operation_config): + """Deletes an Alias(Disaster Recovery configuration). + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param alias: The Disaster Recovery configuration name + :type alias: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def get( + self, resource_group_name, namespace_name, alias, custom_headers=None, raw=False, **operation_config): + """Retrieves Alias(Disaster Recovery configuration) for primary or + secondary namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param alias: The Disaster Recovery configuration name + :type alias: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ArmDisasterRecovery or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.ArmDisasterRecovery or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ArmDisasterRecovery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def break_pairing( + self, resource_group_name, namespace_name, alias, custom_headers=None, raw=False, **operation_config): + """This operation disables the Disaster Recovery and stops replicating + changes from primary to secondary namespaces. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param alias: The Disaster Recovery configuration name + :type alias: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def fail_over( + self, resource_group_name, namespace_name, alias, custom_headers=None, raw=False, **operation_config): + """envokes GEO DR failover and reconfigure the alias to point to the + secondary namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param alias: The Disaster Recovery configuration name + :type alias: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def list_authorization_rules( + self, resource_group_name, namespace_name, alias, custom_headers=None, raw=False, **operation_config): + """Gets a list of authorization rules for a Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param alias: The Disaster Recovery configuration name + :type alias: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AuthorizationRule + :rtype: + ~azure.mgmt.eventhub.models.AuthorizationRulePaged[~azure.mgmt.eventhub.models.AuthorizationRule] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_authorization_rule( + self, resource_group_name, namespace_name, alias, authorization_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets an AuthorizationRule for a Namespace by rule name. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param alias: The Disaster Recovery configuration name + :type alias: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AuthorizationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AuthorizationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AuthorizationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, namespace_name, alias, authorization_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets the primary and secondary connection strings for the Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param alias: The Disaster Recovery configuration name + :type alias: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}/listKeys' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/src/eventhubs/azext_eventhub/eventhub/operations/event_hubs_operations.py b/src/eventhubs/azext_eventhub/eventhub/operations/event_hubs_operations.py new file mode 100644 index 00000000000..af6bdfa3cdd --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/operations/event_hubs_operations.py @@ -0,0 +1,719 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class EventHubsOperations(object): + """EventHubsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client API Version. Constant value: "2017-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-01" + + self.config = config + + def list_by_namespace( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets all the Event Hubs in a Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Eventhub + :rtype: + ~azure.mgmt.eventhub.models.EventhubPaged[~azure.mgmt.eventhub.models.Eventhub] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.EventhubPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EventhubPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, namespace_name, event_hub_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a new Event Hub as a nested resource within a + Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param parameters: Parameters supplied to create an Event Hub + resource. + :type parameters: ~azure.mgmt.eventhub.models.Eventhub + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Eventhub or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.Eventhub or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Eventhub') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Eventhub', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, namespace_name, event_hub_name, custom_headers=None, raw=False, **operation_config): + """Deletes an Event Hub from the specified Namespace and resource group. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def get( + self, resource_group_name, namespace_name, event_hub_name, custom_headers=None, raw=False, **operation_config): + """Gets an Event Hubs description for the specified Event Hub. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Eventhub or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.Eventhub or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Eventhub', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_authorization_rules( + self, resource_group_name, namespace_name, event_hub_name, custom_headers=None, raw=False, **operation_config): + """Gets the authorization rules for an Event Hub. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AuthorizationRule + :rtype: + ~azure.mgmt.eventhub.models.AuthorizationRulePaged[~azure.mgmt.eventhub.models.AuthorizationRule] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def create_or_update_authorization_rule( + self, resource_group_name, namespace_name, event_hub_name, authorization_rule_name, rights, custom_headers=None, raw=False, **operation_config): + """Creates or updates an AuthorizationRule for the specified Event Hub. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param rights: The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.eventhub.models.AccessRights] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AuthorizationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AuthorizationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.AuthorizationRule(rights=rights) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AuthorizationRule') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AuthorizationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def get_authorization_rule( + self, resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets an AuthorizationRule for an Event Hub by rule name. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AuthorizationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AuthorizationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AuthorizationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_authorization_rule( + self, resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes an Event Hub AuthorizationRule. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def list_keys( + self, resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets the ACS and SAS connection strings for the Event Hub. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/ListKeys' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_keys( + self, resource_group_name, namespace_name, event_hub_name, authorization_rule_name, key_type, key=None, custom_headers=None, raw=False, **operation_config): + """Regenerates the ACS and SAS connection strings for the Event Hub. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param event_hub_name: The Event Hub name + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param key_type: The access key to regenerate. Possible values + include: 'PrimaryKey', 'SecondaryKey' + :type key_type: str or ~azure.mgmt.eventhub.models.KeyType + :param key: Optional, if the key value provided, is set for KeyType or + autogenerated Key value set for keyType + :type key: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.RegenerateAccessKeyParameters(key_type=key_type, key=key) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RegenerateAccessKeyParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/src/eventhubs/azext_eventhub/eventhub/operations/namespaces_operations.py b/src/eventhubs/azext_eventhub/eventhub/operations/namespaces_operations.py new file mode 100644 index 00000000000..d5e64af2acb --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/operations/namespaces_operations.py @@ -0,0 +1,937 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class NamespacesOperations(object): + """NamespacesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client API Version. Constant value: "2017-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-01" + + self.config = config + + def check_name_availability( + self, name, custom_headers=None, raw=False, **operation_config): + """Check the give Namespace name availability. + + :param name: Name to check the namespace name availability + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.CheckNameAvailabilityParameter(name=name) + + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/CheckNameAvailability' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameter') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the available Namespaces within a subscription, irrespective + of the resource groups. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EHNamespace + :rtype: + ~azure.mgmt.eventhub.models.EHNamespacePaged[~azure.mgmt.eventhub.models.EHNamespace] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.EHNamespacePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EHNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists the available Namespaces within a resource group. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EHNamespace + :rtype: + ~azure.mgmt.eventhub.models.EHNamespacePaged[~azure.mgmt.eventhub.models.EHNamespace] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.EHNamespacePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EHNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a namespace. Once created, this namespace's resource + manifest is immutable. This operation is idempotent. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param parameters: Parameters for creating a namespace resource. + :type parameters: ~azure.mgmt.eventhub.models.EHNamespace + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns EHNamespace + or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventhub.models.EHNamespace] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'EHNamespace') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EHNamespace', response) + if response.status_code == 201: + deserialized = self._deserialize('EHNamespace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing namespace. This operation also removes all + associated resources under the namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def get( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets the description of the specified namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EHNamespace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.EHNamespace or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EHNamespace', response) + if response.status_code == 201: + deserialized = self._deserialize('EHNamespace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a namespace. Once created, this namespace's resource + manifest is immutable. This operation is idempotent. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param parameters: Parameters for updating a namespace resource. + :type parameters: ~azure.mgmt.eventhub.models.EHNamespace + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EHNamespace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.EHNamespace or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'EHNamespace') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EHNamespace', response) + if response.status_code == 201: + deserialized = self._deserialize('EHNamespace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_authorization_rules( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of authorization rules for a Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AuthorizationRule + :rtype: + ~azure.mgmt.eventhub.models.AuthorizationRulePaged[~azure.mgmt.eventhub.models.AuthorizationRule] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def create_or_update_authorization_rule( + self, resource_group_name, namespace_name, authorization_rule_name, rights, custom_headers=None, raw=False, **operation_config): + """Creates or updates an AuthorizationRule for a Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param rights: The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.eventhub.models.AccessRights] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AuthorizationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AuthorizationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.AuthorizationRule(rights=rights) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AuthorizationRule') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AuthorizationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_authorization_rule( + self, resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes an AuthorizationRule for a Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def get_authorization_rule( + self, resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets an AuthorizationRule for a Namespace by rule name. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AuthorizationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AuthorizationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AuthorizationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets the primary and secondary connection strings for the Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_keys( + self, resource_group_name, namespace_name, authorization_rule_name, key_type, key=None, custom_headers=None, raw=False, **operation_config): + """Regenerates the primary or secondary connection strings for the + specified Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param key_type: The access key to regenerate. Possible values + include: 'PrimaryKey', 'SecondaryKey' + :type key_type: str or ~azure.mgmt.eventhub.models.KeyType + :param key: Optional, if the key value provided, is set for KeyType or + autogenerated Key value set for keyType + :type key: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventhub.models.AccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.RegenerateAccessKeyParameters(key_type=key_type, key=key) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RegenerateAccessKeyParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/src/eventhubs/azext_eventhub/eventhub/operations/operations.py b/src/eventhubs/azext_eventhub/eventhub/operations/operations.py new file mode 100644 index 00000000000..67c1bec87af --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/operations/operations.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client API Version. Constant value: "2017-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Event Hub REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.eventhub.models.OperationPaged[~azure.mgmt.eventhub.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/providers/Microsoft.EventHub/operations' + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized diff --git a/src/eventhubs/azext_eventhub/eventhub/version.py b/src/eventhubs/azext_eventhub/eventhub/version.py new file mode 100644 index 00000000000..36d453c9494 --- /dev/null +++ b/src/eventhubs/azext_eventhub/eventhub/version.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +VERSION = "1.2.0" diff --git a/src/eventhubs/azext_eventhub/tests/__init__.py b/src/eventhubs/azext_eventhub/tests/__init__.py new file mode 100644 index 00000000000..34913fb394d --- /dev/null +++ b/src/eventhubs/azext_eventhub/tests/__init__.py @@ -0,0 +1,4 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml new file mode 100644 index 00000000000..5f6b025a991 --- /dev/null +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml @@ -0,0 +1,1222 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_eh_alias000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001","name":"cli_test_eh_alias000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:01:43 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: 'b''{"name": "eh-nscli000002"}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace exists] + Connection: [keep-alive] + Content-Length: ['32'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventHub/CheckNameAvailability?api-version=2017-04-01 + response: + body: {string: '{"nameAvailable":true,"reason":"None","message":null}'} + headers: + cache-control: [no-cache] + content-length: ['53'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:01:45 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: '{"location": "SouthCentralUS", "tags": {"{tag2: value2,": "", "tag1: value1}": + ""}, "sku": {"name": "Standard", "tier": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Length: ['132'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","name":"eh-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-17T18:01:46.503Z","updatedAt":"2018-01-17T18:01:46.503Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + headers: + cache-control: [no-cache] + content-length: ['768'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:01:47 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","name":"eh-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-17T18:01:46.503Z","updatedAt":"2018-01-17T18:02:12.243Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['766'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:02:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","name":"eh-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-17T18:01:46.503Z","updatedAt":"2018-01-17T18:02:12.243Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['766'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:02:20 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"location": "NorthCentralUS", "tags": {"{tag2: value2,": "", "tag1: value1}": + ""}, "sku": {"name": "Standard", "tier": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Length: ['132'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","name":"eh-nscli000003","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-17T18:02:21.723Z","updatedAt":"2018-01-17T18:02:21.723Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Activating"}}'} + headers: + cache-control: [no-cache] + content-length: ['768'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:02:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","name":"eh-nscli000003","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-17T18:02:21.723Z","updatedAt":"2018-01-17T18:02:49.327Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['766'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:02:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","name":"eh-nscli000003","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-17T18:02:21.723Z","updatedAt":"2018-01-17T18:02:49.327Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['766'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:02:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"rights": ["Send"]}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace authorizationrule create] + Connection: [keep-alive] + Content-Length: ['36'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/AuthorizationRules/cliAutho000004?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/AuthorizationRules/cliAutho000004","name":"cliAutho000004","type":"Microsoft.EventHub/Namespaces/AuthorizationRules","location":"South + Central US","properties":{"rights":["Send"]}}'} + headers: + cache-control: [no-cache] + content-length: ['403'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:03:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace authorizationrule show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/AuthorizationRules/cliAutho000004?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/AuthorizationRules/cliAutho000004","name":"cliAutho000004","type":"Microsoft.EventHub/Namespaces/AuthorizationRules","location":"South + Central US","properties":{"rights":["Send"]}}'} + headers: + cache-control: [no-cache] + content-length: ['403'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:03:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"name": "cliAlias000005"}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias exists] + Connection: [keep-alive] + Content-Length: ['32'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/CheckNameAvailability?api-version=2017-04-01 + response: + body: {string: '{"nameAvailable":true,"reason":"None"}'} + headers: + cache-control: [no-cache] + content-length: ['38'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:03:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: 'b''b\''{"properties": {"partnerNamespace": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003"}}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias create] + Connection: [keep-alive] + Content-Length: ['243'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:04:05 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:04:06 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","role":"Secondary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['669'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:04:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:04:08 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias authorizationrule show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005/AuthorizationRules/cliAutho000004?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005/AuthorizationRules/cliAutho000004","name":"cliAutho000004","type":"Microsoft.EventHub/Namespaces/AuthorizationRules","location":"South + Central US","properties":{"rights":["Send"]}}'} + headers: + cache-control: [no-cache] + content-length: ['448'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:04:09 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias authorizationrule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005/AuthorizationRules?api-version=2017-04-01 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005/AuthorizationRules/RootManageSharedAccessKey","name":"RootManageSharedAccessKey","type":"Microsoft.EventHub/Namespaces/AuthorizationRules","location":"South + Central US","properties":{"rights":["Listen","Manage","Send"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005/AuthorizationRules/cliAutho000004","name":"cliAutho000004","type":"Microsoft.EventHub/Namespaces/AuthorizationRules","location":"South + Central US","properties":{"rights":["Send"]}}]}'} + headers: + cache-control: [no-cache] + content-length: ['937'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:04:11 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:04:43 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:05:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:05:46 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Succeeded","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['668'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:06:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias break-pair] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005/breakPairing?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:06:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:06:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:06:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:07:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Succeeded","partnerNamespace":"","role":"PrimaryNotReplicating","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['479'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:07:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''b\''{"properties": {"partnerNamespace": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003"}}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias create] + Connection: [keep-alive] + Content-Length: ['243'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:08:12 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:08:13 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:08:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:09:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['667'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:09:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Succeeded","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","role":"Primary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['668'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:10:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias fail-over] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005/failover?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:10:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","role":"Secondary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['669'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:10:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","role":"Secondary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['669'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:11:00 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","role":"Secondary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['669'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:11:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Succeeded","partnerNamespace":"","role":"PrimaryNotReplicating","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['479'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:12:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:12:05 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:12:36 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/operationresults/eh-nscli000002?api-version=2017-04-01'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/operationresults/eh-nscli000002?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:13:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:13:09 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/operationresults/eh-nscli000003?api-version=2017-04-01'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/operationresults/eh-nscli000003?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:13:40 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_eh_alias000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:13:42 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZBTElBU0dYREJURkhLVkpUTkhaSENZQ1FMU0I1VnxFQzlCODUxRUNFRTdGN0NDLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml new file mode 100644 index 00000000000..58909853ac0 --- /dev/null +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml @@ -0,0 +1,436 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_eh_consumergroup000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001","name":"cli_test_eh_consumergroup000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:13:45 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: '{"location": "westus2", "tags": {"{tag2: value2,": "", "tag1: value1}": + ""}, "sku": {"name": "Standard", "tier": "Standard"}, "properties": {"isAutoInflateEnabled": + true, "maximumThroughputUnits": 4}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Length: ['200'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:13:46.877Z","updatedAt":"2018-01-17T18:13:46.877Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + headers: + cache-control: [no-cache] + content-length: ['760'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:13:47 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:13:46.877Z","updatedAt":"2018-01-17T18:14:14.713Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['758'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:14:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:13:46.877Z","updatedAt":"2018-01-17T18:14:14.713Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['758'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:14:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub create] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003","name":"eventhubs-eventhubcli000003","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:14:22.233Z","updatedAt":"2018-01-17T18:14:25.327Z","partitionIds":["0","1","2","3"]}}'} + headers: + cache-control: [no-cache] + content-length: ['545'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:14:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003","name":"eventhubs-eventhubcli000003","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:14:22.233","updatedAt":"2018-01-17T18:14:25.327","partitionIds":["0","1","2","3"]}}'} + headers: + cache-control: [no-cache] + content-length: ['543'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:14:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"userMetadata": "usermetadata"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs consumergroup create] + Connection: [keep-alive] + Content-Length: ['48'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West + US 2","properties":{"createdAt":"2018-01-17T18:14:30.6966754Z","updatedAt":"2018-01-17T18:14:30.6966754Z","userMetadata":"usermetadata"}}'} + headers: + cache-control: [no-cache] + content-length: ['532'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:14:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs consumergroup show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West + US 2","properties":{"createdAt":"2018-01-17T18:14:30.8536738","updatedAt":"2018-01-17T18:14:30.8536738","userMetadata":"usermetadata"}}'} + headers: + cache-control: [no-cache] + content-length: ['530'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:14:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"userMetadata": "usermetadata-updated"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs consumergroup create] + Connection: [keep-alive] + Content-Length: ['56'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West + US 2","properties":{"createdAt":"2018-01-17T18:14:36.0720135Z","updatedAt":"2018-01-17T18:14:36.0720135Z","userMetadata":"usermetadata-updated"}}'} + headers: + cache-control: [no-cache] + content-length: ['540'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:14:35 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs consumergroup list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups?api-version=2017-04-01 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/$Default","name":"$Default","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West + US 2","properties":{"createdAt":"2018-01-17T18:14:25.3701935","updatedAt":"2018-01-17T18:14:25.3701935"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West + US 2","properties":{"createdAt":"2018-01-17T18:14:32.2453238","updatedAt":"2018-01-17T18:14:36.2628859","userMetadata":"usermetadata-updated"}}]}'} + headers: + cache-control: [no-cache] + content-length: ['1027'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:14:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-inline-count: [''] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs consumergroup delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:14:39 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:14:41 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:14:42 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:15:12 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_eh_consumergroup000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:15:15 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZDT05TVU1FUkdST1VQVjNTM0NUTklRMzRWWVpSN3xCQjhCMkEzREYxNTZGNEExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml new file mode 100644 index 00000000000..5f967b8a2c3 --- /dev/null +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml @@ -0,0 +1,494 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_eh_eventnhub000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001","name":"cli_test_eh_eventnhub000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:15:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: '{"location": "westus2", "tags": {"{tag2: value2,": "", "tag1: value1}": + ""}, "sku": {"name": "Standard", "tier": "Standard"}, "properties": {"isAutoInflateEnabled": + true, "maximumThroughputUnits": 4}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Length: ['200'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:15:18.66Z","updatedAt":"2018-01-17T18:15:18.66Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + headers: + cache-control: [no-cache] + content-length: ['758'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:15:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:15:18.66Z","updatedAt":"2018-01-17T18:15:42.077Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['757'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:15:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:15:18.66Z","updatedAt":"2018-01-17T18:15:42.077Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['757'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:15:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub create] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004","name":"eventhubs-eventhubcli000004","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:15:54.133Z","updatedAt":"2018-01-17T18:15:56.697Z","partitionIds":["0","1","2","3"]}}'} + headers: + cache-control: [no-cache] + content-length: ['545'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:15:58 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004","name":"eventhubs-eventhubcli000004","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:15:54.133","updatedAt":"2018-01-17T18:15:56.697","partitionIds":["0","1","2","3"]}}'} + headers: + cache-control: [no-cache] + content-length: ['543'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:15:59 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs?api-version=2017-04-01 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004","name":"eventhubs-eventhubcli000004","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:15:54.133","updatedAt":"2018-01-17T18:15:56.697","partitionIds":["0","1","2","3"]}}]}'} + headers: + cache-control: [no-cache] + content-length: ['555'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:16:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-inline-count: [''] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"rights": ["Listen"]}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub authorizationrule create] + Connection: [keep-alive] + Content-Length: ['38'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules","location":"West + US 2","properties":{"rights":["Listen"]}}'} + headers: + cache-control: [no-cache] + content-length: ['444'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:16:02 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub authorizationrule show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules","location":"West + US 2","properties":{"rights":["Listen"]}}'} + headers: + cache-control: [no-cache] + content-length: ['444'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:16:04 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub authorizationrule keys list] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003/ListKeys?api-version=2017-04-01 + response: + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=ig9Q4mn3Pm+FVks+j1SbKOpts18WsEM2/9C1Xh7qM64=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=kbdFkooyYYRoiOcKrhMjZzVq0XDkGlJMCIz9oDQQTis=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"ig9Q4mn3Pm+FVks+j1SbKOpts18WsEM2/9C1Xh7qM64=","secondaryKey":"kbdFkooyYYRoiOcKrhMjZzVq0XDkGlJMCIz9oDQQTis=","keyName":"cliAutho000003"}'} + headers: + cache-control: [no-cache] + content-length: ['610'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:16:05 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: '{"keyType": "PrimaryKey"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub authorizationrule keys renew] + Connection: [keep-alive] + Content-Length: ['25'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 + response: + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=t9S9cXF+85yW+9DLEFdJd+22eZOStyza9P/bUCI9WKE=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=kbdFkooyYYRoiOcKrhMjZzVq0XDkGlJMCIz9oDQQTis=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"t9S9cXF+85yW+9DLEFdJd+22eZOStyza9P/bUCI9WKE=","secondaryKey":"kbdFkooyYYRoiOcKrhMjZzVq0XDkGlJMCIz9oDQQTis=","keyName":"cliAutho000003"}'} + headers: + cache-control: [no-cache] + content-length: ['610'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:16:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: '{"keyType": "SecondaryKey"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub authorizationrule keys renew] + Connection: [keep-alive] + Content-Length: ['27'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 + response: + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=t9S9cXF+85yW+9DLEFdJd+22eZOStyza9P/bUCI9WKE=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=ydvKW4TbTG3GlwHnK5N6jfuzLuNjB/GeoaC924ViQhg=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"t9S9cXF+85yW+9DLEFdJd+22eZOStyza9P/bUCI9WKE=","secondaryKey":"ydvKW4TbTG3GlwHnK5N6jfuzLuNjB/GeoaC924ViQhg=","keyName":"cliAutho000003"}'} + headers: + cache-control: [no-cache] + content-length: ['610'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:16:08 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub authorizationrule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:16:11 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs eventhub delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:16:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:16:16 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:16:45 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_eh_eventnhub000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:16:48 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZFVkVOVE5IVUI2UFRFWDNPWFJCRlJYVjQ0WlYyU3xFOUY2RkRBRTUyNjI4Mjk2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml new file mode 100644 index 00000000000..cdbfa20da62 --- /dev/null +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml @@ -0,0 +1,545 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_eh_namespace000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001","name":"cli_test_eh_namespace000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:16:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: 'b''{"name": "eventhubs-nscli000002"}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace exists] + Connection: [keep-alive] + Content-Length: ['32'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventHub/CheckNameAvailability?api-version=2017-04-01 + response: + body: {string: '{"nameAvailable":true,"reason":"None","message":null}'} + headers: + cache-control: [no-cache] + content-length: ['53'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:16:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: '{"location": "westus2", "tags": {"{tag1: value1}": ""}, "sku": {"name": + "Standard", "tier": "Standard"}, "properties": {"isAutoInflateEnabled": true, + "maximumThroughputUnits": 4}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Length: ['179'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:16:53.533Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + headers: + cache-control: [no-cache] + content-length: ['741'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:16:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:17:17.173Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['739'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:17:24 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:17:17.173Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + headers: + cache-control: [no-cache] + content-length: ['739'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:17:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventHub/namespaces?api-version=2017-04-01 + response: + body: {string: '{"value":[{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias2mv7ov6fsgikow24xobpownip4z7mijgbqjghkrz5zav4njw5lcf6lf7px/providers/Microsoft.EventHub/namespaces/eh-nscli5r7wvmsetxqr","name":"eh-nscli5r7wvmsetxqr","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli5r7wvmsetxqr","createdAt":"2018-01-16T22:12:56.463Z","updatedAt":"2018-01-16T22:17:00.823Z","serviceBusEndpoint":"https://eh-nscli5r7wvmsetxqr.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias2ent77voy7rwbiswwiop34bey35mxim3qb5qvzpligs53ynxgg7m6ukfx4/providers/Microsoft.EventHub/namespaces/eh-nscliu5bm3r5iisqx","name":"eh-nscliu5bm3r5iisqx","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliu5bm3r5iisqx","createdAt":"2018-01-17T00:14:20.873Z","updatedAt":"2018-01-17T00:18:46.907Z","serviceBusEndpoint":"https://eh-nscliu5bm3r5iisqx.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eventgrid-monitoring/providers/Microsoft.EventHub/namespaces/eventgrid-monitoring","name":"eventgrid-monitoring","type":"Microsoft.EventHub/Namespaces","location":"Central + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventgrid-monitoring","createdAt":"2017-05-19T19:13:03.853Z","updatedAt":"2017-08-17T17:27:13.863Z","serviceBusEndpoint":"https://eventgrid-monitoring.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.EventHub/namespaces/kalstest2","name":"kalstest2","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:kalstest2","createdAt":"2017-09-23T00:57:11.983Z","updatedAt":"2017-09-23T00:58:39.957Z","serviceBusEndpoint":"https://kalstest2.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eg-rgr1-uswc/providers/Microsoft.EventHub/namespaces/rgr1-eventhub1","name":"rgr1-eventhub1","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:rgr1-eventhub1","createdAt":"2017-11-22T23:42:33.113Z","updatedAt":"2017-11-22T23:47:39.017Z","serviceBusEndpoint":"https://rgr1-eventhub1.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:17:17.173Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps5157/providers/Microsoft.EventHub/namespaces/PSTestEH-ps5102","name":"PSTestEH-ps5102","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps5102","createdAt":"2017-11-30T01:29:20.62Z","updatedAt":"2017-11-30T01:30:04.59Z","serviceBusEndpoint":"https://PSTestEH-ps5102.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliascky7msnikdvg7monugngsco6s44dsylbg6ubkzabkjg3pq457pyq7kmcqu/providers/Microsoft.EventHub/namespaces/eh-nsclidjlkdqwkxyp2","name":"eh-nsclidjlkdqwkxyp2","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclidjlkdqwkxyp2","createdAt":"2018-01-16T03:25:23.523Z","updatedAt":"2018-01-16T03:29:33.037Z","serviceBusEndpoint":"https://eh-nsclidjlkdqwkxyp2.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":20},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EventGridResourceGroup/providers/Microsoft.EventHub/namespaces/eventgrid-eventhub","name":"eventgrid-eventhub","type":"Microsoft.EventHub/Namespaces","location":"West + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventgrid-eventhub","createdAt":"2017-04-26T16:51:02.323Z","updatedAt":"2017-08-18T02:12:27.463Z","serviceBusEndpoint":"https://eventgrid-eventhub.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps9059/providers/Microsoft.EventHub/namespaces/PSTestEH-ps4460","name":"PSTestEH-ps4460","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps4460","createdAt":"2017-11-30T00:38:29.223Z","updatedAt":"2017-11-30T00:39:48.487Z","serviceBusEndpoint":"https://PSTestEH-ps4460.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasg4iqo576d2twd4qc2lh7nicaqrbiop577a6ay6jdmyf6ttnncvwttfraa5/providers/Microsoft.EventHub/namespaces/eh-nscli2f64ppr4ehks","name":"eh-nscli2f64ppr4ehks","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli2f64ppr4ehks","createdAt":"2018-01-09T21:42:36.447Z","updatedAt":"2018-01-09T23:46:03.63Z","serviceBusEndpoint":"https://eh-nscli2f64ppr4ehks.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps3277/providers/Microsoft.EventHub/namespaces/PSTestEH-ps460","name":"PSTestEH-ps460","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps460","createdAt":"2017-11-30T19:22:17.26Z","updatedAt":"2017-11-30T19:23:58.753Z","serviceBusEndpoint":"https://PSTestEH-ps460.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagenortheurope/providers/Microsoft.EventHub/namespaces/azureeventgridneu","name":"azureeventgridneu","type":"Microsoft.EventHub/Namespaces","location":"North + Europe","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridneu","createdAt":"2017-06-14T20:54:18.227Z","updatedAt":"2017-06-14T21:45:04.64Z","serviceBusEndpoint":"https://azureeventgridneu.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasrdwk3qo25uvmozoy46edwk5dxzoyevdhfg6dknv2qmsgo47phzgttwpaky/providers/Microsoft.EventHub/namespaces/eh-nscli6oipmplfhbzp","name":"eh-nscli6oipmplfhbzp","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli6oipmplfhbzp","createdAt":"2018-01-17T03:16:11.223Z","updatedAt":"2018-01-17T03:20:19.61Z","serviceBusEndpoint":"https://eh-nscli6oipmplfhbzp.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagesouthcentralus/providers/Microsoft.EventHub/namespaces/azureeventgridussc","name":"azureeventgridussc","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridussc","createdAt":"2017-06-14T20:51:43.227Z","updatedAt":"2017-06-14T21:43:18.967Z","serviceBusEndpoint":"https://azureeventgridussc.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasuabxoisqt5ghyuwgudrymd4wwztlqyh6poga4g3w54qnzu3z7robkl6t5q/providers/Microsoft.EventHub/namespaces/eh-nsclibiuej5yxtkd2","name":"eh-nsclibiuej5yxtkd2","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclibiuej5yxtkd2","createdAt":"2018-01-16T02:44:18.997Z","updatedAt":"2018-01-16T02:47:50.287Z","serviceBusEndpoint":"https://eh-nsclibiuej5yxtkd2.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-onesdk5504/providers/Microsoft.EventHub/namespaces/PSTestEH-onesdk6034","name":"PSTestEH-onesdk6034","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-onesdk6034","createdAt":"2017-09-18T23:59:58.2Z","updatedAt":"2017-09-19T00:00:23.943Z","serviceBusEndpoint":"https://PSTestEH-onesdk6034.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManageaustraliasoutheast/providers/Microsoft.EventHub/namespaces/azureeventgridause","name":"azureeventgridause","type":"Microsoft.EventHub/Namespaces","location":"Australia + Southeast","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridause","createdAt":"2017-06-14T20:55:24.083Z","updatedAt":"2017-08-15T23:04:54.537Z","serviceBusEndpoint":"https://azureeventgridause.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliaskpunb5qmw2gwu5h7snjaqdtkq2pn3hxfwodkt3krnjo23u7qvuwbnkp7m6/providers/Microsoft.EventHub/namespaces/eh-nscliv6m3lpg5t5yj","name":"eh-nscliv6m3lpg5t5yj","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliv6m3lpg5t5yj","createdAt":"2018-01-11T01:16:44.9Z","updatedAt":"2018-01-11T01:30:32.89Z","serviceBusEndpoint":"https://eh-nscliv6m3lpg5t5yj.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasluiavtblxmux2kd6hennir4fqnbacd5gopkeuj6imcogpn5nfhvfx7bpkl/providers/Microsoft.EventHub/namespaces/eh-nscli45rm5qzdbmin","name":"eh-nscli45rm5qzdbmin","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli45rm5qzdbmin","createdAt":"2018-01-09T03:33:05.463Z","updatedAt":"2018-01-09T03:42:13.513Z","serviceBusEndpoint":"https://eh-nscli45rm5qzdbmin.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasfbbatpr2evcnfafcvf4ss7zyy6qdqbhc5mbsalcb63gfwbjhukcicv6b3q/providers/Microsoft.EventHub/namespaces/eh-nsclin6wxggktaxhn","name":"eh-nsclin6wxggktaxhn","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclin6wxggktaxhn","createdAt":"2018-01-16T23:36:27.027Z","updatedAt":"2018-01-16T23:41:09.587Z","serviceBusEndpoint":"https://eh-nsclin6wxggktaxhn.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasu6lcs66vwhtxj4d62fqcdlkqt3yotasky4m7lybezc63e43c4kxu6ppp3h/providers/Microsoft.EventHub/namespaces/eh-nscliz2kdrglpwnre","name":"eh-nscliz2kdrglpwnre","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliz2kdrglpwnre","createdAt":"2018-01-17T03:32:34.083Z","updatedAt":"2018-01-17T03:46:17.77Z","serviceBusEndpoint":"https://eh-nscliz2kdrglpwnre.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManageeastus/providers/Microsoft.EventHub/namespaces/azureeventgriduse","name":"azureeventgriduse","type":"Microsoft.EventHub/Namespaces","location":"East + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgriduse","createdAt":"2017-06-14T18:15:46.113Z","updatedAt":"2017-06-14T22:06:10.537Z","serviceBusEndpoint":"https://azureeventgriduse.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagecentralus/providers/Microsoft.EventHub/namespaces/azureeventgridusc","name":"azureeventgridusc","type":"Microsoft.EventHub/Namespaces","location":"Central + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridusc","createdAt":"2017-06-14T17:48:58.46Z","updatedAt":"2017-08-17T17:29:13.593Z","serviceBusEndpoint":"https://azureeventgridusc.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagewestus/providers/Microsoft.EventHub/namespaces/azureeventgridusw","name":"azureeventgridusw","type":"Microsoft.EventHub/Namespaces","location":"West + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridusw","createdAt":"2017-06-14T20:50:37.913Z","updatedAt":"2017-08-18T02:02:25.713Z","serviceBusEndpoint":"https://azureeventgridusw.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eg-nok1-usw2/providers/Microsoft.EventHub/namespaces/eg-nok1-usw2-eh-001","name":"eg-nok1-usw2-eh-001","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":20,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eg-nok1-usw2-eh-001","createdAt":"2017-12-27T23:21:04.793Z","updatedAt":"2017-12-27T23:21:28.457Z","serviceBusEndpoint":"https://eg-nok1-usw2-eh-001.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.EventHub/namespaces/kalstest","name":"kalstest","type":"Microsoft.EventHub/Namespaces","location":"West + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:kalstest","createdAt":"2017-09-23T00:51:45.243Z","updatedAt":"2017-09-23T00:53:04.39Z","serviceBusEndpoint":"https://kalstest.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasrdwk3qo25uvmozoy46edwk5dxzoyevdhfg6dknv2qmsgo47phzgttwpaky/providers/Microsoft.EventHub/namespaces/eh-nsclihlp7wulxevqi","name":"eh-nsclihlp7wulxevqi","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclihlp7wulxevqi","createdAt":"2018-01-17T03:16:45.66Z","updatedAt":"2018-01-17T03:20:19.66Z","serviceBusEndpoint":"https://eh-nsclihlp7wulxevqi.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTests/providers/Microsoft.EventHub/namespaces/TestingIgnite","name":"TestingIgnite","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:testingignite","createdAt":"2017-09-22T19:56:29.517Z","updatedAt":"2017-09-22T19:58:02.333Z","serviceBusEndpoint":"https://TestingIgnite.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliash6srcvrszaufw5liurq6vjxjgylz2ehpxjmnpaujh2fievbmshaeckggfg/providers/Microsoft.EventHub/namespaces/eh-nsclisz7d4nkm5pm4","name":"eh-nsclisz7d4nkm5pm4","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclisz7d4nkm5pm4","createdAt":"2018-01-10T23:12:14.507Z","updatedAt":"2018-01-10T23:26:27.68Z","serviceBusEndpoint":"https://eh-nsclisz7d4nkm5pm4.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasf5s5nkcheqjmc2mzn75m4snwj2wigrjvsqzse5ppwzn7si5ect3tsrravj/providers/Microsoft.EventHub/namespaces/eh-nsclinv3fa4okkwwm","name":"eh-nsclinv3fa4okkwwm","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclinv3fa4okkwwm","createdAt":"2018-01-17T00:57:49.527Z","updatedAt":"2018-01-17T01:01:34.373Z","serviceBusEndpoint":"https://eh-nsclinv3fa4okkwwm.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasfbbatpr2evcnfafcvf4ss7zyy6qdqbhc5mbsalcb63gfwbjhukcicv6b3q/providers/Microsoft.EventHub/namespaces/eh-nsclixl2fuhach6d3","name":"eh-nsclixl2fuhach6d3","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclixl2fuhach6d3","createdAt":"2018-01-16T23:37:31.573Z","updatedAt":"2018-01-16T23:41:10.95Z","serviceBusEndpoint":"https://eh-nsclixl2fuhach6d3.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias2ent77voy7rwbiswwiop34bey35mxim3qb5qvzpligs53ynxgg7m6ukfx4/providers/Microsoft.EventHub/namespaces/eh-nscli5zoh2t65mkrw","name":"eh-nscli5zoh2t65mkrw","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli5zoh2t65mkrw","createdAt":"2018-01-17T00:13:15.48Z","updatedAt":"2018-01-17T00:18:46.563Z","serviceBusEndpoint":"https://eh-nscli5zoh2t65mkrw.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasuabxoisqt5ghyuwgudrymd4wwztlqyh6poga4g3w54qnzu3z7robkl6t5q/providers/Microsoft.EventHub/namespaces/eh-nsclivwtrpelsn2fo","name":"eh-nsclivwtrpelsn2fo","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclivwtrpelsn2fo","createdAt":"2018-01-16T02:43:45.98Z","updatedAt":"2018-01-16T02:47:51.253Z","serviceBusEndpoint":"https://eh-nsclivwtrpelsn2fo.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasnjnzdt2jvteq55ydkxnizbptzi46kbxpu5n4xr7ax3wadiiqaow4xcziwa/providers/Microsoft.EventHub/namespaces/eh-nscliy4ku454f37xv","name":"eh-nscliy4ku454f37xv","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliy4ku454f37xv","createdAt":"2018-01-09T23:06:02.247Z","updatedAt":"2018-01-09T23:14:28.787Z","serviceBusEndpoint":"https://eh-nscliy4ku454f37xv.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps2924/providers/Microsoft.EventHub/namespaces/PSTestEH-ps4898","name":"PSTestEH-ps4898","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps4898","createdAt":"2017-11-30T18:27:57.223Z","updatedAt":"2017-11-30T18:28:19.807Z","serviceBusEndpoint":"https://PSTestEH-ps4898.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps5541/providers/Microsoft.EventHub/namespaces/PSTestEH-ps2672","name":"PSTestEH-ps2672","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps2672","createdAt":"2017-11-30T00:23:13.857Z","updatedAt":"2017-11-30T00:24:53.06Z","serviceBusEndpoint":"https://PSTestEH-ps2672.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eventgridmonitoring/providers/Microsoft.EventHub/namespaces/eventgridmonitoring","name":"eventgridmonitoring","type":"Microsoft.EventHub/Namespaces","location":"Central + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventgridmonitoring","createdAt":"2017-05-19T19:10:45.52Z","updatedAt":"2017-08-17T17:27:41.813Z","serviceBusEndpoint":"https://eventgridmonitoring.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasnjnzdt2jvteq55ydkxnizbptzi46kbxpu5n4xr7ax3wadiiqaow4xcziwa/providers/Microsoft.EventHub/namespaces/eh-nscliyvopwjqx7kwg","name":"eh-nscliyvopwjqx7kwg","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliyvopwjqx7kwg","createdAt":"2018-01-09T23:04:29.22Z","updatedAt":"2018-01-09T23:14:28.147Z","serviceBusEndpoint":"https://eh-nscliyvopwjqx7kwg.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias2mv7ov6fsgikow24xobpownip4z7mijgbqjghkrz5zav4njw5lcf6lf7px/providers/Microsoft.EventHub/namespaces/eh-nscli32h5uu2ipxcj","name":"eh-nscli32h5uu2ipxcj","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli32h5uu2ipxcj","createdAt":"2018-01-16T22:11:53.21Z","updatedAt":"2018-01-16T22:17:04.39Z","serviceBusEndpoint":"https://eh-nscli32h5uu2ipxcj.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManageeastus/providers/Microsoft.EventHub/namespaces/azureeventgrid01use","name":"azureeventgrid01use","type":"Microsoft.EventHub/Namespaces","location":"East + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgrid01use","createdAt":"2017-06-14T17:59:32.16Z","updatedAt":"2017-06-14T17:59:55.023Z","serviceBusEndpoint":"https://azureeventgrid01use.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasxdyxbx75xbfdhtkchxrdnk7drdb7lusuik742vmrirdnr5x5durtbrgvno/providers/Microsoft.EventHub/namespaces/eh-nscli46glcvwydevl","name":"eh-nscli46glcvwydevl","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli46glcvwydevl","createdAt":"2018-01-09T04:38:46.01Z","updatedAt":"2018-01-09T04:52:27.417Z","serviceBusEndpoint":"https://eh-nscli46glcvwydevl.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Storage-WestUS/providers/Microsoft.EventHub/namespaces/testnamespace099","name":"testnamespace099","type":"Microsoft.EventHub/Namespaces","location":"West + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:testnamespace099","createdAt":"2017-05-15T23:10:02.34Z","updatedAt":"2017-08-18T01:50:43.933Z","serviceBusEndpoint":"https://testnamespace099.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Storage-WestUS/providers/Microsoft.EventHub/namespaces/testnamespace098","name":"testnamespace098","type":"Microsoft.EventHub/Namespaces","location":"West + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:testnamespace098","createdAt":"2017-05-15T22:21:57.81Z","updatedAt":"2017-08-18T02:04:18.8Z","serviceBusEndpoint":"https://testnamespace098.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps3336/providers/Microsoft.EventHub/namespaces/PSTestEH-ps2442","name":"PSTestEH-ps2442","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps2442","createdAt":"2017-11-29T19:38:12.597Z","updatedAt":"2017-11-29T19:38:39.907Z","serviceBusEndpoint":"https://PSTestEH-ps2442.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Storage-WestUS/providers/Microsoft.EventHub/namespaces/Testinginflate","name":"Testinginflate","type":"Microsoft.EventHub/Namespaces","location":"West + US","tags":{},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":10,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:testinginflate","createdAt":"2017-06-27T23:39:41.647Z","updatedAt":"2017-08-18T01:54:42.67Z","serviceBusEndpoint":"https://Testinginflate.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagewesteurope/providers/Microsoft.EventHub/namespaces/azureeventgridweu","name":"azureeventgridweu","type":"Microsoft.EventHub/Namespaces","location":"West + Europe","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridweu","createdAt":"2017-06-14T20:52:52.023Z","updatedAt":"2017-08-10T01:30:49.39Z","serviceBusEndpoint":"https://azureeventgridweu.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasf5s5nkcheqjmc2mzn75m4snwj2wigrjvsqzse5ppwzn7si5ect3tsrravj/providers/Microsoft.EventHub/namespaces/eh-nsclihjhv5jcmrabz","name":"eh-nsclihjhv5jcmrabz","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclihjhv5jcmrabz","createdAt":"2018-01-17T00:57:15.01Z","updatedAt":"2018-01-17T01:01:34.577Z","serviceBusEndpoint":"https://eh-nsclihjhv5jcmrabz.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliascky7msnikdvg7monugngsco6s44dsylbg6ubkzabkjg3pq457pyq7kmcqu/providers/Microsoft.EventHub/namespaces/eh-nsclidyhusj34vxzm","name":"eh-nsclidyhusj34vxzm","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclidyhusj34vxzm","createdAt":"2018-01-16T03:25:56.76Z","updatedAt":"2018-01-16T03:29:32.193Z","serviceBusEndpoint":"https://eh-nsclidyhusj34vxzm.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Basic","tier":"Basic","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GridToHubResourceGroup/providers/Microsoft.EventHub/namespaces/GridToHubTest","name":"GridToHubTest","type":"Microsoft.EventHub/Namespaces","location":"West + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:gridtohubtest","createdAt":"2017-07-05T18:59:46.357Z","updatedAt":"2017-08-18T02:03:04.213Z","serviceBusEndpoint":"https://GridToHubTest.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":0},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eg-hitesh-perf/providers/Microsoft.EventHub/namespaces/eventgrid-eventhub-ussc","name":"eventgrid-eventhub-ussc","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventgrid-eventhub-ussc","createdAt":"2017-05-25T20:36:13.997Z","updatedAt":"2017-05-25T20:36:37.893Z","serviceBusEndpoint":"https://eventgrid-eventhub-ussc.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManageeastasia/providers/Microsoft.EventHub/namespaces/azureeventgridae","name":"azureeventgridae","type":"Microsoft.EventHub/Namespaces","location":"East + Asia","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridae","createdAt":"2017-06-14T20:56:44.477Z","updatedAt":"2017-08-02T01:08:31.437Z","serviceBusEndpoint":"https://azureeventgridae.servicebus.windows.net:443/","status":"Active"}}]}'} + headers: + cache-control: [no-cache] + content-length: ['36497'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:17:28 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces?api-version=2017-04-01 + response: + body: {string: '{"value":[{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:17:17.173Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}]}'} + headers: + cache-control: [no-cache] + content-length: ['751'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:17:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"rights": ["Send"]}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace authorizationrule create] + Connection: [keep-alive] + Content-Length: ['36'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.EventHub/Namespaces/AuthorizationRules","location":"West + US 2","properties":{"rights":["Send"]}}'} + headers: + cache-control: [no-cache] + content-length: ['396'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:18:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace authorizationrule show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.EventHub/Namespaces/AuthorizationRules","location":"West + US 2","properties":{"rights":["Send"]}}'} + headers: + cache-control: [no-cache] + content-length: ['396'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:18:04 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace authorizationrule show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/RootManageSharedAccessKey?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/RootManageSharedAccessKey","name":"RootManageSharedAccessKey","type":"Microsoft.EventHub/Namespaces/AuthorizationRules","location":"West + US 2","properties":{"rights":["Listen","Manage","Send"]}}'} + headers: + cache-control: [no-cache] + content-length: ['424'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:18:06 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace authorizationrule keys list] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003/listKeys?api-version=2017-04-01 + response: + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=pMaPprJwii7sLiHjeQjYulDR878RTHnM7cb3vjqeNOM=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=UpcNWCDpeJX5YUIac0pbNiEKI4BWWLiC45MSvcPFrSI=","primaryKey":"pMaPprJwii7sLiHjeQjYulDR878RTHnM7cb3vjqeNOM=","secondaryKey":"UpcNWCDpeJX5YUIac0pbNiEKI4BWWLiC45MSvcPFrSI=","keyName":"cliAutho000003"}'} + headers: + cache-control: [no-cache] + content-length: ['536'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:18:08 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: '{"keyType": "PrimaryKey"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace authorizationrule keys renew] + Connection: [keep-alive] + Content-Length: ['25'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 + response: + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=eqWVdPzuz6nLBb2MCy6I5dxkfpLWXeZAku81ABd4k7o=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=UpcNWCDpeJX5YUIac0pbNiEKI4BWWLiC45MSvcPFrSI=","primaryKey":"eqWVdPzuz6nLBb2MCy6I5dxkfpLWXeZAku81ABd4k7o=","secondaryKey":"UpcNWCDpeJX5YUIac0pbNiEKI4BWWLiC45MSvcPFrSI=","keyName":"cliAutho000003"}'} + headers: + cache-control: [no-cache] + content-length: ['536'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:18:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: '{"keyType": "SecondaryKey"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace authorizationrule keys renew] + Connection: [keep-alive] + Content-Length: ['27'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 + response: + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=eqWVdPzuz6nLBb2MCy6I5dxkfpLWXeZAku81ABd4k7o=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=jJK31DWGCwVZfK/Lk3SPbP9meGfvSZs6Er3LdEQY2+I=","primaryKey":"eqWVdPzuz6nLBb2MCy6I5dxkfpLWXeZAku81ABd4k7o=","secondaryKey":"jJK31DWGCwVZfK/Lk3SPbP9meGfvSZs6Er3LdEQY2+I=","keyName":"cliAutho000003"}'} + headers: + cache-control: [no-cache] + content-length: ['536'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Jan 2018 18:18:43 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace authorizationrule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:19:00 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:19:02 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:19:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.26] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_eh_namespace000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Jan 2018 18:19:35 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZOQU1FU1BBQ0VZTlNBRFVPMjM0V0FXRVhBWkhETnw0QjNCRDhGQzBENkYwQzk4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py b/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py new file mode 100644 index 00000000000..7f24f94aa0d --- /dev/null +++ b/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py @@ -0,0 +1,316 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# AZURE CLI EventHub - NAMESAPCE TEST DEFINITIONS + +import time + +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) + +from azext_eventhub.eventhub.models import ProvisioningStateDR + + +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + + +class EHNamespaceCURDScenarioTest(ScenarioTest): + @ResourceGroupPreparer(name_prefix='cli_test_eh_namespace') + def test_eh_namespace(self, resource_group): + self.kwargs.update({ + 'loc': 'westus2', + 'rg': resource_group, + 'namespacename': self.create_random_name(prefix='eventhubs-nscli', length=20), + 'tags': {'tag1: value1'}, + 'sku': 'Standard', + 'tier': 'Standard', + 'authoname': self.create_random_name(prefix='cliAutho', length=20), + 'defaultauthorizationrule': 'RootManageSharedAccessKey', + 'accessrights': 'Send', + 'primary': 'PrimaryKey', + 'secondary': 'SecondaryKey', + 'isautoinflateenabled': 'True', + 'maximumthroughputunits': 4 + }) + + # Check for the NameSpace name Availability + + self.cmd('eventhubs namespace exists --name {namespacename}', + checks=[self.check('nameAvailable', True)]) + + # Create Namespace + self.cmd('eventhubs namespace create --resource-group {rg} --name {namespacename} --location {loc} --tags {tags} --sku-name {sku} --sku-tier {tier} --is-auto-inflate-enabled {isautoinflateenabled} --maximum-throughput-units {maximumthroughputunits}', + checks=[self.check('sku.name', self.kwargs['sku'])]) + + # Get Created Namespace + self.cmd('eventhubs namespace show --resource-group {rg} --name {namespacename}', + checks=[self.check('sku.name', self.kwargs['sku'])]) + + # Get Created Namespace list by subscription + listnamespaceresult = self.cmd('eventhubs namespace list').output + self.assertGreater(len(listnamespaceresult), 0) + + # Get Created Namespace list by ResourceGroup + listnamespacebyresourcegroupresult = self.cmd('eventhubs namespace list --resource-group {rg}').output + self.assertGreater(len(listnamespacebyresourcegroupresult), 0) + + # Create Authoriazation Rule + self.cmd('eventhubs namespace authorizationrule create --resource-group {rg} --namespace-name {namespacename} --name {authoname} --access-rights {accessrights}', + checks=[self.check('name', self.kwargs['authoname'])]) + + # Get Authorization Rule + self.cmd('eventhubs namespace authorizationrule show --resource-group {rg} --namespace-name {namespacename} --name {authoname}', checks=[self.check('name', self.kwargs['authoname'])]) + + # Get Default Authorization Rule + self.cmd('eventhubs namespace authorizationrule show --resource-group {rg} --namespace-name {namespacename} --name {defaultauthorizationrule}', + checks=[self.check('name', self.kwargs['defaultauthorizationrule'])]) + + # Get Authorization Rule Listkeys + self.cmd('eventhubs namespace authorizationrule keys list --resource-group {rg} --namespace-name {namespacename} --name {authoname}') + + # Regeneratekeys - Primary + self.cmd( + 'eventhubs namespace authorizationrule keys renew --resource-group {rg} --namespace-name {namespacename} --name {authoname} --key-name {primary}') + + # Regeneratekeys - Secondary + self.cmd('eventhubs namespace authorizationrule keys renew --resource-group {rg} --namespace-name {namespacename} --name {authoname} --key-name {secondary}') + + # Delete AuthorizationRule + self.cmd('eventhubs namespace authorizationrule delete --resource-group {rg} --namespace-name {namespacename} --name {authoname}') + + # Delete Namespace list by ResourceGroup + self.cmd('eventhubs namespace delete --resource-group {rg} --name {namespacename}') + + @ResourceGroupPreparer(name_prefix='cli_test_eh_eventnhub') + def test_eh_eventhub(self, resource_group): + self.kwargs.update({ + 'loc': 'westus2', + 'rg': resource_group, + 'namespacename': self.create_random_name(prefix='eventhubs-nscli', length=20), + 'tags': {'tag1: value1', 'tag2: value2'}, + 'sku': 'Standard', + 'tier': 'Standard', + 'authoname': self.create_random_name(prefix='cliAutho', length=20), + 'defaultauthorizationrule': 'RootManageSharedAccessKey', + 'accessrights': 'Listen', + 'primary': 'PrimaryKey', + 'secondary': 'SecondaryKey', + 'eventhubname': self.create_random_name(prefix='eventhubs-eventhubcli', length=25), + 'eventhubauthoname': self.create_random_name(prefix='cliEventAutho', length=25), + 'isautoinflateenabled': 'True', + 'maximumthroughputunits': 4, + 'messageretentionindays': 4, + 'partitioncount': 4 + }) + + # Create Namespace + self.cmd('eventhubs namespace create --resource-group {rg} --name {namespacename} --location {loc} --tags {tags} --sku-name {sku} --sku-tier {tier} --is-auto-inflate-enabled {isautoinflateenabled} --maximum-throughput-units {maximumthroughputunits}', + checks=[self.check('sku.name', self.kwargs['sku'])]) + + # Get Created Namespace + self.cmd('eventhubs namespace show --resource-group {rg} --name {namespacename}', + checks=[self.check('sku.name', self.kwargs['sku'])]) + + # Create Eventhub + self.cmd('eventhubs eventhub create --resource-group {rg} --namespace-name {namespacename} --name {eventhubname}', checks=[self.check('name', self.kwargs['eventhubname'])]) + + # Get Eventhub + self.cmd('eventhubs eventhub show --resource-group {rg} --namespace-name {namespacename} --name {eventhubname}', checks=[self.check('name', self.kwargs['eventhubname'])]) + + # Eventhub List + listeventhub = self.cmd('eventhubs eventhub list --resource-group {rg} --namespace-name {namespacename}').output + self.assertGreater(len(listeventhub), 0) + + # Create Authoriazation Rule + self.cmd('eventhubs eventhub authorizationrule create --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {authoname} --access-rights {accessrights}', checks=[self.check('name', self.kwargs['authoname'])]) + + # Get Create Authorization Rule + self.cmd('eventhubs eventhub authorizationrule show --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {authoname}', checks=[self.check('name', self.kwargs['authoname'])]) + + # Get Authorization Rule Listkeys + self.cmd('eventhubs eventhub authorizationrule keys list --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {authoname}') + + # Regeneratekeys - Primary + regenrateprimarykeyresult = self.cmd('eventhubs eventhub authorizationrule keys renew --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {authoname} --key-name {primary}') + self.assertIsNotNone(regenrateprimarykeyresult) + + # Regeneratekeys - Secondary + regenratesecondarykeyresult = self.cmd('eventhubs eventhub authorizationrule keys renew --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {authoname} --key-name {secondary}') + self.assertIsNotNone(regenratesecondarykeyresult) + + # Delete Eventhub AuthorizationRule + self.cmd('eventhubs eventhub authorizationrule delete --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {authoname}') + + # Delete Eventhub + self.cmd('eventhubs eventhub delete --resource-group {rg} --namespace-name {namespacename} --name {eventhubname}') + + # Delete Namespace + self.cmd('eventhubs namespace delete --resource-group {rg} --name {namespacename}') + + + @ResourceGroupPreparer(name_prefix='cli_test_eh_consumergroup') + def test_eh_consumergroup(self, resource_group): + self.kwargs.update({ + 'loc': 'westus2', + 'rg': resource_group, + 'namespacename': self.create_random_name(prefix='eventhubs-nscli', length=20), + 'tags': {'tag1: value1', 'tag2: value2'}, + 'sku': 'Standard', + 'tier': 'Standard', + 'eventhubname': self.create_random_name(prefix='eventhubs-eventhubcli', length=25), + 'isautoinflateenabled': 'True', + 'maximumthroughputunits': 4, + 'consumergroupname': self.create_random_name(prefix='clicg', length=20), + 'usermetadata1': 'usermetadata', + 'usermetadata2': 'usermetadata-updated' + }) + + # Create Namespace + self.cmd('eventhubs namespace create --resource-group {rg} --name {namespacename} --location {loc} --tags {tags} --sku-name {sku} --sku-tier {tier} --is-auto-inflate-enabled {isautoinflateenabled} --maximum-throughput-units {maximumthroughputunits}', + checks=[self.check('sku.name', self.kwargs['sku'])]) + + # Get Created Namespace + self.cmd('eventhubs namespace show --resource-group {rg} --name {namespacename}', checks=[self.check('sku.name', self.kwargs['sku'])]) + + # Create Eventhub + self.cmd('eventhubs eventhub create --resource-group {rg} --namespace-name {namespacename} --name {eventhubname}', checks=[self.check('name', self.kwargs['eventhubname'])]) + + # Get Eventhub + self.cmd('eventhubs eventhub show --resource-group {rg} --namespace-name {namespacename} --name {eventhubname}', checks=[self.check('name', self.kwargs['eventhubname'])]) + + # Create ConsumerGroup + self.cmd('eventhubs consumergroup create --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {consumergroupname} --user-metadata {usermetadata1}', checks=[self.check('name', self.kwargs['consumergroupname'])]) + + # Get Consumer Group + self.cmd('eventhubs consumergroup show --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {consumergroupname}', checks=[self.check('name', self.kwargs['consumergroupname'])]) + + # Create/Update ConsumerGroup + self.cmd('eventhubs consumergroup create --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {consumergroupname} --user-metadata {usermetadata2}', checks=[self.check('userMetadata', self.kwargs['usermetadata2'])]) + + # Get ConsumerGroup List + listconsumergroup = self.cmd('eventhubs consumergroup list --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname}').output + self.assertGreater(len(listconsumergroup), 0) + + # Delete ConsumerGroup + self.cmd('eventhubs consumergroup delete --resource-group {rg} --namespace-name {namespacename} --event-hub-name {eventhubname} --name {consumergroupname}') + + # Delete Eventhub + self.cmd('eventhubs eventhub delete --resource-group {rg} --namespace-name {namespacename} --name {eventhubname}') + + # Delete Namespace + self.cmd('eventhubs namespace delete --resource-group {rg} --name {namespacename}') + + + @ResourceGroupPreparer(name_prefix='cli_test_eh_alias') + def test_eh_alias(self, resource_group): + self.kwargs.update({ + 'loc_south': 'SouthCentralUS', + 'loc_north': 'NorthCentralUS', + 'rg': resource_group, + 'namespacenameprimary': self.create_random_name(prefix='eh-nscli', length=20), + 'namespacenamesecondary': self.create_random_name(prefix='eh-nscli', length=20), + 'tags': {'tag1: value1', 'tag2: value2'}, + 'sku': 'Standard', + 'tier': 'Standard', + 'authoname': self.create_random_name(prefix='cliAutho', length=20), + 'defaultauthorizationrule': 'RootManageSharedAccessKey', + 'accessrights': 'Send', + 'primary': 'PrimaryKey', + 'secondary': 'SecondaryKey', + 'aliasname': self.create_random_name(prefix='cliAlias', length=20), + 'alternatename': self.create_random_name(prefix='cliAlter', length=20), + 'id': '', + 'test': '' + }) + + self.cmd('eventhubs namespace exists --name {namespacenameprimary}', + checks=[self.check('nameAvailable', True)]) + + # Create Namespace - Primary + self.cmd('eventhubs namespace create --resource-group {rg} --name {namespacenameprimary} --location {loc_south} --tags {tags} --sku-name {sku} --sku-tier {tier}', checks=[self.check('sku.name', self.kwargs['sku'])]) + + # Get Created Namespace - Primary + self.cmd('eventhubs namespace show --resource-group {rg} --name {namespacenameprimary}', checks=[self.check('sku.name', self.kwargs['sku'])]) + + # Create Namespace - Secondary + self.cmd('eventhubs namespace create --resource-group {rg} --name {namespacenamesecondary} --location {loc_north} --tags {tags} --sku-name {sku} --sku-tier {tier}', checks=[self.check('sku.name', self.kwargs['sku'])]) + + # Get Created Namespace - Secondary + getnamespace2result = self.cmd('eventhubs namespace show --resource-group {rg} --name {namespacenamesecondary}', checks=[self.check('sku.name', self.kwargs['sku'])]).get_output_in_json() + + # Create Authoriazation Rule + self.cmd('eventhubs namespace authorizationrule create --resource-group {rg} --namespace-name {namespacenameprimary} --name {authoname} --access-rights {accessrights}', checks=[self.check('name', self.kwargs['authoname'])]) + + partnernamespaceid = getnamespace2result['id'] + self.kwargs.update({'id': partnernamespaceid}) + # Get Create Authorization Rule + self.cmd('eventhubs namespace authorizationrule show --resource-group {rg} --namespace-name {namespacenameprimary} --name {authoname}', checks=[self.check('name', self.kwargs['authoname'])]) + + # CheckNameAvailability - Alias + + self.cmd('eventhubs georecovery-alias exists --resource-group {rg} --namespace-name {namespacenameprimary} --name {aliasname}', checks=[self.check('nameAvailable', True)]) + + # Create alias + self.cmd('eventhubs georecovery-alias create --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname} --partner-namespace {id}') + + # get alias - Primary + self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}') + + # get alias - Secondary + self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}') + + getaliasprimarynamespace = self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json() + + # Get Authorization Rule + self.cmd('eventhubs georecovery-alias authorizationrule show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname} --name {authoname}', checks=[self.check('name', self.kwargs['authoname'])]) + + # Get Default Authorization Rule + self.cmd('eventhubs georecovery-alias authorizationrule list --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}') + + # check for the Alias Provisioning succeeded + while getaliasprimarynamespace['provisioningState'] != ProvisioningStateDR.succeeded.value: + time.sleep(30) + getaliasprimarynamespace = self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json() + + # Break Pairing + self.cmd('eventhubs georecovery-alias break-pair --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}') + + getaliasafterbreak = self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json() + + # check for the Alias Provisioning succeeded + while getaliasafterbreak['provisioningState'] != ProvisioningStateDR.succeeded.value: + time.sleep(30) + getaliasafterbreak = self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json() + + # Create alias + self.cmd('eventhubs georecovery-alias create --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname} --partner-namespace {id}') + + getaliasaftercreate = self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json() + + # check for the Alias Provisioning succeeded + while getaliasaftercreate['provisioningState'] != ProvisioningStateDR.succeeded.value: + time.sleep(30) + getaliasaftercreate = self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenameprimary} --alias {aliasname}').get_output_in_json() + + # FailOver + self.cmd('eventhubs georecovery-alias fail-over --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}') + + getaliasafterfail = self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}').get_output_in_json() + + # check for the Alias Provisioning succeeded + while getaliasafterfail['provisioningState'] != ProvisioningStateDR.succeeded.value: + time.sleep(30) + getaliasafterfail = self.cmd('eventhubs georecovery-alias show --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}').get_output_in_json() + + # Delete Alias + self.cmd('eventhubs georecovery-alias delete --resource-group {rg} --namespace-name {namespacenamesecondary} --alias {aliasname}') + + time.sleep(30) + + # Delete Namespace - primary + self.cmd('eventhubs namespace delete --resource-group {rg} --name {namespacenameprimary}') + + # Delete Namespace - secondary + self.cmd('eventhubs namespace delete --resource-group {rg} --name {namespacenamesecondary}') diff --git a/src/eventhubs/setup.cfg b/src/eventhubs/setup.cfg new file mode 100644 index 00000000000..3c6e79cf31d --- /dev/null +++ b/src/eventhubs/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/src/eventhubs/setup.py b/src/eventhubs/setup.py new file mode 100644 index 00000000000..56040c2e650 --- /dev/null +++ b/src/eventhubs/setup.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from codecs import open +from setuptools import setup, find_packages + +VERSION = "0.0.1" + +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +setup( + name='eventhubs', + version=VERSION, + description='An Azure CLI Extension to manage Event Hubs resources', + long_description='An Azure CLI Extension to manage Event Hubs resources', + license='MIT', + author='Ajit Navasare', + author_email='v-ajnava@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions', + classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES +) From 53a0b6eb9634a795a06db821d0490140c09b7df4 Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Wed, 17 Jan 2018 11:02:08 -0800 Subject: [PATCH 02/10] fixed lint errors --- src/eventhubs/azext_eventhub/__init__.py | 1 + src/eventhubs/azext_eventhub/custom.py | 1 - src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/eventhubs/azext_eventhub/__init__.py b/src/eventhubs/azext_eventhub/__init__.py index d5071abf38b..3e520159a5d 100644 --- a/src/eventhubs/azext_eventhub/__init__.py +++ b/src/eventhubs/azext_eventhub/__init__.py @@ -10,6 +10,7 @@ from ._help import helps + class EventhubCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): diff --git a/src/eventhubs/azext_eventhub/custom.py b/src/eventhubs/azext_eventhub/custom.py index aff6c416c4a..b253d8e341d 100644 --- a/src/eventhubs/azext_eventhub/custom.py +++ b/src/eventhubs/azext_eventhub/custom.py @@ -13,7 +13,6 @@ from azext_eventhub.eventhub.models import (EHNamespace, Sku, Eventhub, CaptureDescription, Destination) - # Namespace Region def cli_namespace_create(client, resource_group_name, namespace_name, location, tags=None, sku='Standard', skutier=None, capacity=None, is_auto_inflate_enabled=None, maximum_throughput_units=None): return client.create_or_update(resource_group_name, namespace_name, EHNamespace(location, tags, diff --git a/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py b/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py index 7f24f94aa0d..94468189b2d 100644 --- a/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py +++ b/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py @@ -149,7 +149,6 @@ def test_eh_eventhub(self, resource_group): # Delete Namespace self.cmd('eventhubs namespace delete --resource-group {rg} --name {namespacename}') - @ResourceGroupPreparer(name_prefix='cli_test_eh_consumergroup') def test_eh_consumergroup(self, resource_group): self.kwargs.update({ @@ -202,7 +201,6 @@ def test_eh_consumergroup(self, resource_group): # Delete Namespace self.cmd('eventhubs namespace delete --resource-group {rg} --name {namespacename}') - @ResourceGroupPreparer(name_prefix='cli_test_eh_alias') def test_eh_alias(self, resource_group): self.kwargs.update({ From 02f438406f397e99000880fa30b55bd6f39253f4 Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Thu, 18 Jan 2018 14:35:40 -0800 Subject: [PATCH 03/10] Review Comments --- .github/CODEOWNERS | 2 +- src/eventhubs/azext_eventhub/_params.py | 97 +++-------- .../azext_eventhub/azext_metadata.json | 3 + .../recordings/latest/test_eh_alias.yaml | 156 ++++++++---------- .../latest/test_eh_consumergroup.yaml | 82 ++++----- .../recordings/latest/test_eh_eventhub.yaml | 76 ++++----- .../recordings/latest/test_eh_namespace.yaml | 66 ++++---- .../tests/test_eventhub_commands.py | 2 +- src/eventhubs/setup.py | 2 +- 9 files changed, 205 insertions(+), 281 deletions(-) create mode 100644 src/eventhubs/azext_eventhub/azext_metadata.json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0c7925c2e36..761d7a66228 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,4 +4,4 @@ /src/image-copy/ @tamirkamara -/src/eventhubs/ @tamirkamara +/src/eventhubs/ @v-ajnava diff --git a/src/eventhubs/azext_eventhub/_params.py b/src/eventhubs/azext_eventhub/_params.py index 9413d603e79..e6e8f219937 100644 --- a/src/eventhubs/azext_eventhub/_params.py +++ b/src/eventhubs/azext_eventhub/_params.py @@ -8,12 +8,15 @@ # pylint: disable=line-too-long def load_arguments_namespace(self, _): + with self.argument_context('eventhubs') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + with self.argument_context('eventhubs namespace exists') as c: - c.argument('namespace_name', options_list=['--name'], help='name of the Namespace') + c.argument('namespace_name', options_list=['--name', '-n'], help='name of the Namespace') with self.argument_context('eventhubs namespace create') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--name'], help='Name of the Namespace') + c.argument('namespace_name', options_list=['--name', '-n'], help='name of the Namespace') c.argument('tags', options_list=['--tags', '-t'], arg_type=tags_type, help='tags for the namespace in Key value pair format') c.argument('sku', options_list=['--sku-name'], arg_type=get_enum_type(['Basic', 'Standard'])) c.argument('location', options_list=['--location', '-l'], help='Location') @@ -25,18 +28,12 @@ def load_arguments_namespace(self, _): # region Namespace Get for scope in ['eventhubs namespace show', 'eventhubs namespace delete']: with self.argument_context(scope) as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) c.argument('namespace_name', options_list=['--name', '-n'], help='name of the Namespace') - with self.argument_context('eventhubs namespace list') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - # region Namespace Authorizationrule for scope in ['eventhubs namespace authorizationrule', 'eventhubs namespace authorizationrule keys list', 'eventhubs namespace authorizationrule keys renew']: with self.argument_context(scope) as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') - c.argument('authorization_rule_name', options_list=['--name'], help='name of the Namespace AuthorizationRule') + c.argument('authorization_rule_name', options_list=['--name', '-n'], help='name of the Namespace AuthorizationRule') with self.argument_context('eventhubs namespace authorizationrule create') as c: c.argument('accessrights', options_list=['--access-rights'], @@ -48,10 +45,10 @@ def load_arguments_namespace(self, _): # region - Eventhub Create def load_arguments_eventhub(self, _): + with self.argument_context('eventhubs eventhub') as c: + c.argument('event_hub_name', options_list=['--name', '-n'], help='Name of Eventhub') + with self.argument_context('eventhubs eventhub create') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') - c.argument('event_hub_name', options_list=['--name', '-n'], help='Name of Evnethub') c.argument('message_retention_in_days', options_list=['--message-retention-in-days'], type=int, help='Number of days to retain the events for this Event Hub, value should be 1 to 7 days') c.argument('partition_count', options_list=['--partition-count'], type=int, help='Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.') c.argument('status', options_list=['--status'], arg_type=get_enum_type(['Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'])) @@ -64,23 +61,10 @@ def load_arguments_eventhub(self, _): c.argument('blob_container', options_list=['--blob-container'], help='Blob container Name') c.argument('archive_name_format', options_list=['--archive-name-format'], help='Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order') - # region EventHub Get - for scope in ['eventhubs eventhub show', 'eventhubs eventhub delete']: - with self.argument_context(scope) as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') - c.argument('event_hub_name', options_list=['--name', '-n'], help='EventHub Name') - - # region EventHub Get - with self.argument_context('eventhubs eventhub list') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') - # region EventHub Authorizationrule for scope in ['eventhubs eventhub authorizationrule', 'eventhubs eventhub authorizationrule keys list', 'eventhubs eventhub authorizationrule keys renew']: with self.argument_context(scope) as c: - c.argument('authorization_rule_name', options_list=['--name'], help='name of the EventHub AuthorizationRule') - c.argument('namespace', options_list=['--namespace-name'], help='name of the Namespace') + c.argument('authorization_rule_name', options_list=['--name', '-n'], help='name of the EventHub AuthorizationRule') c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the EventHub') with self.argument_context('eventhubs eventhub authorizationrule create') as c: @@ -92,68 +76,29 @@ def load_arguments_eventhub(self, _): # - ConsumerGroup Region def load_arguments_consumergroup(self, _): - with self.argument_context('eventhubs consumergroup create') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + with self.argument_context('eventhubs consumergroup') as c: c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the Eventhub') c.argument('consumer_group_name', options_list=['--name', '-n'], help='Name of ConsumerGroup') - c.argument('user_metadata', options_list=['--user-metadata'], help='Usermetadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.') - # region ConsumerGroup Get - for scope in ['eventhubs consumergroup show', 'eventhubs consumergroup delete']: - with self.argument_context(scope) as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') - c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the EventHub') - c.argument('consumer_group_name', options_list=['--name', '-n'], help='Name of ConsumerGroup') + with self.argument_context('eventhubs consumergroup create') as c: + c.argument('user_metadata', options_list=['--user-metadata'], help='Usermetadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.') with self.argument_context('eventhubs consumergroup list') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the EventHub') # : Region def load_arguments_geodr(self, _): - with self.argument_context('eventhubs georecovery-alias exists') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') - c.argument('name', options_list=['--name'], - help='Name of the Geo Recovery Configs - Alias to check availability') - - with self.argument_context('eventhubs georecovery-alias create') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + with self.argument_context('eventhubs georecovery-alias') as c: c.argument('alias', options_list=['--alias'], help='Name of the Alias (Disaster Recovery)') - c.argument('partner_namespace', options_list=['--partner-namespace'], - help='ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing') - c.argument('alternate_name', options_list=['--alternate-name'], - help='Alternate Name for the Alias, when the Namespace name and Alias name are same') - for scope in ['eventhubs georecovery-alias show', 'eventhubs georecovery-alias delete']: - with self.argument_context(scope) as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') - c.argument('alias', options_list=['--alias'], help='Name of the Alias (Disaster Recovery)') - - with self.argument_context('eventhubs georecovery-alias list') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], help='name of the Namespace') + with self.argument_context('eventhubs georecovery-alias exists') as c: + c.argument('name', options_list=['--name', '-n'], help='Name of the Geo Recovery Configs - Alias to check availability') - for scope in ['eventhubs georecovery-alias break-pair', 'eventhubs georecovery-alias fail-over', 'eventhubs georecovery-alias authorizationrule list']: - with self.argument_context(scope)as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], - help='name of the Namespace') - c.argument('alias', options_list=['--alias'], - help='Name of the Alias (Disaster Recovery)') + with self.argument_context('eventhubs georecovery-alias create') as c: + c.argument('partner_namespace', options_list=['--partner-namespace'], help='ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing') + c.argument('alternate_name', options_list=['--alternate-name'], help='Alternate Name for the Alias, when the Namespace name and Alias name are same') for scope in ['eventhubs georecovery-alias authorizationrule show', 'eventhubs georecovery-alias authorizationrule keys lists']: with self.argument_context(scope)as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], - help='name of the Namespace') - c.argument('alias', options_list=['--alias'], - help='Name of the Alias (Disaster Recovery)') - c.argument('authorization_rule_name', options_list=['--name'], - help='name of the Namespace AuthorizationRule') + c.argument('authorization_rule_name', options_list=['--name', '-n'], help='name of the Namespace AuthorizationRule') diff --git a/src/eventhubs/azext_eventhub/azext_metadata.json b/src/eventhubs/azext_eventhub/azext_metadata.json new file mode 100644 index 00000000000..bbe67260f34 --- /dev/null +++ b/src/eventhubs/azext_eventhub/azext_metadata.json @@ -0,0 +1,3 @@ +{ + "azext.minCliCoreVersion": "2.0.24" +} \ No newline at end of file diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml index 5f6b025a991..c76acfebc68 100644 --- a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml @@ -20,7 +20,7 @@ interactions: cache-control: [no-cache] content-length: ['328'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:01:43 GMT'] + date: ['Thu, 18 Jan 2018 21:40:29 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -46,7 +46,7 @@ interactions: cache-control: [no-cache] content-length: ['53'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:01:45 GMT'] + date: ['Thu, 18 Jan 2018 21:40:30 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -54,7 +54,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: '{"location": "SouthCentralUS", "tags": {"{tag2: value2,": "", "tag1: value1}": @@ -73,12 +73,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","name":"eh-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"South - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-17T18:01:46.503Z","updatedAt":"2018-01-17T18:01:46.503Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-18T21:40:31.743Z","updatedAt":"2018-01-18T21:40:31.743Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] content-length: ['768'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:01:47 GMT'] + date: ['Thu, 18 Jan 2018 21:40:32 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -103,12 +103,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","name":"eh-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"South - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-17T18:01:46.503Z","updatedAt":"2018-01-17T18:02:12.243Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-18T21:40:31.743Z","updatedAt":"2018-01-18T21:40:55.253Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] content-length: ['766'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:02:17 GMT'] + date: ['Thu, 18 Jan 2018 21:41:03 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -132,12 +132,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","name":"eh-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"South - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-17T18:01:46.503Z","updatedAt":"2018-01-17T18:02:12.243Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-18T21:40:31.743Z","updatedAt":"2018-01-18T21:40:55.253Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] content-length: ['766'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:02:20 GMT'] + date: ['Thu, 18 Jan 2018 21:41:05 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -163,12 +163,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","name":"eh-nscli000003","type":"Microsoft.EventHub/Namespaces","location":"North - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-17T18:02:21.723Z","updatedAt":"2018-01-17T18:02:21.723Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Activating"}}'} + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-18T21:41:06.15Z","updatedAt":"2018-01-18T21:41:06.15Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] - content-length: ['768'] + content-length: ['766'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:02:22 GMT'] + date: ['Thu, 18 Jan 2018 21:41:07 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -176,7 +176,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -193,12 +193,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","name":"eh-nscli000003","type":"Microsoft.EventHub/Namespaces","location":"North - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-17T18:02:21.723Z","updatedAt":"2018-01-17T18:02:49.327Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-18T21:41:06.15Z","updatedAt":"2018-01-18T21:41:34.093Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['766'] + content-length: ['765'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:02:52 GMT'] + date: ['Thu, 18 Jan 2018 21:41:37 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -222,12 +222,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","name":"eh-nscli000003","type":"Microsoft.EventHub/Namespaces","location":"North - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-17T18:02:21.723Z","updatedAt":"2018-01-17T18:02:49.327Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-18T21:41:06.15Z","updatedAt":"2018-01-18T21:41:34.093Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['766'] + content-length: ['765'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:02:54 GMT'] + date: ['Thu, 18 Jan 2018 21:41:40 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -257,7 +257,7 @@ interactions: cache-control: [no-cache] content-length: ['403'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:03:27 GMT'] + date: ['Thu, 18 Jan 2018 21:42:12 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -265,7 +265,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -287,7 +287,7 @@ interactions: cache-control: [no-cache] content-length: ['403'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:03:29 GMT'] + date: ['Thu, 18 Jan 2018 21:42:14 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -316,7 +316,7 @@ interactions: cache-control: [no-cache] content-length: ['38'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:03:31 GMT'] + date: ['Thu, 18 Jan 2018 21:42:15 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -324,7 +324,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: 'b''b\''{"properties": {"partnerNamespace": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003"}}\''''' @@ -346,7 +346,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:04:05 GMT'] + date: ['Thu, 18 Jan 2018 21:42:49 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -354,7 +354,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -375,7 +375,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:04:06 GMT'] + date: ['Thu, 18 Jan 2018 21:42:50 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -403,7 +403,7 @@ interactions: cache-control: [no-cache] content-length: ['669'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:04:07 GMT'] + date: ['Thu, 18 Jan 2018 21:42:52 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -431,7 +431,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:04:08 GMT'] + date: ['Thu, 18 Jan 2018 21:42:53 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -460,7 +460,7 @@ interactions: cache-control: [no-cache] content-length: ['448'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:04:09 GMT'] + date: ['Thu, 18 Jan 2018 21:42:55 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -490,7 +490,7 @@ interactions: cache-control: [no-cache] content-length: ['937'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:04:11 GMT'] + date: ['Thu, 18 Jan 2018 21:42:57 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -518,7 +518,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:04:43 GMT'] + date: ['Thu, 18 Jan 2018 21:43:29 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -546,7 +546,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:05:14 GMT'] + date: ['Thu, 18 Jan 2018 21:43:59 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -574,7 +574,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:05:46 GMT'] + date: ['Thu, 18 Jan 2018 21:44:31 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -602,7 +602,7 @@ interactions: cache-control: [no-cache] content-length: ['668'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:06:17 GMT'] + date: ['Thu, 18 Jan 2018 21:45:02 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -630,13 +630,13 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:06:19 GMT'] + date: ['Thu, 18 Jan 2018 21:45:03 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -657,7 +657,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:06:19 GMT'] + date: ['Thu, 18 Jan 2018 21:45:05 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -685,7 +685,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:06:52 GMT'] + date: ['Thu, 18 Jan 2018 21:45:36 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -713,7 +713,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:07:22 GMT'] + date: ['Thu, 18 Jan 2018 21:46:07 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -741,7 +741,7 @@ interactions: cache-control: [no-cache] content-length: ['479'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:07:55 GMT'] + date: ['Thu, 18 Jan 2018 21:46:38 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -770,7 +770,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:08:12 GMT'] + date: ['Thu, 18 Jan 2018 21:46:55 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -778,7 +778,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -799,7 +799,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:08:13 GMT'] + date: ['Thu, 18 Jan 2018 21:46:57 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -827,7 +827,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:08:51 GMT'] + date: ['Thu, 18 Jan 2018 21:47:28 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -855,7 +855,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:09:22 GMT'] + date: ['Thu, 18 Jan 2018 21:48:00 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -883,7 +883,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:09:53 GMT'] + date: ['Thu, 18 Jan 2018 21:48:31 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -911,7 +911,7 @@ interactions: cache-control: [no-cache] content-length: ['668'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:10:26 GMT'] + date: ['Thu, 18 Jan 2018 21:49:02 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -939,7 +939,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:10:27 GMT'] + date: ['Thu, 18 Jan 2018 21:49:04 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -966,7 +966,7 @@ interactions: cache-control: [no-cache] content-length: ['669'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:10:29 GMT'] + date: ['Thu, 18 Jan 2018 21:49:05 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -994,7 +994,7 @@ interactions: cache-control: [no-cache] content-length: ['669'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:11:00 GMT'] + date: ['Thu, 18 Jan 2018 21:49:36 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -1022,7 +1022,7 @@ interactions: cache-control: [no-cache] content-length: ['669'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:11:32 GMT'] + date: ['Thu, 18 Jan 2018 21:50:07 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -1050,7 +1050,7 @@ interactions: cache-control: [no-cache] content-length: ['479'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:12:03 GMT'] + date: ['Thu, 18 Jan 2018 21:50:39 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -1078,7 +1078,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:12:05 GMT'] + date: ['Thu, 18 Jan 2018 21:50:39 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -1105,14 +1105,14 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:12:36 GMT'] + date: ['Thu, 18 Jan 2018 21:51:11 GMT'] expires: ['-1'] location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/operationresults/eh-nscli000002?api-version=2017-04-01'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 202, message: Accepted} - request: body: null @@ -1132,7 +1132,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:13:07 GMT'] + date: ['Thu, 18 Jan 2018 21:51:42 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -1154,44 +1154,20 @@ interactions: method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 response: - body: {string: ''} - headers: - cache-control: [no-cache] - content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:13:09 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/operationresults/eh-nscli000003?api-version=2017-04-01'] - pragma: [no-cache] - server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] - server-sb: [Service-Bus-Resource-Provider/SN1] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [eventhubs namespace delete] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 - msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/operationresults/eh-nscli000003?api-version=2017-04-01 - response: - body: {string: ''} + body: {string: '{"error":{"message":"Namespace provisioning in transition. CorrelationId: + 2727e7b9-2bbf-4281-92ca-9280b8797e07","code":"Conflict"}}'} headers: cache-control: [no-cache] - content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:13:40 GMT'] + content-length: ['131'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Jan 2018 21:51:44 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - status: {code: 200, message: OK} + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 409, message: Conflict} - request: body: null headers: @@ -1212,9 +1188,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:13:42 GMT'] + date: ['Thu, 18 Jan 2018 21:51:46 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZBTElBU0dYREJURkhLVkpUTkhaSENZQ1FMU0I1VnxFQzlCODUxRUNFRTdGN0NDLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZBTElBUzZURllQRlU0WVhWVzdONDQ2MlhNTTZQSnw2QTVGOTM0QUJFMjk1QkE0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-ratelimit-remaining-subscription-writes: ['1199'] diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml index 58909853ac0..917a34dc16e 100644 --- a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml @@ -20,11 +20,11 @@ interactions: cache-control: [no-cache] content-length: ['328'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:13:45 GMT'] + date: ['Thu, 18 Jan 2018 21:51:49 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: '{"location": "westus2", "tags": {"{tag2: value2,": "", "tag1: value1}": @@ -44,12 +44,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:13:46.877Z","updatedAt":"2018-01-17T18:13:46.877Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:51:49.77Z","updatedAt":"2018-01-18T21:51:49.77Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] - content-length: ['760'] + content-length: ['758'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:13:47 GMT'] + date: ['Thu, 18 Jan 2018 21:51:50 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -57,7 +57,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: body: null @@ -74,12 +74,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:13:46.877Z","updatedAt":"2018-01-17T18:14:14.713Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:51:49.77Z","updatedAt":"2018-01-18T21:52:16.077Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['758'] + content-length: ['757'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:14:17 GMT'] + date: ['Thu, 18 Jan 2018 21:52:20 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -103,12 +103,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:13:46.877Z","updatedAt":"2018-01-17T18:14:14.713Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:51:49.77Z","updatedAt":"2018-01-18T21:52:16.077Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['758'] + content-length: ['757'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:14:19 GMT'] + date: ['Thu, 18 Jan 2018 21:52:23 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -133,12 +133,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003","name":"eventhubs-eventhubcli000003","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:14:22.233Z","updatedAt":"2018-01-17T18:14:25.327Z","partitionIds":["0","1","2","3"]}}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:52:26.167Z","updatedAt":"2018-01-18T21:52:33.68Z","partitionIds":["0","1","2","3"]}}'} headers: cache-control: [no-cache] - content-length: ['545'] + content-length: ['544'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:14:26 GMT'] + date: ['Thu, 18 Jan 2018 21:52:34 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -146,7 +146,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: body: null @@ -163,12 +163,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003","name":"eventhubs-eventhubcli000003","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:14:22.233","updatedAt":"2018-01-17T18:14:25.327","partitionIds":["0","1","2","3"]}}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:52:26.167","updatedAt":"2018-01-18T21:52:33.68","partitionIds":["0","1","2","3"]}}'} headers: cache-control: [no-cache] - content-length: ['543'] + content-length: ['542'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:14:27 GMT'] + date: ['Thu, 18 Jan 2018 21:52:36 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -193,12 +193,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-17T18:14:30.6966754Z","updatedAt":"2018-01-17T18:14:30.6966754Z","userMetadata":"usermetadata"}}'} + US 2","properties":{"createdAt":"2018-01-18T21:52:38.8978772Z","updatedAt":"2018-01-18T21:52:38.8978772Z","userMetadata":"usermetadata"}}'} headers: cache-control: [no-cache] content-length: ['532'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:14:32 GMT'] + date: ['Thu, 18 Jan 2018 21:52:39 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -206,7 +206,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: body: null @@ -223,12 +223,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-17T18:14:30.8536738","updatedAt":"2018-01-17T18:14:30.8536738","userMetadata":"usermetadata"}}'} + US 2","properties":{"createdAt":"2018-01-18T21:52:39.008569","updatedAt":"2018-01-18T21:52:39.008569","userMetadata":"usermetadata"}}'} headers: cache-control: [no-cache] - content-length: ['530'] + content-length: ['528'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:14:34 GMT'] + date: ['Thu, 18 Jan 2018 21:52:41 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -253,12 +253,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-17T18:14:36.0720135Z","updatedAt":"2018-01-17T18:14:36.0720135Z","userMetadata":"usermetadata-updated"}}'} + US 2","properties":{"createdAt":"2018-01-18T21:52:43.1015048Z","updatedAt":"2018-01-18T21:52:43.1015048Z","userMetadata":"usermetadata-updated"}}'} headers: cache-control: [no-cache] content-length: ['540'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:14:35 GMT'] + date: ['Thu, 18 Jan 2018 21:52:43 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -266,7 +266,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -283,13 +283,13 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups?api-version=2017-04-01 response: body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/$Default","name":"$Default","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-17T18:14:25.3701935","updatedAt":"2018-01-17T18:14:25.3701935"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-17T18:14:32.2453238","updatedAt":"2018-01-17T18:14:36.2628859","userMetadata":"usermetadata-updated"}}]}'} + US 2","properties":{"createdAt":"2018-01-18T21:52:33.4460246","updatedAt":"2018-01-18T21:52:33.4460246"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West + US 2","properties":{"createdAt":"2018-01-18T21:52:39.008569","updatedAt":"2018-01-18T21:52:43.2898971","userMetadata":"usermetadata-updated"}}]}'} headers: cache-control: [no-cache] - content-length: ['1027'] + content-length: ['1026'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:14:36 GMT'] + date: ['Thu, 18 Jan 2018 21:52:44 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -318,13 +318,13 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:14:39 GMT'] + date: ['Thu, 18 Jan 2018 21:52:46 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: body: null @@ -345,7 +345,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:14:41 GMT'] + date: ['Thu, 18 Jan 2018 21:52:48 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -372,14 +372,14 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:14:42 GMT'] + date: ['Thu, 18 Jan 2018 21:52:50 GMT'] expires: ['-1'] location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 202, message: Accepted} - request: body: null @@ -399,7 +399,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:15:12 GMT'] + date: ['Thu, 18 Jan 2018 21:53:20 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -426,11 +426,11 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:15:15 GMT'] + date: ['Thu, 18 Jan 2018 21:53:23 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZDT05TVU1FUkdST1VQVjNTM0NUTklRMzRWWVpSN3xCQjhCMkEzREYxNTZGNEExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZDT05TVU1FUkdST1VQS1k2M0dPV1NTUFo2Sko0SnwzODJBMEZCQUE3Mjg4RTkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 202, message: Accepted} version: 1 diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml index 5f967b8a2c3..786ff7dd61a 100644 --- a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml @@ -20,7 +20,7 @@ interactions: cache-control: [no-cache] content-length: ['328'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:15:17 GMT'] + date: ['Thu, 18 Jan 2018 21:53:25 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -44,12 +44,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:15:18.66Z","updatedAt":"2018-01-17T18:15:18.66Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:53:26.053Z","updatedAt":"2018-01-18T21:53:26.053Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] - content-length: ['758'] + content-length: ['760'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:15:19 GMT'] + date: ['Thu, 18 Jan 2018 21:53:27 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -57,7 +57,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -74,12 +74,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:15:18.66Z","updatedAt":"2018-01-17T18:15:42.077Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:53:26.053Z","updatedAt":"2018-01-18T21:53:51.117Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['757'] + content-length: ['758'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:15:49 GMT'] + date: ['Thu, 18 Jan 2018 21:53:57 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -103,12 +103,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:15:18.66Z","updatedAt":"2018-01-17T18:15:42.077Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:53:26.053Z","updatedAt":"2018-01-18T21:53:51.117Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['757'] + content-length: ['758'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:15:51 GMT'] + date: ['Thu, 18 Jan 2018 21:53:58 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -133,12 +133,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004","name":"eventhubs-eventhubcli000004","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:15:54.133Z","updatedAt":"2018-01-17T18:15:56.697Z","partitionIds":["0","1","2","3"]}}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:54:01.983Z","updatedAt":"2018-01-18T21:54:08.217Z","partitionIds":["0","1","2","3"]}}'} headers: cache-control: [no-cache] content-length: ['545'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:15:58 GMT'] + date: ['Thu, 18 Jan 2018 21:54:08 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -146,7 +146,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: body: null @@ -163,12 +163,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004","name":"eventhubs-eventhubcli000004","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:15:54.133","updatedAt":"2018-01-17T18:15:56.697","partitionIds":["0","1","2","3"]}}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:54:01.983","updatedAt":"2018-01-18T21:54:08.217","partitionIds":["0","1","2","3"]}}'} headers: cache-control: [no-cache] content-length: ['543'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:15:59 GMT'] + date: ['Thu, 18 Jan 2018 21:54:10 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -192,12 +192,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs?api-version=2017-04-01 response: body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004","name":"eventhubs-eventhubcli000004","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-17T18:15:54.133","updatedAt":"2018-01-17T18:15:56.697","partitionIds":["0","1","2","3"]}}]}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:54:01.983","updatedAt":"2018-01-18T21:54:08.217","partitionIds":["0","1","2","3"]}}]}'} headers: cache-control: [no-cache] content-length: ['555'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:16:01 GMT'] + date: ['Thu, 18 Jan 2018 21:54:12 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -228,7 +228,7 @@ interactions: cache-control: [no-cache] content-length: ['444'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:16:02 GMT'] + date: ['Thu, 18 Jan 2018 21:54:14 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -236,7 +236,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: body: null @@ -258,7 +258,7 @@ interactions: cache-control: [no-cache] content-length: ['444'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:16:04 GMT'] + date: ['Thu, 18 Jan 2018 21:54:15 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -282,12 +282,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003/ListKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=ig9Q4mn3Pm+FVks+j1SbKOpts18WsEM2/9C1Xh7qM64=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=kbdFkooyYYRoiOcKrhMjZzVq0XDkGlJMCIz9oDQQTis=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"ig9Q4mn3Pm+FVks+j1SbKOpts18WsEM2/9C1Xh7qM64=","secondaryKey":"kbdFkooyYYRoiOcKrhMjZzVq0XDkGlJMCIz9oDQQTis=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=TdQ2060g7J8swQNGtoeiiqlW/cDHbutP33H5DZ6CaTA=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=hhMJnpkOp4CZlyJWDbBroV7XaMSQBioC//PROFj4t4M=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"TdQ2060g7J8swQNGtoeiiqlW/cDHbutP33H5DZ6CaTA=","secondaryKey":"hhMJnpkOp4CZlyJWDbBroV7XaMSQBioC//PROFj4t4M=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['610'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:16:05 GMT'] + date: ['Thu, 18 Jan 2018 21:54:17 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -295,7 +295,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: '{"keyType": "PrimaryKey"}' @@ -312,12 +312,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=t9S9cXF+85yW+9DLEFdJd+22eZOStyza9P/bUCI9WKE=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=kbdFkooyYYRoiOcKrhMjZzVq0XDkGlJMCIz9oDQQTis=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"t9S9cXF+85yW+9DLEFdJd+22eZOStyza9P/bUCI9WKE=","secondaryKey":"kbdFkooyYYRoiOcKrhMjZzVq0XDkGlJMCIz9oDQQTis=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=lnxUfW+i/snd1cTbwBRYmybetI53ukOTopOI+rRwH1w=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=hhMJnpkOp4CZlyJWDbBroV7XaMSQBioC//PROFj4t4M=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"lnxUfW+i/snd1cTbwBRYmybetI53ukOTopOI+rRwH1w=","secondaryKey":"hhMJnpkOp4CZlyJWDbBroV7XaMSQBioC//PROFj4t4M=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['610'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:16:07 GMT'] + date: ['Thu, 18 Jan 2018 21:54:18 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -325,7 +325,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: '{"keyType": "SecondaryKey"}' @@ -342,12 +342,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=t9S9cXF+85yW+9DLEFdJd+22eZOStyza9P/bUCI9WKE=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=ydvKW4TbTG3GlwHnK5N6jfuzLuNjB/GeoaC924ViQhg=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"t9S9cXF+85yW+9DLEFdJd+22eZOStyza9P/bUCI9WKE=","secondaryKey":"ydvKW4TbTG3GlwHnK5N6jfuzLuNjB/GeoaC924ViQhg=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=lnxUfW+i/snd1cTbwBRYmybetI53ukOTopOI+rRwH1w=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=kvi8Ci+vwnKzCmmFoGhRikPbfTFew0WrmtYYPv4sj/w=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"lnxUfW+i/snd1cTbwBRYmybetI53ukOTopOI+rRwH1w=","secondaryKey":"kvi8Ci+vwnKzCmmFoGhRikPbfTFew0WrmtYYPv4sj/w=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['610'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:16:08 GMT'] + date: ['Thu, 18 Jan 2018 21:54:21 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -355,7 +355,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] status: {code: 200, message: OK} - request: body: null @@ -376,13 +376,13 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:16:11 GMT'] + date: ['Thu, 18 Jan 2018 21:54:22 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -403,13 +403,13 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:16:14 GMT'] + date: ['Thu, 18 Jan 2018 21:54:24 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -430,7 +430,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:16:16 GMT'] + date: ['Thu, 18 Jan 2018 21:54:26 GMT'] expires: ['-1'] location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01'] pragma: [no-cache] @@ -457,7 +457,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:16:45 GMT'] + date: ['Thu, 18 Jan 2018 21:54:57 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -484,9 +484,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:16:48 GMT'] + date: ['Thu, 18 Jan 2018 21:54:58 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZFVkVOVE5IVUI2UFRFWDNPWFJCRlJYVjQ0WlYyU3xFOUY2RkRBRTUyNjI4Mjk2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZFVkVOVE5IVUJXT1JPQjI2RkxSR0ZKU0MyM1UzSHw3MEY4OThEQjFCMEMyQzNBLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-ratelimit-remaining-subscription-writes: ['1198'] diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml index cdbfa20da62..d8e18dd2f8e 100644 --- a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml @@ -20,7 +20,7 @@ interactions: cache-control: [no-cache] content-length: ['328'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:16:50 GMT'] + date: ['Thu, 18 Jan 2018 21:55:01 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -46,7 +46,7 @@ interactions: cache-control: [no-cache] content-length: ['53'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:16:51 GMT'] + date: ['Thu, 18 Jan 2018 21:55:02 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -54,7 +54,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: '{"location": "westus2", "tags": {"{tag1: value1}": ""}, "sku": {"name": @@ -74,12 +74,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:16:53.533Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:03.917Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] content-length: ['741'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:16:54 GMT'] + date: ['Thu, 18 Jan 2018 21:55:04 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -87,7 +87,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -104,12 +104,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:17:17.173Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:29.113Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] content-length: ['739'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:17:24 GMT'] + date: ['Thu, 18 Jan 2018 21:55:34 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -133,12 +133,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:17:17.173Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:29.113Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] content-length: ['739'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:17:26 GMT'] + date: ['Thu, 18 Jan 2018 21:55:37 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -166,12 +166,12 @@ interactions: Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliu5bm3r5iisqx","createdAt":"2018-01-17T00:14:20.873Z","updatedAt":"2018-01-17T00:18:46.907Z","serviceBusEndpoint":"https://eh-nscliu5bm3r5iisqx.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eventgrid-monitoring/providers/Microsoft.EventHub/namespaces/eventgrid-monitoring","name":"eventgrid-monitoring","type":"Microsoft.EventHub/Namespaces","location":"Central US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventgrid-monitoring","createdAt":"2017-05-19T19:13:03.853Z","updatedAt":"2017-08-17T17:27:13.863Z","serviceBusEndpoint":"https://eventgrid-monitoring.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.EventHub/namespaces/kalstest2","name":"kalstest2","type":"Microsoft.EventHub/Namespaces","location":"West US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:kalstest2","createdAt":"2017-09-23T00:57:11.983Z","updatedAt":"2017-09-23T00:58:39.957Z","serviceBusEndpoint":"https://kalstest2.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eg-rgr1-uswc/providers/Microsoft.EventHub/namespaces/rgr1-eventhub1","name":"rgr1-eventhub1","type":"Microsoft.EventHub/Namespaces","location":"South - Central US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:rgr1-eventhub1","createdAt":"2017-11-22T23:42:33.113Z","updatedAt":"2017-11-22T23:47:39.017Z","serviceBusEndpoint":"https://rgr1-eventhub1.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:17:17.173Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps5157/providers/Microsoft.EventHub/namespaces/PSTestEH-ps5102","name":"PSTestEH-ps5102","type":"Microsoft.EventHub/Namespaces","location":"West + Central US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:rgr1-eventhub1","createdAt":"2017-11-22T23:42:33.113Z","updatedAt":"2017-11-22T23:47:39.017Z","serviceBusEndpoint":"https://rgr1-eventhub1.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps5157/providers/Microsoft.EventHub/namespaces/PSTestEH-ps5102","name":"PSTestEH-ps5102","type":"Microsoft.EventHub/Namespaces","location":"West US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps5102","createdAt":"2017-11-30T01:29:20.62Z","updatedAt":"2017-11-30T01:30:04.59Z","serviceBusEndpoint":"https://PSTestEH-ps5102.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliascky7msnikdvg7monugngsco6s44dsylbg6ubkzabkjg3pq457pyq7kmcqu/providers/Microsoft.EventHub/namespaces/eh-nsclidjlkdqwkxyp2","name":"eh-nsclidjlkdqwkxyp2","type":"Microsoft.EventHub/Namespaces","location":"South Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclidjlkdqwkxyp2","createdAt":"2018-01-16T03:25:23.523Z","updatedAt":"2018-01-16T03:29:33.037Z","serviceBusEndpoint":"https://eh-nsclidjlkdqwkxyp2.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":20},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EventGridResourceGroup/providers/Microsoft.EventHub/namespaces/eventgrid-eventhub","name":"eventgrid-eventhub","type":"Microsoft.EventHub/Namespaces","location":"West US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventgrid-eventhub","createdAt":"2017-04-26T16:51:02.323Z","updatedAt":"2017-08-18T02:12:27.463Z","serviceBusEndpoint":"https://eventgrid-eventhub.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps9059/providers/Microsoft.EventHub/namespaces/PSTestEH-ps4460","name":"PSTestEH-ps4460","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps4460","createdAt":"2017-11-30T00:38:29.223Z","updatedAt":"2017-11-30T00:39:48.487Z","serviceBusEndpoint":"https://PSTestEH-ps4460.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasg4iqo576d2twd4qc2lh7nicaqrbiop577a6ay6jdmyf6ttnncvwttfraa5/providers/Microsoft.EventHub/namespaces/eh-nscli2f64ppr4ehks","name":"eh-nscli2f64ppr4ehks","type":"Microsoft.EventHub/Namespaces","location":"North + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps4460","createdAt":"2017-11-30T00:38:29.223Z","updatedAt":"2017-11-30T00:39:48.487Z","serviceBusEndpoint":"https://PSTestEH-ps4460.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:29.113Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasg4iqo576d2twd4qc2lh7nicaqrbiop577a6ay6jdmyf6ttnncvwttfraa5/providers/Microsoft.EventHub/namespaces/eh-nscli2f64ppr4ehks","name":"eh-nscli2f64ppr4ehks","type":"Microsoft.EventHub/Namespaces","location":"North Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli2f64ppr4ehks","createdAt":"2018-01-09T21:42:36.447Z","updatedAt":"2018-01-09T23:46:03.63Z","serviceBusEndpoint":"https://eh-nscli2f64ppr4ehks.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps3277/providers/Microsoft.EventHub/namespaces/PSTestEH-ps460","name":"PSTestEH-ps460","type":"Microsoft.EventHub/Namespaces","location":"West US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps460","createdAt":"2017-11-30T19:22:17.26Z","updatedAt":"2017-11-30T19:23:58.753Z","serviceBusEndpoint":"https://PSTestEH-ps460.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagenortheurope/providers/Microsoft.EventHub/namespaces/azureeventgridneu","name":"azureeventgridneu","type":"Microsoft.EventHub/Namespaces","location":"North Europe","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridneu","createdAt":"2017-06-14T20:54:18.227Z","updatedAt":"2017-06-14T21:45:04.64Z","serviceBusEndpoint":"https://azureeventgridneu.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasrdwk3qo25uvmozoy46edwk5dxzoyevdhfg6dknv2qmsgo47phzgttwpaky/providers/Microsoft.EventHub/namespaces/eh-nscli6oipmplfhbzp","name":"eh-nscli6oipmplfhbzp","type":"Microsoft.EventHub/Namespaces","location":"South @@ -218,7 +218,7 @@ interactions: cache-control: [no-cache] content-length: ['36497'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:17:28 GMT'] + date: ['Thu, 18 Jan 2018 21:55:38 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -242,12 +242,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces?api-version=2017-04-01 response: body: {string: '{"value":[{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-17T18:16:53.533Z","updatedAt":"2018-01-17T18:17:17.173Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}]}'} + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:29.113Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}]}'} headers: cache-control: [no-cache] content-length: ['751'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:17:29 GMT'] + date: ['Thu, 18 Jan 2018 21:55:39 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -277,7 +277,7 @@ interactions: cache-control: [no-cache] content-length: ['396'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:18:03 GMT'] + date: ['Thu, 18 Jan 2018 21:56:12 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -285,7 +285,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] status: {code: 200, message: OK} - request: body: null @@ -307,7 +307,7 @@ interactions: cache-control: [no-cache] content-length: ['396'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:18:04 GMT'] + date: ['Thu, 18 Jan 2018 21:56:14 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -336,7 +336,7 @@ interactions: cache-control: [no-cache] content-length: ['424'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:18:06 GMT'] + date: ['Thu, 18 Jan 2018 21:56:16 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -360,12 +360,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003/listKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=pMaPprJwii7sLiHjeQjYulDR878RTHnM7cb3vjqeNOM=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=UpcNWCDpeJX5YUIac0pbNiEKI4BWWLiC45MSvcPFrSI=","primaryKey":"pMaPprJwii7sLiHjeQjYulDR878RTHnM7cb3vjqeNOM=","secondaryKey":"UpcNWCDpeJX5YUIac0pbNiEKI4BWWLiC45MSvcPFrSI=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=QBPOowA2J2aTlgJxIYGeObvn6nsMGQk8j2sKpZdjC5o=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=6QX/+CGN/rEpNbjMKtTQc5b2Dg4hN8jeWm5eIKZFzKo=","primaryKey":"QBPOowA2J2aTlgJxIYGeObvn6nsMGQk8j2sKpZdjC5o=","secondaryKey":"6QX/+CGN/rEpNbjMKtTQc5b2Dg4hN8jeWm5eIKZFzKo=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['536'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:18:08 GMT'] + date: ['Thu, 18 Jan 2018 21:56:18 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -373,7 +373,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: body: '{"keyType": "PrimaryKey"}' @@ -390,12 +390,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=eqWVdPzuz6nLBb2MCy6I5dxkfpLWXeZAku81ABd4k7o=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=UpcNWCDpeJX5YUIac0pbNiEKI4BWWLiC45MSvcPFrSI=","primaryKey":"eqWVdPzuz6nLBb2MCy6I5dxkfpLWXeZAku81ABd4k7o=","secondaryKey":"UpcNWCDpeJX5YUIac0pbNiEKI4BWWLiC45MSvcPFrSI=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=l6TAHK0Cm+5aDE1xtDbMo0XSQVRKet/ImDfP+bEwZ0s=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=6QX/+CGN/rEpNbjMKtTQc5b2Dg4hN8jeWm5eIKZFzKo=","primaryKey":"l6TAHK0Cm+5aDE1xtDbMo0XSQVRKet/ImDfP+bEwZ0s=","secondaryKey":"6QX/+CGN/rEpNbjMKtTQc5b2Dg4hN8jeWm5eIKZFzKo=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['536'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:18:25 GMT'] + date: ['Thu, 18 Jan 2018 21:56:35 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -420,12 +420,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=eqWVdPzuz6nLBb2MCy6I5dxkfpLWXeZAku81ABd4k7o=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=jJK31DWGCwVZfK/Lk3SPbP9meGfvSZs6Er3LdEQY2+I=","primaryKey":"eqWVdPzuz6nLBb2MCy6I5dxkfpLWXeZAku81ABd4k7o=","secondaryKey":"jJK31DWGCwVZfK/Lk3SPbP9meGfvSZs6Er3LdEQY2+I=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=l6TAHK0Cm+5aDE1xtDbMo0XSQVRKet/ImDfP+bEwZ0s=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=EaUZu7L5CrZe0ri5inf09cQnYXkVgOlOuwh5koFlWWo=","primaryKey":"l6TAHK0Cm+5aDE1xtDbMo0XSQVRKet/ImDfP+bEwZ0s=","secondaryKey":"EaUZu7L5CrZe0ri5inf09cQnYXkVgOlOuwh5koFlWWo=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['536'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Jan 2018 18:18:43 GMT'] + date: ['Thu, 18 Jan 2018 21:56:53 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -454,7 +454,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:19:00 GMT'] + date: ['Thu, 18 Jan 2018 21:57:11 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -481,14 +481,14 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:19:02 GMT'] + date: ['Thu, 18 Jan 2018 21:57:12 GMT'] expires: ['-1'] location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 202, message: Accepted} - request: body: null @@ -508,7 +508,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:19:32 GMT'] + date: ['Thu, 18 Jan 2018 21:57:43 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -535,9 +535,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Jan 2018 18:19:35 GMT'] + date: ['Thu, 18 Jan 2018 21:57:45 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZOQU1FU1BBQ0VZTlNBRFVPMjM0V0FXRVhBWkhETnw0QjNCRDhGQzBENkYwQzk4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZOQU1FU1BBQ0U2WFdVMk5IQUFPVkRJSUVNVkczUnwyRTdBN0Y1NDdDRkI2REJFLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-ratelimit-remaining-subscription-writes: ['1199'] diff --git a/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py b/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py index 94468189b2d..48fc06f7dac 100644 --- a/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py +++ b/src/eventhubs/azext_eventhub/tests/test_eventhub_commands.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# AZURE CLI EventHub - NAMESAPCE TEST DEFINITIONS +# AZURE CLI EventHub - NAMESPACE TEST DEFINITIONS import time diff --git a/src/eventhubs/setup.py b/src/eventhubs/setup.py index 56040c2e650..1837eca188e 100644 --- a/src/eventhubs/setup.py +++ b/src/eventhubs/setup.py @@ -36,6 +36,6 @@ author_email='v-ajnava@microsoft.com', url='https://github.com/Azure/azure-cli-extensions', classifiers=CLASSIFIERS, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=DEPENDENCIES ) From 372ed52c9a2c8e9fab061cb7d3af0463f5b857a1 Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Thu, 18 Jan 2018 18:38:11 -0800 Subject: [PATCH 04/10] fixed lint errors and test recordings --- .github/CODEOWNERS | 2 + .../recordings/latest/test_eh_alias.yaml | 194 +++++++++++------- .../latest/test_eh_consumergroup.yaml | 70 +++---- .../recordings/latest/test_eh_eventhub.yaml | 78 +++---- .../recordings/latest/test_eh_namespace.yaml | 81 ++++---- 5 files changed, 242 insertions(+), 183 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 761d7a66228..fa59007ae91 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,4 +4,6 @@ /src/image-copy/ @tamirkamara +/src/servicebus/ @v-ajnava + /src/eventhubs/ @v-ajnava diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml index c76acfebc68..b24d1858fdb 100644 --- a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_alias.yaml @@ -20,7 +20,7 @@ interactions: cache-control: [no-cache] content-length: ['328'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:40:29 GMT'] + date: ['Fri, 19 Jan 2018 02:18:38 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -46,7 +46,7 @@ interactions: cache-control: [no-cache] content-length: ['53'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:40:30 GMT'] + date: ['Fri, 19 Jan 2018 02:18:39 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -54,10 +54,10 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: - body: '{"location": "SouthCentralUS", "tags": {"{tag2: value2,": "", "tag1: value1}": + body: '{"location": "SouthCentralUS", "tags": {"{tag1: value1,": "", "tag2: value2}": ""}, "sku": {"name": "Standard", "tier": "Standard"}}' headers: Accept: [application/json] @@ -73,12 +73,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","name":"eh-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"South - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-18T21:40:31.743Z","updatedAt":"2018-01-18T21:40:31.743Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-19T02:18:40.05Z","updatedAt":"2018-01-19T02:18:40.05Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] - content-length: ['768'] + content-length: ['766'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:40:32 GMT'] + date: ['Fri, 19 Jan 2018 02:18:41 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -86,7 +86,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -103,12 +103,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","name":"eh-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"South - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-18T21:40:31.743Z","updatedAt":"2018-01-18T21:40:55.253Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-19T02:18:40.05Z","updatedAt":"2018-01-19T02:19:06.437Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['766'] + content-length: ['765'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:41:03 GMT'] + date: ['Fri, 19 Jan 2018 02:19:11 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -132,12 +132,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","name":"eh-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"South - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-18T21:40:31.743Z","updatedAt":"2018-01-18T21:40:55.253Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000002","createdAt":"2018-01-19T02:18:40.05Z","updatedAt":"2018-01-19T02:19:06.437Z","serviceBusEndpoint":"https://eh-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['766'] + content-length: ['765'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:41:05 GMT'] + date: ['Fri, 19 Jan 2018 02:19:20 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -147,7 +147,7 @@ interactions: vary: [Accept-Encoding] status: {code: 200, message: OK} - request: - body: '{"location": "NorthCentralUS", "tags": {"{tag2: value2,": "", "tag1: value1}": + body: '{"location": "NorthCentralUS", "tags": {"{tag1: value1,": "", "tag2: value2}": ""}, "sku": {"name": "Standard", "tier": "Standard"}}' headers: Accept: [application/json] @@ -163,12 +163,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","name":"eh-nscli000003","type":"Microsoft.EventHub/Namespaces","location":"North - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-18T21:41:06.15Z","updatedAt":"2018-01-18T21:41:06.15Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Activating"}}'} + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-19T02:19:21.513Z","updatedAt":"2018-01-19T02:19:21.513Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] - content-length: ['766'] + content-length: ['768'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:41:07 GMT'] + date: ['Fri, 19 Jan 2018 02:19:23 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -176,7 +176,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -193,12 +193,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","name":"eh-nscli000003","type":"Microsoft.EventHub/Namespaces","location":"North - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-18T21:41:06.15Z","updatedAt":"2018-01-18T21:41:34.093Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-19T02:19:21.513Z","updatedAt":"2018-01-19T02:19:48.693Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['765'] + content-length: ['766'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:41:37 GMT'] + date: ['Fri, 19 Jan 2018 02:19:53 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -222,12 +222,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003","name":"eh-nscli000003","type":"Microsoft.EventHub/Namespaces","location":"North - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-18T21:41:06.15Z","updatedAt":"2018-01-18T21:41:34.093Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli000003","createdAt":"2018-01-19T02:19:21.513Z","updatedAt":"2018-01-19T02:19:48.693Z","serviceBusEndpoint":"https://eh-nscli000003.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['765'] + content-length: ['766'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:41:40 GMT'] + date: ['Fri, 19 Jan 2018 02:19:54 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -257,7 +257,7 @@ interactions: cache-control: [no-cache] content-length: ['403'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:42:12 GMT'] + date: ['Fri, 19 Jan 2018 02:20:27 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -265,7 +265,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -287,7 +287,7 @@ interactions: cache-control: [no-cache] content-length: ['403'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:42:14 GMT'] + date: ['Fri, 19 Jan 2018 02:20:29 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -316,7 +316,7 @@ interactions: cache-control: [no-cache] content-length: ['38'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:42:15 GMT'] + date: ['Fri, 19 Jan 2018 02:20:31 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -324,7 +324,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: 'b''b\''{"properties": {"partnerNamespace": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003"}}\''''' @@ -346,7 +346,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:42:49 GMT'] + date: ['Fri, 19 Jan 2018 02:21:04 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -375,7 +375,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:42:50 GMT'] + date: ['Fri, 19 Jan 2018 02:21:05 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -403,7 +403,7 @@ interactions: cache-control: [no-cache] content-length: ['669'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:42:52 GMT'] + date: ['Fri, 19 Jan 2018 02:21:06 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -431,7 +431,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:42:53 GMT'] + date: ['Fri, 19 Jan 2018 02:21:08 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -460,7 +460,7 @@ interactions: cache-control: [no-cache] content-length: ['448'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:42:55 GMT'] + date: ['Fri, 19 Jan 2018 02:21:09 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -490,7 +490,7 @@ interactions: cache-control: [no-cache] content-length: ['937'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:42:57 GMT'] + date: ['Fri, 19 Jan 2018 02:21:10 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -518,7 +518,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:43:29 GMT'] + date: ['Fri, 19 Jan 2018 02:21:42 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -546,7 +546,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:43:59 GMT'] + date: ['Fri, 19 Jan 2018 02:22:13 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -574,7 +574,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:44:31 GMT'] + date: ['Fri, 19 Jan 2018 02:22:44 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -602,7 +602,7 @@ interactions: cache-control: [no-cache] content-length: ['668'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:45:02 GMT'] + date: ['Fri, 19 Jan 2018 02:23:16 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -630,7 +630,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:45:03 GMT'] + date: ['Fri, 19 Jan 2018 02:23:18 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -657,7 +657,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:45:05 GMT'] + date: ['Fri, 19 Jan 2018 02:23:19 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -685,7 +685,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:45:36 GMT'] + date: ['Fri, 19 Jan 2018 02:23:50 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -713,7 +713,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:46:07 GMT'] + date: ['Fri, 19 Jan 2018 02:24:21 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -741,7 +741,7 @@ interactions: cache-control: [no-cache] content-length: ['479'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:46:38 GMT'] + date: ['Fri, 19 Jan 2018 02:24:53 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -770,7 +770,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:46:55 GMT'] + date: ['Fri, 19 Jan 2018 02:25:11 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -778,7 +778,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -799,7 +799,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:46:57 GMT'] + date: ['Fri, 19 Jan 2018 02:25:12 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -827,7 +827,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:47:28 GMT'] + date: ['Fri, 19 Jan 2018 02:25:43 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -855,7 +855,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:48:00 GMT'] + date: ['Fri, 19 Jan 2018 02:26:14 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -883,7 +883,7 @@ interactions: cache-control: [no-cache] content-length: ['667'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:48:31 GMT'] + date: ['Fri, 19 Jan 2018 02:26:46 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -911,7 +911,7 @@ interactions: cache-control: [no-cache] content-length: ['668'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:49:02 GMT'] + date: ['Fri, 19 Jan 2018 02:27:18 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -939,7 +939,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:49:04 GMT'] + date: ['Fri, 19 Jan 2018 02:27:18 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -966,7 +966,7 @@ interactions: cache-control: [no-cache] content-length: ['669'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:49:05 GMT'] + date: ['Fri, 19 Jan 2018 02:27:20 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -994,7 +994,7 @@ interactions: cache-control: [no-cache] content-length: ['669'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:49:36 GMT'] + date: ['Fri, 19 Jan 2018 02:27:51 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -1022,7 +1022,35 @@ interactions: cache-control: [no-cache] content-length: ['669'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:50:07 GMT'] + date: ['Fri, 19 Jan 2018 02:28:23 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs georecovery-alias show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005?api-version=2017-04-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/disasterRecoveryConfigs/cliAlias000005","name":"cliAlias000005","type":"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs","properties":{"provisioningState":"Accepted","partnerNamespace":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002","role":"Secondary","type":"MetadataReplication"}}'} + headers: + cache-control: [no-cache] + content-length: ['669'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 Jan 2018 02:28:54 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -1050,7 +1078,7 @@ interactions: cache-control: [no-cache] content-length: ['479'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:50:39 GMT'] + date: ['Fri, 19 Jan 2018 02:29:26 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -1078,13 +1106,13 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:50:39 GMT'] + date: ['Fri, 19 Jan 2018 02:29:28 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -1105,14 +1133,14 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:51:11 GMT'] + date: ['Fri, 19 Jan 2018 02:29:59 GMT'] expires: ['-1'] location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000002/operationresults/eh-nscli000002?api-version=2017-04-01'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 202, message: Accepted} - request: body: null @@ -1132,7 +1160,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:51:42 GMT'] + date: ['Fri, 19 Jan 2018 02:30:29 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -1154,20 +1182,44 @@ interactions: method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003?api-version=2017-04-01 response: - body: {string: '{"error":{"message":"Namespace provisioning in transition. CorrelationId: - 2727e7b9-2bbf-4281-92ca-9280b8797e07","code":"Conflict"}}'} + body: {string: ''} headers: cache-control: [no-cache] - content-length: ['131'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:51:44 GMT'] + content-length: ['0'] + date: ['Fri, 19 Jan 2018 02:30:32 GMT'] expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/operationresults/eh-nscli000003?api-version=2017-04-01'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - status: {code: 409, message: Conflict} + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [eventhubs namespace delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.22 + msrest_azure/0.4.19 azure-mgmt-eventhub/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.26] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias000001/providers/Microsoft.EventHub/namespaces/eh-nscli000003/operationresults/eh-nscli000003?api-version=2017-04-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 19 Jan 2018 02:31:02 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] + server-sb: [Service-Bus-Resource-Provider/SN1] + strict-transport-security: [max-age=31536000; includeSubDomains] + status: {code: 200, message: OK} - request: body: null headers: @@ -1188,9 +1240,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:51:46 GMT'] + date: ['Fri, 19 Jan 2018 02:31:04 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZBTElBUzZURllQRlU0WVhWVzdONDQ2MlhNTTZQSnw2QTVGOTM0QUJFMjk1QkE0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZBTElBU1hXQjJKNUs2UjNZSENWV1BSNUgyMlVYVnxGNzU4MEVENjJFNjIxQzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-ratelimit-remaining-subscription-writes: ['1199'] diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml index 917a34dc16e..d4bf281e8f0 100644 --- a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_consumergroup.yaml @@ -20,14 +20,14 @@ interactions: cache-control: [no-cache] content-length: ['328'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:51:49 GMT'] + date: ['Fri, 19 Jan 2018 02:31:06 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: - body: '{"location": "westus2", "tags": {"{tag2: value2,": "", "tag1: value1}": + body: '{"location": "westus2", "tags": {"{tag1: value1,": "", "tag2: value2}": ""}, "sku": {"name": "Standard", "tier": "Standard"}, "properties": {"isAutoInflateEnabled": true, "maximumThroughputUnits": 4}}' headers: @@ -44,12 +44,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:51:49.77Z","updatedAt":"2018-01-18T21:51:49.77Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + US 2","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:31:07.807Z","updatedAt":"2018-01-19T02:31:07.807Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] - content-length: ['758'] + content-length: ['760'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:51:50 GMT'] + date: ['Fri, 19 Jan 2018 02:31:08 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -57,7 +57,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -74,12 +74,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:51:49.77Z","updatedAt":"2018-01-18T21:52:16.077Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:31:07.807Z","updatedAt":"2018-01-19T02:31:37.13Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] content-length: ['757'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:52:20 GMT'] + date: ['Fri, 19 Jan 2018 02:31:39 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -103,12 +103,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:51:49.77Z","updatedAt":"2018-01-18T21:52:16.077Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:31:07.807Z","updatedAt":"2018-01-19T02:31:37.13Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] content-length: ['757'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:52:23 GMT'] + date: ['Fri, 19 Jan 2018 02:31:41 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -133,12 +133,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003","name":"eventhubs-eventhubcli000003","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:52:26.167Z","updatedAt":"2018-01-18T21:52:33.68Z","partitionIds":["0","1","2","3"]}}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-19T02:31:43.76Z","updatedAt":"2018-01-19T02:31:49.997Z","partitionIds":["0","1","2","3"]}}'} headers: cache-control: [no-cache] content-length: ['544'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:52:34 GMT'] + date: ['Fri, 19 Jan 2018 02:31:51 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -146,7 +146,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -163,12 +163,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003","name":"eventhubs-eventhubcli000003","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:52:26.167","updatedAt":"2018-01-18T21:52:33.68","partitionIds":["0","1","2","3"]}}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-19T02:31:43.76","updatedAt":"2018-01-19T02:31:49.997","partitionIds":["0","1","2","3"]}}'} headers: cache-control: [no-cache] content-length: ['542'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:52:36 GMT'] + date: ['Fri, 19 Jan 2018 02:31:53 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -193,12 +193,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-18T21:52:38.8978772Z","updatedAt":"2018-01-18T21:52:38.8978772Z","userMetadata":"usermetadata"}}'} + US 2","properties":{"createdAt":"2018-01-19T02:31:56.2617495Z","updatedAt":"2018-01-19T02:31:56.2617495Z","userMetadata":"usermetadata"}}'} headers: cache-control: [no-cache] content-length: ['532'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:52:39 GMT'] + date: ['Fri, 19 Jan 2018 02:31:56 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -206,7 +206,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -223,12 +223,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-18T21:52:39.008569","updatedAt":"2018-01-18T21:52:39.008569","userMetadata":"usermetadata"}}'} + US 2","properties":{"createdAt":"2018-01-19T02:31:56.1815281","updatedAt":"2018-01-19T02:31:56.1815281","userMetadata":"usermetadata"}}'} headers: cache-control: [no-cache] - content-length: ['528'] + content-length: ['530'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:52:41 GMT'] + date: ['Fri, 19 Jan 2018 02:31:56 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -253,12 +253,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-18T21:52:43.1015048Z","updatedAt":"2018-01-18T21:52:43.1015048Z","userMetadata":"usermetadata-updated"}}'} + US 2","properties":{"createdAt":"2018-01-19T02:31:59.5788525Z","updatedAt":"2018-01-19T02:31:59.5788525Z","userMetadata":"usermetadata-updated"}}'} headers: cache-control: [no-cache] content-length: ['540'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:52:43 GMT'] + date: ['Fri, 19 Jan 2018 02:31:58 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -266,7 +266,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -283,13 +283,13 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups?api-version=2017-04-01 response: body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/$Default","name":"$Default","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-18T21:52:33.4460246","updatedAt":"2018-01-18T21:52:33.4460246"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West - US 2","properties":{"createdAt":"2018-01-18T21:52:39.008569","updatedAt":"2018-01-18T21:52:43.2898971","userMetadata":"usermetadata-updated"}}]}'} + US 2","properties":{"createdAt":"2018-01-19T02:31:51.1184591","updatedAt":"2018-01-19T02:31:51.1184591"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000003/consumergroups/clicg000004","name":"clicg000004","type":"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups","location":"West + US 2","properties":{"createdAt":"2018-01-19T02:31:56.1815281","updatedAt":"2018-01-19T02:31:59.4948398","userMetadata":"usermetadata-updated"}}]}'} headers: cache-control: [no-cache] - content-length: ['1026'] + content-length: ['1027'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:52:44 GMT'] + date: ['Fri, 19 Jan 2018 02:32:01 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -318,13 +318,13 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:52:46 GMT'] + date: ['Fri, 19 Jan 2018 02:32:02 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -345,7 +345,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:52:48 GMT'] + date: ['Fri, 19 Jan 2018 02:32:05 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -372,7 +372,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:52:50 GMT'] + date: ['Fri, 19 Jan 2018 02:32:06 GMT'] expires: ['-1'] location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_consumergroup000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01'] pragma: [no-cache] @@ -399,7 +399,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:53:20 GMT'] + date: ['Fri, 19 Jan 2018 02:32:36 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -426,9 +426,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:53:23 GMT'] + date: ['Fri, 19 Jan 2018 02:32:39 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZDT05TVU1FUkdST1VQS1k2M0dPV1NTUFo2Sko0SnwzODJBMEZCQUE3Mjg4RTkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZDT05TVU1FUkdST1VQTUZNS1pGR05USUFXT1lUNHw4MjVDMkZFNUMxMEI5QkZFLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-ratelimit-remaining-subscription-writes: ['1199'] diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml index 786ff7dd61a..c5225698267 100644 --- a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_eventhub.yaml @@ -20,14 +20,14 @@ interactions: cache-control: [no-cache] content-length: ['328'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:53:25 GMT'] + date: ['Fri, 19 Jan 2018 02:32:41 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: - body: '{"location": "westus2", "tags": {"{tag2: value2,": "", "tag1: value1}": + body: '{"location": "westus2", "tags": {"{tag1: value1,": "", "tag2: value2}": ""}, "sku": {"name": "Standard", "tier": "Standard"}, "properties": {"isAutoInflateEnabled": true, "maximumThroughputUnits": 4}}' headers: @@ -44,12 +44,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:53:26.053Z","updatedAt":"2018-01-18T21:53:26.053Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + US 2","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:32:42.333Z","updatedAt":"2018-01-19T02:32:42.333Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] content-length: ['760'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:53:27 GMT'] + date: ['Fri, 19 Jan 2018 02:32:43 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -57,7 +57,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -74,12 +74,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:53:26.053Z","updatedAt":"2018-01-18T21:53:51.117Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:32:42.333Z","updatedAt":"2018-01-19T02:33:09Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['758'] + content-length: ['754'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:53:57 GMT'] + date: ['Fri, 19 Jan 2018 02:33:13 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -103,12 +103,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:53:26.053Z","updatedAt":"2018-01-18T21:53:51.117Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:32:42.333Z","updatedAt":"2018-01-19T02:33:09Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] - content-length: ['758'] + content-length: ['754'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:53:58 GMT'] + date: ['Fri, 19 Jan 2018 02:33:15 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -133,12 +133,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004","name":"eventhubs-eventhubcli000004","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:54:01.983Z","updatedAt":"2018-01-18T21:54:08.217Z","partitionIds":["0","1","2","3"]}}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-19T02:33:18.927Z","updatedAt":"2018-01-19T02:33:21.003Z","partitionIds":["0","1","2","3"]}}'} headers: cache-control: [no-cache] content-length: ['545'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:54:08 GMT'] + date: ['Fri, 19 Jan 2018 02:33:23 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -146,7 +146,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -163,12 +163,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004?api-version=2017-04-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004","name":"eventhubs-eventhubcli000004","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:54:01.983","updatedAt":"2018-01-18T21:54:08.217","partitionIds":["0","1","2","3"]}}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-19T02:33:18.927","updatedAt":"2018-01-19T02:33:21.003","partitionIds":["0","1","2","3"]}}'} headers: cache-control: [no-cache] content-length: ['543'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:54:10 GMT'] + date: ['Fri, 19 Jan 2018 02:33:24 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -192,12 +192,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs?api-version=2017-04-01 response: body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004","name":"eventhubs-eventhubcli000004","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"West - US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-18T21:54:01.983","updatedAt":"2018-01-18T21:54:08.217","partitionIds":["0","1","2","3"]}}]}'} + US 2","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2018-01-19T02:33:18.927","updatedAt":"2018-01-19T02:33:21.003","partitionIds":["0","1","2","3"]}}]}'} headers: cache-control: [no-cache] content-length: ['555'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:54:12 GMT'] + date: ['Fri, 19 Jan 2018 02:33:26 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -228,7 +228,7 @@ interactions: cache-control: [no-cache] content-length: ['444'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:54:14 GMT'] + date: ['Fri, 19 Jan 2018 02:33:27 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -236,7 +236,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -258,7 +258,7 @@ interactions: cache-control: [no-cache] content-length: ['444'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:54:15 GMT'] + date: ['Fri, 19 Jan 2018 02:33:28 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -282,12 +282,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003/ListKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=TdQ2060g7J8swQNGtoeiiqlW/cDHbutP33H5DZ6CaTA=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=hhMJnpkOp4CZlyJWDbBroV7XaMSQBioC//PROFj4t4M=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"TdQ2060g7J8swQNGtoeiiqlW/cDHbutP33H5DZ6CaTA=","secondaryKey":"hhMJnpkOp4CZlyJWDbBroV7XaMSQBioC//PROFj4t4M=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=RkluROGAVdRHNk+iv+rXMJYtN5qZB40szy4ykJBU+1Q=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=ngyW3ZAagX77IP0CsyvWRIhkm20LElJDPOwTQrqxnOw=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"RkluROGAVdRHNk+iv+rXMJYtN5qZB40szy4ykJBU+1Q=","secondaryKey":"ngyW3ZAagX77IP0CsyvWRIhkm20LElJDPOwTQrqxnOw=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['610'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:54:17 GMT'] + date: ['Fri, 19 Jan 2018 02:33:29 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -295,7 +295,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: '{"keyType": "PrimaryKey"}' @@ -312,12 +312,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=lnxUfW+i/snd1cTbwBRYmybetI53ukOTopOI+rRwH1w=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=hhMJnpkOp4CZlyJWDbBroV7XaMSQBioC//PROFj4t4M=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"lnxUfW+i/snd1cTbwBRYmybetI53ukOTopOI+rRwH1w=","secondaryKey":"hhMJnpkOp4CZlyJWDbBroV7XaMSQBioC//PROFj4t4M=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=mvqoPBnnPTa0BSyRCQXqBLxMSwtFtAkEYzCuP6qmC+0=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=ngyW3ZAagX77IP0CsyvWRIhkm20LElJDPOwTQrqxnOw=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"mvqoPBnnPTa0BSyRCQXqBLxMSwtFtAkEYzCuP6qmC+0=","secondaryKey":"ngyW3ZAagX77IP0CsyvWRIhkm20LElJDPOwTQrqxnOw=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['610'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:54:18 GMT'] + date: ['Fri, 19 Jan 2018 02:33:31 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -325,7 +325,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: '{"keyType": "SecondaryKey"}' @@ -342,12 +342,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/eventhubs/eventhubs-eventhubcli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=lnxUfW+i/snd1cTbwBRYmybetI53ukOTopOI+rRwH1w=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=kvi8Ci+vwnKzCmmFoGhRikPbfTFew0WrmtYYPv4sj/w=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"lnxUfW+i/snd1cTbwBRYmybetI53ukOTopOI+rRwH1w=","secondaryKey":"kvi8Ci+vwnKzCmmFoGhRikPbfTFew0WrmtYYPv4sj/w=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=mvqoPBnnPTa0BSyRCQXqBLxMSwtFtAkEYzCuP6qmC+0=;EntityPath=eventhubs-eventhubcli000004","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=/ek9d06VTviCLkY2XO4C2gDeUpxVF67drsxBiExeku4=;EntityPath=eventhubs-eventhubcli000004","primaryKey":"mvqoPBnnPTa0BSyRCQXqBLxMSwtFtAkEYzCuP6qmC+0=","secondaryKey":"/ek9d06VTviCLkY2XO4C2gDeUpxVF67drsxBiExeku4=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['610'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:54:21 GMT'] + date: ['Fri, 19 Jan 2018 02:33:36 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -355,7 +355,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1195'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -376,13 +376,13 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:54:22 GMT'] + date: ['Fri, 19 Jan 2018 02:33:40 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -403,13 +403,13 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:54:24 GMT'] + date: ['Fri, 19 Jan 2018 02:33:43 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -430,14 +430,14 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:54:26 GMT'] + date: ['Fri, 19 Jan 2018 02:33:44 GMT'] expires: ['-1'] location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_eventnhub000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 202, message: Accepted} - request: body: null @@ -457,7 +457,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:54:57 GMT'] + date: ['Fri, 19 Jan 2018 02:34:14 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -484,9 +484,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:54:58 GMT'] + date: ['Fri, 19 Jan 2018 02:34:17 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZFVkVOVE5IVUJXT1JPQjI2RkxSR0ZKU0MyM1UzSHw3MEY4OThEQjFCMEMyQzNBLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZFVkVOVE5IVUJOVVNSSkYzSTVUR0pYQ01CQVJCMnw0NjQ5QkQyQTY5NTZCRDBGLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-ratelimit-remaining-subscription-writes: ['1198'] diff --git a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml index d8e18dd2f8e..f479e055eab 100644 --- a/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml +++ b/src/eventhubs/azext_eventhub/tests/recordings/latest/test_eh_namespace.yaml @@ -20,11 +20,11 @@ interactions: cache-control: [no-cache] content-length: ['328'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:55:01 GMT'] + date: ['Fri, 19 Jan 2018 02:34:19 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: 'b''{"name": "eventhubs-nscli000002"}''' @@ -46,7 +46,7 @@ interactions: cache-control: [no-cache] content-length: ['53'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:55:02 GMT'] + date: ['Fri, 19 Jan 2018 02:34:20 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -74,12 +74,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:03.917Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Created","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:34:21.437Z","updatedAt":"2018-01-19T02:34:21.437Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Activating"}}'} headers: cache-control: [no-cache] content-length: ['741'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:55:04 GMT'] + date: ['Fri, 19 Jan 2018 02:34:22 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -104,12 +104,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:29.113Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:34:21.437Z","updatedAt":"2018-01-19T02:34:45.413Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] content-length: ['739'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:55:34 GMT'] + date: ['Fri, 19 Jan 2018 02:34:53 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -133,12 +133,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002?api-version=2017-04-01 response: body: {string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:29.113Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:34:21.437Z","updatedAt":"2018-01-19T02:34:45.413Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}'} headers: cache-control: [no-cache] content-length: ['739'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:55:37 GMT'] + date: ['Fri, 19 Jan 2018 02:34:55 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -170,12 +170,12 @@ interactions: US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps5102","createdAt":"2017-11-30T01:29:20.62Z","updatedAt":"2017-11-30T01:30:04.59Z","serviceBusEndpoint":"https://PSTestEH-ps5102.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliascky7msnikdvg7monugngsco6s44dsylbg6ubkzabkjg3pq457pyq7kmcqu/providers/Microsoft.EventHub/namespaces/eh-nsclidjlkdqwkxyp2","name":"eh-nsclidjlkdqwkxyp2","type":"Microsoft.EventHub/Namespaces","location":"South Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclidjlkdqwkxyp2","createdAt":"2018-01-16T03:25:23.523Z","updatedAt":"2018-01-16T03:29:33.037Z","serviceBusEndpoint":"https://eh-nsclidjlkdqwkxyp2.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":20},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EventGridResourceGroup/providers/Microsoft.EventHub/namespaces/eventgrid-eventhub","name":"eventgrid-eventhub","type":"Microsoft.EventHub/Namespaces","location":"West US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventgrid-eventhub","createdAt":"2017-04-26T16:51:02.323Z","updatedAt":"2017-08-18T02:12:27.463Z","serviceBusEndpoint":"https://eventgrid-eventhub.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps9059/providers/Microsoft.EventHub/namespaces/PSTestEH-ps4460","name":"PSTestEH-ps4460","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps4460","createdAt":"2017-11-30T00:38:29.223Z","updatedAt":"2017-11-30T00:39:48.487Z","serviceBusEndpoint":"https://PSTestEH-ps4460.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:29.113Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasg4iqo576d2twd4qc2lh7nicaqrbiop577a6ay6jdmyf6ttnncvwttfraa5/providers/Microsoft.EventHub/namespaces/eh-nscli2f64ppr4ehks","name":"eh-nscli2f64ppr4ehks","type":"Microsoft.EventHub/Namespaces","location":"North + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps4460","createdAt":"2017-11-30T00:38:29.223Z","updatedAt":"2017-11-30T00:39:48.487Z","serviceBusEndpoint":"https://PSTestEH-ps4460.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasg4iqo576d2twd4qc2lh7nicaqrbiop577a6ay6jdmyf6ttnncvwttfraa5/providers/Microsoft.EventHub/namespaces/eh-nscli2f64ppr4ehks","name":"eh-nscli2f64ppr4ehks","type":"Microsoft.EventHub/Namespaces","location":"North Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli2f64ppr4ehks","createdAt":"2018-01-09T21:42:36.447Z","updatedAt":"2018-01-09T23:46:03.63Z","serviceBusEndpoint":"https://eh-nscli2f64ppr4ehks.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps3277/providers/Microsoft.EventHub/namespaces/PSTestEH-ps460","name":"PSTestEH-ps460","type":"Microsoft.EventHub/Namespaces","location":"West US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-ps460","createdAt":"2017-11-30T19:22:17.26Z","updatedAt":"2017-11-30T19:23:58.753Z","serviceBusEndpoint":"https://PSTestEH-ps460.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagenortheurope/providers/Microsoft.EventHub/namespaces/azureeventgridneu","name":"azureeventgridneu","type":"Microsoft.EventHub/Namespaces","location":"North Europe","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridneu","createdAt":"2017-06-14T20:54:18.227Z","updatedAt":"2017-06-14T21:45:04.64Z","serviceBusEndpoint":"https://azureeventgridneu.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasrdwk3qo25uvmozoy46edwk5dxzoyevdhfg6dknv2qmsgo47phzgttwpaky/providers/Microsoft.EventHub/namespaces/eh-nscli6oipmplfhbzp","name":"eh-nscli6oipmplfhbzp","type":"Microsoft.EventHub/Namespaces","location":"South - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli6oipmplfhbzp","createdAt":"2018-01-17T03:16:11.223Z","updatedAt":"2018-01-17T03:20:19.61Z","serviceBusEndpoint":"https://eh-nscli6oipmplfhbzp.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagesouthcentralus/providers/Microsoft.EventHub/namespaces/azureeventgridussc","name":"azureeventgridussc","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli6oipmplfhbzp","createdAt":"2018-01-17T03:16:11.223Z","updatedAt":"2018-01-17T03:20:19.61Z","serviceBusEndpoint":"https://eh-nscli6oipmplfhbzp.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasapj44zuqfujsl26kgqs5brvhhfc5zofi2uyqsp6knwtlucxftxaxmif6a2/providers/Microsoft.EventHub/namespaces/eh-nsclimnbbm4rpn473","name":"eh-nsclimnbbm4rpn473","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclimnbbm4rpn473","createdAt":"2018-01-18T23:03:27.803Z","updatedAt":"2018-01-19T00:07:06.647Z","serviceBusEndpoint":"https://eh-nsclimnbbm4rpn473.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagesouthcentralus/providers/Microsoft.EventHub/namespaces/azureeventgridussc","name":"azureeventgridussc","type":"Microsoft.EventHub/Namespaces","location":"South Central US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridussc","createdAt":"2017-06-14T20:51:43.227Z","updatedAt":"2017-06-14T21:43:18.967Z","serviceBusEndpoint":"https://azureeventgridussc.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasuabxoisqt5ghyuwgudrymd4wwztlqyh6poga4g3w54qnzu3z7robkl6t5q/providers/Microsoft.EventHub/namespaces/eh-nsclibiuej5yxtkd2","name":"eh-nsclibiuej5yxtkd2","type":"Microsoft.EventHub/Namespaces","location":"North Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclibiuej5yxtkd2","createdAt":"2018-01-16T02:44:18.997Z","updatedAt":"2018-01-16T02:47:50.287Z","serviceBusEndpoint":"https://eh-nsclibiuej5yxtkd2.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-onesdk5504/providers/Microsoft.EventHub/namespaces/PSTestEH-onesdk6034","name":"PSTestEH-onesdk6034","type":"Microsoft.EventHub/Namespaces","location":"West US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:pstesteh-onesdk6034","createdAt":"2017-09-18T23:59:58.2Z","updatedAt":"2017-09-19T00:00:23.943Z","serviceBusEndpoint":"https://PSTestEH-onesdk6034.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManageaustraliasoutheast/providers/Microsoft.EventHub/namespaces/azureeventgridause","name":"azureeventgridause","type":"Microsoft.EventHub/Namespaces","location":"Australia @@ -183,17 +183,21 @@ interactions: Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliv6m3lpg5t5yj","createdAt":"2018-01-11T01:16:44.9Z","updatedAt":"2018-01-11T01:30:32.89Z","serviceBusEndpoint":"https://eh-nscliv6m3lpg5t5yj.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasluiavtblxmux2kd6hennir4fqnbacd5gopkeuj6imcogpn5nfhvfx7bpkl/providers/Microsoft.EventHub/namespaces/eh-nscli45rm5qzdbmin","name":"eh-nscli45rm5qzdbmin","type":"Microsoft.EventHub/Namespaces","location":"North Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli45rm5qzdbmin","createdAt":"2018-01-09T03:33:05.463Z","updatedAt":"2018-01-09T03:42:13.513Z","serviceBusEndpoint":"https://eh-nscli45rm5qzdbmin.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasfbbatpr2evcnfafcvf4ss7zyy6qdqbhc5mbsalcb63gfwbjhukcicv6b3q/providers/Microsoft.EventHub/namespaces/eh-nsclin6wxggktaxhn","name":"eh-nsclin6wxggktaxhn","type":"Microsoft.EventHub/Namespaces","location":"South Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclin6wxggktaxhn","createdAt":"2018-01-16T23:36:27.027Z","updatedAt":"2018-01-16T23:41:09.587Z","serviceBusEndpoint":"https://eh-nsclin6wxggktaxhn.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasu6lcs66vwhtxj4d62fqcdlkqt3yotasky4m7lybezc63e43c4kxu6ppp3h/providers/Microsoft.EventHub/namespaces/eh-nscliz2kdrglpwnre","name":"eh-nscliz2kdrglpwnre","type":"Microsoft.EventHub/Namespaces","location":"North - Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliz2kdrglpwnre","createdAt":"2018-01-17T03:32:34.083Z","updatedAt":"2018-01-17T03:46:17.77Z","serviceBusEndpoint":"https://eh-nscliz2kdrglpwnre.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManageeastus/providers/Microsoft.EventHub/namespaces/azureeventgriduse","name":"azureeventgriduse","type":"Microsoft.EventHub/Namespaces","location":"East + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliz2kdrglpwnre","createdAt":"2018-01-17T03:32:34.083Z","updatedAt":"2018-01-17T03:46:17.77Z","serviceBusEndpoint":"https://eh-nscliz2kdrglpwnre.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasapj44zuqfujsl26kgqs5brvhhfc5zofi2uyqsp6knwtlucxftxaxmif6a2/providers/Microsoft.EventHub/namespaces/eh-nscli7kkxif26b5y7","name":"eh-nscli7kkxif26b5y7","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli7kkxif26b5y7","createdAt":"2018-01-19T00:03:23.573Z","updatedAt":"2018-01-19T00:07:06.383Z","serviceBusEndpoint":"https://eh-nscli7kkxif26b5y7.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManageeastus/providers/Microsoft.EventHub/namespaces/azureeventgriduse","name":"azureeventgriduse","type":"Microsoft.EventHub/Namespaces","location":"East US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgriduse","createdAt":"2017-06-14T18:15:46.113Z","updatedAt":"2017-06-14T22:06:10.537Z","serviceBusEndpoint":"https://azureeventgriduse.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagecentralus/providers/Microsoft.EventHub/namespaces/azureeventgridusc","name":"azureeventgridusc","type":"Microsoft.EventHub/Namespaces","location":"Central US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridusc","createdAt":"2017-06-14T17:48:58.46Z","updatedAt":"2017-08-17T17:29:13.593Z","serviceBusEndpoint":"https://azureeventgridusc.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManagewestus/providers/Microsoft.EventHub/namespaces/azureeventgridusw","name":"azureeventgridusw","type":"Microsoft.EventHub/Namespaces","location":"West US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridusw","createdAt":"2017-06-14T20:50:37.913Z","updatedAt":"2017-08-18T02:02:25.713Z","serviceBusEndpoint":"https://azureeventgridusw.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eg-nok1-usw2/providers/Microsoft.EventHub/namespaces/eg-nok1-usw2-eh-001","name":"eg-nok1-usw2-eh-001","type":"Microsoft.EventHub/Namespaces","location":"West US 2","tags":{},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":20,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eg-nok1-usw2-eh-001","createdAt":"2017-12-27T23:21:04.793Z","updatedAt":"2017-12-27T23:21:28.457Z","serviceBusEndpoint":"https://eg-nok1-usw2-eh-001.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.EventHub/namespaces/kalstest","name":"kalstest","type":"Microsoft.EventHub/Namespaces","location":"West US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:kalstest","createdAt":"2017-09-23T00:51:45.243Z","updatedAt":"2017-09-23T00:53:04.39Z","serviceBusEndpoint":"https://kalstest.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasrdwk3qo25uvmozoy46edwk5dxzoyevdhfg6dknv2qmsgo47phzgttwpaky/providers/Microsoft.EventHub/namespaces/eh-nsclihlp7wulxevqi","name":"eh-nsclihlp7wulxevqi","type":"Microsoft.EventHub/Namespaces","location":"North Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclihlp7wulxevqi","createdAt":"2018-01-17T03:16:45.66Z","updatedAt":"2018-01-17T03:20:19.66Z","serviceBusEndpoint":"https://eh-nsclihlp7wulxevqi.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTests/providers/Microsoft.EventHub/namespaces/TestingIgnite","name":"TestingIgnite","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:testingignite","createdAt":"2017-09-22T19:56:29.517Z","updatedAt":"2017-09-22T19:58:02.333Z","serviceBusEndpoint":"https://TestingIgnite.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliash6srcvrszaufw5liurq6vjxjgylz2ehpxjmnpaujh2fievbmshaeckggfg/providers/Microsoft.EventHub/namespaces/eh-nsclisz7d4nkm5pm4","name":"eh-nsclisz7d4nkm5pm4","type":"Microsoft.EventHub/Namespaces","location":"North + US 2","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:testingignite","createdAt":"2017-09-22T19:56:29.517Z","updatedAt":"2017-09-22T19:58:02.333Z","serviceBusEndpoint":"https://TestingIgnite.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasqntnpeizwqrb7tm33v2657das6z4nfis3cgc43vjowr65wjvip4z6vntjz/providers/Microsoft.EventHub/namespaces/eh-nsclidyruyxipfsqs","name":"eh-nsclidyruyxipfsqs","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclidyruyxipfsqs","createdAt":"2018-01-19T01:04:20.747Z","updatedAt":"2018-01-19T01:18:18.06Z","serviceBusEndpoint":"https://eh-nsclidyruyxipfsqs.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:34:21.437Z","updatedAt":"2018-01-19T02:34:45.413Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliash6srcvrszaufw5liurq6vjxjgylz2ehpxjmnpaujh2fievbmshaeckggfg/providers/Microsoft.EventHub/namespaces/eh-nsclisz7d4nkm5pm4","name":"eh-nsclisz7d4nkm5pm4","type":"Microsoft.EventHub/Namespaces","location":"North Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclisz7d4nkm5pm4","createdAt":"2018-01-10T23:12:14.507Z","updatedAt":"2018-01-10T23:26:27.68Z","serviceBusEndpoint":"https://eh-nsclisz7d4nkm5pm4.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasf5s5nkcheqjmc2mzn75m4snwj2wigrjvsqzse5ppwzn7si5ect3tsrravj/providers/Microsoft.EventHub/namespaces/eh-nsclinv3fa4okkwwm","name":"eh-nsclinv3fa4okkwwm","type":"Microsoft.EventHub/Namespaces","location":"North Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclinv3fa4okkwwm","createdAt":"2018-01-17T00:57:49.527Z","updatedAt":"2018-01-17T01:01:34.373Z","serviceBusEndpoint":"https://eh-nsclinv3fa4okkwwm.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasfbbatpr2evcnfafcvf4ss7zyy6qdqbhc5mbsalcb63gfwbjhukcicv6b3q/providers/Microsoft.EventHub/namespaces/eh-nsclixl2fuhach6d3","name":"eh-nsclixl2fuhach6d3","type":"Microsoft.EventHub/Namespaces","location":"North - Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclixl2fuhach6d3","createdAt":"2018-01-16T23:37:31.573Z","updatedAt":"2018-01-16T23:41:10.95Z","serviceBusEndpoint":"https://eh-nsclixl2fuhach6d3.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias2ent77voy7rwbiswwiop34bey35mxim3qb5qvzpligs53ynxgg7m6ukfx4/providers/Microsoft.EventHub/namespaces/eh-nscli5zoh2t65mkrw","name":"eh-nscli5zoh2t65mkrw","type":"Microsoft.EventHub/Namespaces","location":"South + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclixl2fuhach6d3","createdAt":"2018-01-16T23:37:31.573Z","updatedAt":"2018-01-16T23:41:10.95Z","serviceBusEndpoint":"https://eh-nsclixl2fuhach6d3.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace3q5lltod3bkd7vplj7dt6leygj2i4mqw4ajikdjjamsds7na2eu4od/providers/Microsoft.EventHub/namespaces/eventhubs-nsclidtnue","name":"eventhubs-nsclidtnue","type":"Microsoft.EventHub/Namespaces","location":"West + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nsclidtnue","createdAt":"2018-01-19T01:25:48.83Z","updatedAt":"2018-01-19T01:26:17.03Z","serviceBusEndpoint":"https://eventhubs-nsclidtnue.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_alias2ent77voy7rwbiswwiop34bey35mxim3qb5qvzpligs53ynxgg7m6ukfx4/providers/Microsoft.EventHub/namespaces/eh-nscli5zoh2t65mkrw","name":"eh-nscli5zoh2t65mkrw","type":"Microsoft.EventHub/Namespaces","location":"South Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscli5zoh2t65mkrw","createdAt":"2018-01-17T00:13:15.48Z","updatedAt":"2018-01-17T00:18:46.563Z","serviceBusEndpoint":"https://eh-nscli5zoh2t65mkrw.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasuabxoisqt5ghyuwgudrymd4wwztlqyh6poga4g3w54qnzu3z7robkl6t5q/providers/Microsoft.EventHub/namespaces/eh-nsclivwtrpelsn2fo","name":"eh-nsclivwtrpelsn2fo","type":"Microsoft.EventHub/Namespaces","location":"South Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclivwtrpelsn2fo","createdAt":"2018-01-16T02:43:45.98Z","updatedAt":"2018-01-16T02:47:51.253Z","serviceBusEndpoint":"https://eh-nsclivwtrpelsn2fo.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasnjnzdt2jvteq55ydkxnizbptzi46kbxpu5n4xr7ax3wadiiqaow4xcziwa/providers/Microsoft.EventHub/namespaces/eh-nscliy4ku454f37xv","name":"eh-nscliy4ku454f37xv","type":"Microsoft.EventHub/Namespaces","location":"North Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliy4ku454f37xv","createdAt":"2018-01-09T23:06:02.247Z","updatedAt":"2018-01-09T23:14:28.787Z","serviceBusEndpoint":"https://eh-nscliy4ku454f37xv.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGName-ps2924/providers/Microsoft.EventHub/namespaces/PSTestEH-ps4898","name":"PSTestEH-ps4898","type":"Microsoft.EventHub/Namespaces","location":"West @@ -211,14 +215,15 @@ interactions: Europe","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridweu","createdAt":"2017-06-14T20:52:52.023Z","updatedAt":"2017-08-10T01:30:49.39Z","serviceBusEndpoint":"https://azureeventgridweu.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasf5s5nkcheqjmc2mzn75m4snwj2wigrjvsqzse5ppwzn7si5ect3tsrravj/providers/Microsoft.EventHub/namespaces/eh-nsclihjhv5jcmrabz","name":"eh-nsclihjhv5jcmrabz","type":"Microsoft.EventHub/Namespaces","location":"South Central US","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclihjhv5jcmrabz","createdAt":"2018-01-17T00:57:15.01Z","updatedAt":"2018-01-17T01:01:34.577Z","serviceBusEndpoint":"https://eh-nsclihjhv5jcmrabz.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliascky7msnikdvg7monugngsco6s44dsylbg6ubkzabkjg3pq457pyq7kmcqu/providers/Microsoft.EventHub/namespaces/eh-nsclidyhusj34vxzm","name":"eh-nsclidyhusj34vxzm","type":"Microsoft.EventHub/Namespaces","location":"North Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nsclidyhusj34vxzm","createdAt":"2018-01-16T03:25:56.76Z","updatedAt":"2018-01-16T03:29:32.193Z","serviceBusEndpoint":"https://eh-nsclidyhusj34vxzm.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Basic","tier":"Basic","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GridToHubResourceGroup/providers/Microsoft.EventHub/namespaces/GridToHubTest","name":"GridToHubTest","type":"Microsoft.EventHub/Namespaces","location":"West - US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:gridtohubtest","createdAt":"2017-07-05T18:59:46.357Z","updatedAt":"2017-08-18T02:03:04.213Z","serviceBusEndpoint":"https://GridToHubTest.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":0},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eg-hitesh-perf/providers/Microsoft.EventHub/namespaces/eventgrid-eventhub-ussc","name":"eventgrid-eventhub-ussc","type":"Microsoft.EventHub/Namespaces","location":"South + US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:gridtohubtest","createdAt":"2017-07-05T18:59:46.357Z","updatedAt":"2017-08-18T02:03:04.213Z","serviceBusEndpoint":"https://GridToHubTest.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_aliasidgr3hilhuj2666kgpjl7s2hxqafg54ykpee3s6tjnl7qdna2rdh5uzzzf/providers/Microsoft.EventHub/namespaces/eh-nscliymtueoq7yw5b","name":"eh-nscliymtueoq7yw5b","type":"Microsoft.EventHub/Namespaces","location":"North + Central US","tags":{"{tag1: value1,":"","tag2: value2}":""},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eh-nscliymtueoq7yw5b","createdAt":"2018-01-19T00:09:20.84Z","updatedAt":"2018-01-19T00:23:19.863Z","serviceBusEndpoint":"https://eh-nscliymtueoq7yw5b.servicebus.windows.net:443/","status":"Disabled"}},{"sku":{"name":"Standard","tier":"Standard","capacity":0},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eg-hitesh-perf/providers/Microsoft.EventHub/namespaces/eventgrid-eventhub-ussc","name":"eventgrid-eventhub-ussc","type":"Microsoft.EventHub/Namespaces","location":"South Central US","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventgrid-eventhub-ussc","createdAt":"2017-05-25T20:36:13.997Z","updatedAt":"2017-05-25T20:36:37.893Z","serviceBusEndpoint":"https://eventgrid-eventhub-ussc.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GenevaWarmPathManageeastasia/providers/Microsoft.EventHub/namespaces/azureeventgridae","name":"azureeventgridae","type":"Microsoft.EventHub/Namespaces","location":"East Asia","tags":{},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:azureeventgridae","createdAt":"2017-06-14T20:56:44.477Z","updatedAt":"2017-08-02T01:08:31.437Z","serviceBusEndpoint":"https://azureeventgridae.servicebus.windows.net:443/","status":"Active"}}]}'} headers: cache-control: [no-cache] - content-length: ['36497'] + content-length: ['40305'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:55:38 GMT'] + date: ['Fri, 19 Jan 2018 02:35:11 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -242,12 +247,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces?api-version=2017-04-01 response: body: {string: '{"value":[{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002","name":"eventhubs-nscli000002","type":"Microsoft.EventHub/Namespaces","location":"West - US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-18T21:55:03.917Z","updatedAt":"2018-01-18T21:55:29.113Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}]}'} + US 2","tags":{"{tag1: value1}":""},"properties":{"isAutoInflateEnabled":true,"maximumThroughputUnits":4,"provisioningState":"Succeeded","metricId":"55f3dcd4-cac7-43b4-990b-a139d62a1eb2:eventhubs-nscli000002","createdAt":"2018-01-19T02:34:21.437Z","updatedAt":"2018-01-19T02:34:45.413Z","serviceBusEndpoint":"https://eventhubs-nscli000002.servicebus.windows.net:443/","status":"Active"}}]}'} headers: cache-control: [no-cache] content-length: ['751'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:55:39 GMT'] + date: ['Fri, 19 Jan 2018 02:35:12 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -277,7 +282,7 @@ interactions: cache-control: [no-cache] content-length: ['396'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:56:12 GMT'] + date: ['Fri, 19 Jan 2018 02:35:46 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -285,7 +290,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1195'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -307,7 +312,7 @@ interactions: cache-control: [no-cache] content-length: ['396'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:56:14 GMT'] + date: ['Fri, 19 Jan 2018 02:35:47 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -336,7 +341,7 @@ interactions: cache-control: [no-cache] content-length: ['424'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:56:16 GMT'] + date: ['Fri, 19 Jan 2018 02:35:49 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -360,12 +365,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003/listKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=QBPOowA2J2aTlgJxIYGeObvn6nsMGQk8j2sKpZdjC5o=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=6QX/+CGN/rEpNbjMKtTQc5b2Dg4hN8jeWm5eIKZFzKo=","primaryKey":"QBPOowA2J2aTlgJxIYGeObvn6nsMGQk8j2sKpZdjC5o=","secondaryKey":"6QX/+CGN/rEpNbjMKtTQc5b2Dg4hN8jeWm5eIKZFzKo=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=ShOTva4uzK+VPi4B6WYji4o52jDimVTa91MS8IwtWsw=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=q/IUezswQZWFYbC3pkEHtncJynllVGYdaQjioJV+918=","primaryKey":"ShOTva4uzK+VPi4B6WYji4o52jDimVTa91MS8IwtWsw=","secondaryKey":"q/IUezswQZWFYbC3pkEHtncJynllVGYdaQjioJV+918=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['536'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:56:18 GMT'] + date: ['Fri, 19 Jan 2018 02:35:51 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -373,7 +378,7 @@ interactions: strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: '{"keyType": "PrimaryKey"}' @@ -390,12 +395,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=l6TAHK0Cm+5aDE1xtDbMo0XSQVRKet/ImDfP+bEwZ0s=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=6QX/+CGN/rEpNbjMKtTQc5b2Dg4hN8jeWm5eIKZFzKo=","primaryKey":"l6TAHK0Cm+5aDE1xtDbMo0XSQVRKet/ImDfP+bEwZ0s=","secondaryKey":"6QX/+CGN/rEpNbjMKtTQc5b2Dg4hN8jeWm5eIKZFzKo=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=nGZzx90/TxFRYKJTHxuKbj001jCsIvXlRdJb9j3+nU0=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=q/IUezswQZWFYbC3pkEHtncJynllVGYdaQjioJV+918=","primaryKey":"nGZzx90/TxFRYKJTHxuKbj001jCsIvXlRdJb9j3+nU0=","secondaryKey":"q/IUezswQZWFYbC3pkEHtncJynllVGYdaQjioJV+918=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['536'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:56:35 GMT'] + date: ['Fri, 19 Jan 2018 02:36:08 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -420,12 +425,12 @@ interactions: method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/AuthorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: - body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=l6TAHK0Cm+5aDE1xtDbMo0XSQVRKet/ImDfP+bEwZ0s=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=EaUZu7L5CrZe0ri5inf09cQnYXkVgOlOuwh5koFlWWo=","primaryKey":"l6TAHK0Cm+5aDE1xtDbMo0XSQVRKet/ImDfP+bEwZ0s=","secondaryKey":"EaUZu7L5CrZe0ri5inf09cQnYXkVgOlOuwh5koFlWWo=","keyName":"cliAutho000003"}'} + body: {string: '{"primaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=nGZzx90/TxFRYKJTHxuKbj001jCsIvXlRdJb9j3+nU0=","secondaryConnectionString":"Endpoint=sb://eventhubs-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=EhsflsRuxCaqmEbr3zYHSRrFboD0zitvl3aQ2EK9sI8=","primaryKey":"nGZzx90/TxFRYKJTHxuKbj001jCsIvXlRdJb9j3+nU0=","secondaryKey":"EhsflsRuxCaqmEbr3zYHSRrFboD0zitvl3aQ2EK9sI8=","keyName":"cliAutho000003"}'} headers: cache-control: [no-cache] content-length: ['536'] content-type: [application/json; charset=utf-8] - date: ['Thu, 18 Jan 2018 21:56:53 GMT'] + date: ['Fri, 19 Jan 2018 02:36:26 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -454,13 +459,13 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:57:11 GMT'] + date: ['Fri, 19 Jan 2018 02:36:43 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -481,14 +486,14 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:57:12 GMT'] + date: ['Fri, 19 Jan 2018 02:36:45 GMT'] expires: ['-1'] location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace000001/providers/Microsoft.EventHub/namespaces/eventhubs-nscli000002/operationresults/eventhubs-nscli000002?api-version=2017-04-01'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] server-sb: [Service-Bus-Resource-Provider/SN1] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 202, message: Accepted} - request: body: null @@ -508,7 +513,7 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:57:43 GMT'] + date: ['Fri, 19 Jan 2018 02:37:15 GMT'] expires: ['-1'] pragma: [no-cache] server: [Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0] @@ -535,9 +540,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 18 Jan 2018 21:57:45 GMT'] + date: ['Fri, 19 Jan 2018 02:37:18 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZOQU1FU1BBQ0U2WFdVMk5IQUFPVkRJSUVNVkczUnwyRTdBN0Y1NDdDRkI2REJFLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGRUg6NUZOQU1FU1BBQ0VLV09ITEJSVEM0UU1aVFBMQlhMSnxCNTZCQjY1NTEzQjc4NTlELVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-ratelimit-remaining-subscription-writes: ['1199'] From 961f0944f638a4813f10374a94758eeea0830c49 Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Thu, 18 Jan 2018 20:38:08 -0800 Subject: [PATCH 05/10] exception handler --- .../azext_eventhub/_exception_handler.py | 16 ++++++++++++++++ src/eventhubs/azext_eventhub/commands.py | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 src/eventhubs/azext_eventhub/_exception_handler.py diff --git a/src/eventhubs/azext_eventhub/_exception_handler.py b/src/eventhubs/azext_eventhub/_exception_handler.py new file mode 100644 index 00000000000..7188b621eaa --- /dev/null +++ b/src/eventhubs/azext_eventhub/_exception_handler.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.util import CLIError + + +def eventhubs_exception_handler(ex): + from azext_eventhub.eventhub.models import ErrorResponseException + if isinstance(ex, ErrorResponseException): + raise CLIError(ex.message) + else: + import sys + from six import reraise + reraise(*sys.exc_info()) diff --git a/src/eventhubs/azext_eventhub/commands.py b/src/eventhubs/azext_eventhub/commands.py index 0ef6d857d16..fb15d82e1fe 100644 --- a/src/eventhubs/azext_eventhub/commands.py +++ b/src/eventhubs/azext_eventhub/commands.py @@ -10,6 +10,7 @@ from azext_eventhub._client_factory import (namespaces_mgmt_client_factory, event_hub_mgmt_client_factory, consumer_groups_mgmt_client_factory, disaster_recovery_mgmt_client_factory) +from ._exception_handler import eventhubs_exception_handler def load_command_table(self, _): @@ -17,24 +18,29 @@ def load_command_table(self, _): eh_namespace_util = CliCommandType( operations_tmpl='azext_eventhub.eventhub.operations.namespaces_operations#NamespacesOperations.{}', client_factory=namespaces_mgmt_client_factory, + exception_handler=eventhubs_exception_handler, client_arg_name='self' + ) eh_event_hub_util = CliCommandType( operations_tmpl='azext_eventhub.eventhub.operations.event_hubs_operations#EventHubsOperations.{}', client_factory=event_hub_mgmt_client_factory, + exception_handler=eventhubs_exception_handler, client_arg_name='self' ) eh_consumer_groups_util = CliCommandType( operations_tmpl='azext_eventhub.eventhub.operations.consumer_groups_operations#ConsumerGroupsOperations.{}', client_factory=consumer_groups_mgmt_client_factory, + exception_handler=eventhubs_exception_handler, client_arg_name='self' ) eh_geodr_util = CliCommandType( operations_tmpl='azext_eventhub.eventhub.operations.disaster_recovery_configs_operations#DisasterRecoveryConfigsOperations.{}', client_factory=disaster_recovery_mgmt_client_factory, + exception_handler=eventhubs_exception_handler, client_arg_name='self' ) From 14c391ff8569ca2cc1eeab23bfbfbc8db0d79411 Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Fri, 19 Jan 2018 15:55:38 -0800 Subject: [PATCH 06/10] Review Comments --- .../azext_eventhub/_exception_handler.py | 16 ---------- src/eventhubs/azext_eventhub/_help.py | 4 +-- src/eventhubs/azext_eventhub/_params.py | 11 +++---- src/eventhubs/azext_eventhub/commands.py | 31 ++++++++----------- src/eventhubs/azext_eventhub/custom.py | 18 ++++++----- 5 files changed, 30 insertions(+), 50 deletions(-) delete mode 100644 src/eventhubs/azext_eventhub/_exception_handler.py diff --git a/src/eventhubs/azext_eventhub/_exception_handler.py b/src/eventhubs/azext_eventhub/_exception_handler.py deleted file mode 100644 index 7188b621eaa..00000000000 --- a/src/eventhubs/azext_eventhub/_exception_handler.py +++ /dev/null @@ -1,16 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from knack.util import CLIError - - -def eventhubs_exception_handler(ex): - from azext_eventhub.eventhub.models import ErrorResponseException - if isinstance(ex, ErrorResponseException): - raise CLIError(ex.message) - else: - import sys - from six import reraise - reraise(*sys.exc_info()) diff --git a/src/eventhubs/azext_eventhub/_help.py b/src/eventhubs/azext_eventhub/_help.py index efabac8ae16..64fbc57a4da 100644 --- a/src/eventhubs/azext_eventhub/_help.py +++ b/src/eventhubs/azext_eventhub/_help.py @@ -44,7 +44,7 @@ examples: - name: Create a new namespace. text: az eventhubs namespace create --resource-group myresourcegroup --name mynamespace --location westus - --tags tag1=value1 tag2=value2 --sku-name Standard --sku-tier Standard' --is-auto-inflate-enabled False --maximum-throughput-units 30 + --tags tag1=value1 tag2=value2 --sku-name Standard --sku-tier Standard --is-auto-inflate-enabled False --maximum-throughput-units 30 """ helps['eventhubs namespace show'] = """ @@ -247,7 +247,7 @@ short-summary: Creates a Geo Recovery - Alias for the give Namespace examples: - name: Creats Geo Recovery configuration - Alias for the give Namespace - text: az eventhubs georecovery-alias create --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname --partner-namespace recourcearmid + text: az eventhubs georecovery-alias create --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname --partner-namespace resourcearmid """ helps['eventhubs georecovery-alias show'] = """ diff --git a/src/eventhubs/azext_eventhub/_params.py b/src/eventhubs/azext_eventhub/_params.py index e6e8f219937..c016bf891fc 100644 --- a/src/eventhubs/azext_eventhub/_params.py +++ b/src/eventhubs/azext_eventhub/_params.py @@ -36,11 +36,10 @@ def load_arguments_namespace(self, _): c.argument('authorization_rule_name', options_list=['--name', '-n'], help='name of the Namespace AuthorizationRule') with self.argument_context('eventhubs namespace authorizationrule create') as c: - c.argument('accessrights', options_list=['--access-rights'], - help='Authorization rule rights of type list, allowed values are Send, Listen or Manage') + c.argument('accessrights', options_list=['--access-rights'], arg_type=get_enum_type(['Send', 'Listen', 'Manage']), help='Authorization rule rights of type list, allowed values are Send, Listen or Manage') with self.argument_context('eventhubs namespace authorizationrule keys renew') as c: - c.argument('key_type', options_list=['--key-name'], arg_type=get_enum_type(['PrimaryKey', 'SecondaryKey'])) + c.argument('key_type', options_list=['--key-name'], arg_type=get_enum_type(['PrimaryKey', 'SecondaryKey']), help='specifies Primary or Secondary key needs to be reset') # region - Eventhub Create @@ -51,11 +50,11 @@ def load_arguments_eventhub(self, _): with self.argument_context('eventhubs eventhub create') as c: c.argument('message_retention_in_days', options_list=['--message-retention-in-days'], type=int, help='Number of days to retain the events for this Event Hub, value should be 1 to 7 days') c.argument('partition_count', options_list=['--partition-count'], type=int, help='Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.') - c.argument('status', options_list=['--status'], arg_type=get_enum_type(['Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'])) - c.argument('enabled', options_list=['--enabled'], help='A value that indicates whether capture description is enabled.') + c.argument('status', options_list=['--status'], arg_type=get_enum_type(['Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown']), help='Status of Eventhub') + c.argument('enabled', options_list=['--enabled'], type=bool, help='A value that indicates whether capture description is enabled.') c.argument('encoding', options_list=['--encoding'], arg_type=get_enum_type(['Avro']), help='Enumerates the possible values for the encoding format of capture description.') c.argument('capture_interval_seconds', type=int, options_list=['--capture-interval-seconds'], help='The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds') - c.argument('capture_size_bytes', type=int, options_list=['--capture-size-bytes'], help='The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes') + c.argument('capture_size_limit_bytes', options_list=['--capture-size-limit-bytes'], type=int, help='The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes') c.argument('destination_name', options_list=['--destination-name'], help='Name for capture destination') c.argument('storage_account_resource_id', options_list=['--storage-account-resource-id'], help='Resource id of the storage account to be used to create the blobs') c.argument('blob_container', options_list=['--blob-container'], help='Blob container Name') diff --git a/src/eventhubs/azext_eventhub/commands.py b/src/eventhubs/azext_eventhub/commands.py index fb15d82e1fe..7736039b371 100644 --- a/src/eventhubs/azext_eventhub/commands.py +++ b/src/eventhubs/azext_eventhub/commands.py @@ -10,7 +10,7 @@ from azext_eventhub._client_factory import (namespaces_mgmt_client_factory, event_hub_mgmt_client_factory, consumer_groups_mgmt_client_factory, disaster_recovery_mgmt_client_factory) -from ._exception_handler import eventhubs_exception_handler +from .custom import empty_on_404, empty_on_400 def load_command_table(self, _): @@ -18,44 +18,39 @@ def load_command_table(self, _): eh_namespace_util = CliCommandType( operations_tmpl='azext_eventhub.eventhub.operations.namespaces_operations#NamespacesOperations.{}', client_factory=namespaces_mgmt_client_factory, - exception_handler=eventhubs_exception_handler, client_arg_name='self' - ) eh_event_hub_util = CliCommandType( operations_tmpl='azext_eventhub.eventhub.operations.event_hubs_operations#EventHubsOperations.{}', client_factory=event_hub_mgmt_client_factory, - exception_handler=eventhubs_exception_handler, client_arg_name='self' ) eh_consumer_groups_util = CliCommandType( operations_tmpl='azext_eventhub.eventhub.operations.consumer_groups_operations#ConsumerGroupsOperations.{}', client_factory=consumer_groups_mgmt_client_factory, - exception_handler=eventhubs_exception_handler, client_arg_name='self' ) eh_geodr_util = CliCommandType( operations_tmpl='azext_eventhub.eventhub.operations.disaster_recovery_configs_operations#DisasterRecoveryConfigsOperations.{}', client_factory=disaster_recovery_mgmt_client_factory, - exception_handler=eventhubs_exception_handler, client_arg_name='self' ) # Namespace Region with self.command_group('eventhubs namespace', eh_namespace_util, client_factory=namespaces_mgmt_client_factory) as g: g.custom_command('create', 'cli_namespace_create') - g.command('show', 'get') - g.custom_command('list', 'cli_namespace_list') + g.command('show', 'get', exception_handler=empty_on_404) + g.custom_command('list', 'cli_namespace_list', exception_handler=empty_on_404) g.command('delete', 'delete') g.command('exists', 'check_name_availability') with self.command_group('eventhubs namespace authorizationrule', eh_namespace_util, client_factory=namespaces_mgmt_client_factory) as g: g.custom_command('create', 'cli_namespaceautho_create') - g.command('show', 'get_authorization_rule') - g.command('list', 'list_authorization_rules') + g.command('show', 'get_authorization_rule', exception_handler=empty_on_404) + g.command('list', 'list_authorization_rules', exception_handler=empty_on_404) g.command('keys list', 'list_keys') g.command('keys renew', 'regenerate_keys') g.command('delete', 'delete_authorization_rule') @@ -63,14 +58,14 @@ def load_command_table(self, _): # EventHub Region with self.command_group('eventhubs eventhub', eh_event_hub_util, client_factory=event_hub_mgmt_client_factory) as g: g.custom_command('create', 'cli_eheventhub_create') - g.command('show', 'get') - g.command('list', 'list_by_namespace') + g.command('show', 'get', exception_handler=empty_on_404) + g.command('list', 'list_by_namespace', exception_handler=empty_on_404) g.command('delete', 'delete') with self.command_group('eventhubs eventhub authorizationrule', eh_event_hub_util, client_factory=event_hub_mgmt_client_factory) as g: g.custom_command('create', 'cli_eheventhubautho_create') - g.command('show', 'get_authorization_rule') - g.command('list', 'list_authorization_rules') + g.command('show', 'get_authorization_rule', exception_handler=empty_on_404) + g.command('list', 'list_authorization_rules', exception_handler=empty_on_404) g.command('keys list', 'list_keys') g.command('keys renew', 'regenerate_keys') g.command('delete', 'delete_authorization_rule') @@ -78,15 +73,15 @@ def load_command_table(self, _): # ConsumerGroup Region with self.command_group('eventhubs consumergroup', eh_consumer_groups_util, client_factory=consumer_groups_mgmt_client_factory) as g: g.command('create', 'create_or_update') - g.command('show', 'get') - g.command('list', 'list_by_event_hub') + g.command('show', 'get', exception_handler=empty_on_404) + g.command('list', 'list_by_event_hub', exception_handler=empty_on_404) g.command('delete', 'delete') # DisasterRecoveryConfigs Region with self.command_group('eventhubs georecovery-alias', eh_geodr_util, client_factory=disaster_recovery_mgmt_client_factory) as g: g.command('create', 'create_or_update') - g.command('show', 'get') - g.command('list', 'list') + g.command('show', 'get', exception_handler=empty_on_404) + g.command('list', 'list', exception_handler=empty_on_404) g.command('break-pair', 'break_pairing') g.command('fail-over', 'fail_over') g.command('exists', 'check_name_availability') diff --git a/src/eventhubs/azext_eventhub/custom.py b/src/eventhubs/azext_eventhub/custom.py index b253d8e341d..67e7bb393b6 100644 --- a/src/eventhubs/azext_eventhub/custom.py +++ b/src/eventhubs/azext_eventhub/custom.py @@ -7,7 +7,6 @@ # pylint: disable=too-many-lines from knack.util import CLIError - from azext_eventhub._utils import accessrights_converter from azext_eventhub.eventhub.models import (EHNamespace, Sku, Eventhub, CaptureDescription, Destination) @@ -23,17 +22,12 @@ def cli_namespace_create(client, resource_group_name, namespace_name, location, def cli_namespace_list(client, resource_group_name=None, namespace_name=None): cmd_result = None - if resource_group_name and namespace_name: - cmd_result = client.get(resource_group_name, namespace_name) if resource_group_name and not namespace_name: - cmd_result = client.list_by_resource_group(resource_group_name, namespace_name) + cmd_result = client.list_by_resource_group(resource_group_name) if not resource_group_name and not namespace_name: - cmd_result = client.list(resource_group_name, namespace_name) - - if not cmd_result: - raise CLIError('--resource-group name required when namespace name is provided') + cmd_result = client.list() return cmd_result @@ -79,3 +73,11 @@ def cli_eheventhubautho_create(client, resource_group_name, namespace_name, even def cli_ehconsumergroup_create(client, resource_group_name, namespace_name, event_hub_name, name, user_metadata): return client.create_or_update(resource_group_name, namespace_name, event_hub_name, name, user_metadata) + + +# pylint: disable=inconsistent-return-statements +def empty_on_404(ex): + from azext_eventhub.eventhub.models import ErrorResponseException + if isinstance(ex, ErrorResponseException) and ex.response.status_code == 404: + return None + raise ex From a73583c73bf25121614972c238f1de358009e2fc Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Fri, 19 Jan 2018 16:10:05 -0800 Subject: [PATCH 07/10] lint fixes --- src/eventhubs/azext_eventhub/commands.py | 2 +- src/eventhubs/azext_eventhub/custom.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/eventhubs/azext_eventhub/commands.py b/src/eventhubs/azext_eventhub/commands.py index 7736039b371..e63c1e4f40c 100644 --- a/src/eventhubs/azext_eventhub/commands.py +++ b/src/eventhubs/azext_eventhub/commands.py @@ -10,7 +10,7 @@ from azext_eventhub._client_factory import (namespaces_mgmt_client_factory, event_hub_mgmt_client_factory, consumer_groups_mgmt_client_factory, disaster_recovery_mgmt_client_factory) -from .custom import empty_on_404, empty_on_400 +from .custom import empty_on_404 def load_command_table(self, _): diff --git a/src/eventhubs/azext_eventhub/custom.py b/src/eventhubs/azext_eventhub/custom.py index 67e7bb393b6..e5a1e8ac29b 100644 --- a/src/eventhubs/azext_eventhub/custom.py +++ b/src/eventhubs/azext_eventhub/custom.py @@ -6,7 +6,6 @@ # pylint: disable=line-too-long # pylint: disable=too-many-lines -from knack.util import CLIError from azext_eventhub._utils import accessrights_converter from azext_eventhub.eventhub.models import (EHNamespace, Sku, Eventhub, CaptureDescription, Destination) From 53cd73d4e1229560afd13eb5a2db4c019fafeea8 Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Tue, 23 Jan 2018 18:56:22 -0800 Subject: [PATCH 08/10] Review Comments for Adding Help sub groups and exception fix --- src/eventhubs/azext_eventhub/_help.py | 50 ++++++++++++++++++-------- src/eventhubs/azext_eventhub/custom.py | 7 ++-- 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/src/eventhubs/azext_eventhub/_help.py b/src/eventhubs/azext_eventhub/_help.py index 64fbc57a4da..28cb754bdaa 100644 --- a/src/eventhubs/azext_eventhub/_help.py +++ b/src/eventhubs/azext_eventhub/_help.py @@ -15,19 +15,39 @@ short-summary: Manage Azure Event Hubs namespace and authorizationrule """ +helps['eventhubs namespace authorizationrule'] = """ + type: group + short-summary: Manage Azure Service Bus AuthorizationRule for Namespace +""" + +helps['eventhubs namespace authorizationrule keys'] = """ + type: group + short-summary: Manage Azure AuthorizationRule connection strings for Namespace +""" + helps['eventhubs eventhub'] = """ type: group short-summary: Manage Azure Event Hubs eventhub and authorization-rule """ +helps['eventhubs eventhub authorizationrule'] = """ + type: group + short-summary: Manage Azure Service Bus AuthorizationRule for Eventhub +""" + +helps['eventhubs eventhub authorizationrule keys'] = """ + type: group + short-summary: Manage Azure AuthorizationRule connection strings for Eventhub +""" + helps['eventhubs consumergroup'] = """ type: group short-summary: Manage Azure Event Hubs consumergroup """ helps['eventhubs georecovery-alias'] = """ - type: group - short-summary: Manage Azure Event Hubs Geo Recovery configuration - Alias + type: group + short-summary: Manage Azure Event Hubs Geo Recovery configuration Alias """ helps['eventhubs namespace exists'] = """ @@ -220,9 +240,9 @@ helps['eventhubs consumergroup list'] = """ type: command - short-summary: List the ComsumerGroup by Eventhub + short-summary: List the ConsumerGroup by Eventhub examples: - - name: Shows the ComsumerGroup by Eventhub. + - name: Shows the ConsumerGroup by Eventhub. text: az eventhubs consumergroup get --resource-group myresourcegroup --namespace-name mynamespace --event-hub-name myeventhub """ @@ -252,12 +272,12 @@ helps['eventhubs georecovery-alias show'] = """ type: command - short-summary: shows details of Geo Recovery configuration - Alias for Primay/Secondary Namespace + short-summary: shows details of Geo Recovery configuration - Alias for Primay or Secondary Namespace examples: - - name: show details of Geo Recovery configuration - Alias of the Primary Namespace - text: az eventhubs alias show --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname - - name: Get details of Geo Recovery configuration - Alias of the Secondary Namespace - text: az eventhubs georecovery-alias show --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname + - name: Shows details of Geo Recovery configuration - Alias of the Primary Namespace + text: az eventhubs georecovery-alias show --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname + - name: Shows details of Geo Recovery configuration - Alias of the Secondary Namespace + text: az eventhubs georecovery-alias show --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname """ helps['eventhubs georecovery-alias authorizationrule show'] = """ @@ -268,12 +288,12 @@ text: az eventhubs georecovery-alias authorizationrule show --resource-group myresourcegroup --namespace-name mynamespace """ -helps['servicebus georecovery-alias authorizationrule list'] = """ +helps['eventhubs georecovery-alias authorizationrule list'] = """ type: command short-summary: Shows the list of AuthorizationRule by Event Hubs Namespace examples: - name: Shows the list of AuthorizationRule by Event Hubs Namespace - text: az eventhubs georecovery-alias authorizationrule show --resource-group myresourcegroup --namespace-name mynamespace + text: az eventhubs georecovery-alias authorizationrule list --resource-group myresourcegroup --namespace-name mynamespace """ helps['eventhubs georecovery-alias authorizationrule keys list'] = """ @@ -294,16 +314,16 @@ helps['eventhubs georecovery-alias fail-over'] = """ type: command - short-summary: Envokes Geo Recovery configuration - Alias to point to the secondary namespace + short-summary: Invokes Geo Recovery configuration - Alias to point to the secondary namespace examples: - - name: Envokes GEO DR failover and reconfigure the alias to point to the secondary namespace + - name: Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace text: az eventhubs georecovery-alias fail-over --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname """ helps['eventhubs georecovery-alias delete'] = """ type: command - short-summary: Delete Geo Recovery - Alias + short-summary: Delete Geo Recovery - Alias examples: - - name: Delete Geo Recovery configuration - Alias + - name: Delete Geo Recovery configuration - Alias text: az eventhubs georecovery-alias delete --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname """ diff --git a/src/eventhubs/azext_eventhub/custom.py b/src/eventhubs/azext_eventhub/custom.py index e5a1e8ac29b..a269552a23f 100644 --- a/src/eventhubs/azext_eventhub/custom.py +++ b/src/eventhubs/azext_eventhub/custom.py @@ -19,15 +19,12 @@ def cli_namespace_create(client, resource_group_name, namespace_name, location, capacity), is_auto_inflate_enabled, maximum_throughput_units)) -def cli_namespace_list(client, resource_group_name=None, namespace_name=None): +def cli_namespace_list(client, resource_group_name=None): cmd_result = None - if resource_group_name and not namespace_name: + if resource_group_name: cmd_result = client.list_by_resource_group(resource_group_name) - if not resource_group_name and not namespace_name: - cmd_result = client.list() - return cmd_result From f96b09ee7c5ce2c83cc5e2d55b13332376ef8ea8 Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Wed, 24 Jan 2018 16:45:38 -0800 Subject: [PATCH 09/10] added help for geodr authorule and keys --- src/eventhubs/azext_eventhub/_help.py | 14 ++++++++++++-- src/eventhubs/azext_eventhub/_params.py | 2 +- src/eventhubs/azext_eventhub/custom.py | 3 +++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/eventhubs/azext_eventhub/_help.py b/src/eventhubs/azext_eventhub/_help.py index 28cb754bdaa..ece1ccad04e 100644 --- a/src/eventhubs/azext_eventhub/_help.py +++ b/src/eventhubs/azext_eventhub/_help.py @@ -17,12 +17,12 @@ helps['eventhubs namespace authorizationrule'] = """ type: group - short-summary: Manage Azure Service Bus AuthorizationRule for Namespace + short-summary: Manage Azure Event Hubs AuthorizationRule for Namespace """ helps['eventhubs namespace authorizationrule keys'] = """ type: group - short-summary: Manage Azure AuthorizationRule connection strings for Namespace + short-summary: Manage Azure Event Hubs AuthorizationRule connection strings for Namespace """ helps['eventhubs eventhub'] = """ @@ -50,6 +50,16 @@ short-summary: Manage Azure Event Hubs Geo Recovery configuration Alias """ +helps['eventhubs georecovery-alias authorizationrule'] = """ + type: group + short-summary: Manage Azure Event Hubs AuthorizationRule for Geo Recovery configuration Alias +""" + +helps['eventhubs georecovery-alias authorizationrule keys'] = """ + type: group + short-summary: Manage Azure Event Hubs AuthorizationRule connection strings for Geo Recovery configuration Alias +""" + helps['eventhubs namespace exists'] = """ type: command short-summary: check for the availability of the given name for the Namespace diff --git a/src/eventhubs/azext_eventhub/_params.py b/src/eventhubs/azext_eventhub/_params.py index c016bf891fc..91296cdaa50 100644 --- a/src/eventhubs/azext_eventhub/_params.py +++ b/src/eventhubs/azext_eventhub/_params.py @@ -67,7 +67,7 @@ def load_arguments_eventhub(self, _): c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the EventHub') with self.argument_context('eventhubs eventhub authorizationrule create') as c: - c.argument('accessrights', options_list=['--access-rights'], help='AuthorizationRule rights of type list, allowed values are Send, Listen or Manage') + c.argument('accessrights', options_list=['--access-rights'], arg_type=get_enum_type(['Send', 'Listen', 'Manage']), help='AuthorizationRule rights of type list, allowed values are Send, Listen or Manage') with self.argument_context('eventhubs eventhub authorizationrule keys renew') as c: c.argument('key_type', options_list=['--key-name'], arg_type=get_enum_type(['PrimaryKey', 'SecondaryKey'])) diff --git a/src/eventhubs/azext_eventhub/custom.py b/src/eventhubs/azext_eventhub/custom.py index a269552a23f..489d4f166a2 100644 --- a/src/eventhubs/azext_eventhub/custom.py +++ b/src/eventhubs/azext_eventhub/custom.py @@ -25,6 +25,9 @@ def cli_namespace_list(client, resource_group_name=None): if resource_group_name: cmd_result = client.list_by_resource_group(resource_group_name) + if not resource_group_name: + cmd_result = client.list() + return cmd_result From 8899fb61a8d4f0a1e554af67e40f65ee589d0b15 Mon Sep 17 00:00:00 2001 From: "Ajit Maruti Navasare (MINDTREE LIMITED)" Date: Wed, 24 Jan 2018 17:10:44 -0800 Subject: [PATCH 10/10] corrected access rights help text --- src/eventhubs/azext_eventhub/_params.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eventhubs/azext_eventhub/_params.py b/src/eventhubs/azext_eventhub/_params.py index 91296cdaa50..77d236b94c8 100644 --- a/src/eventhubs/azext_eventhub/_params.py +++ b/src/eventhubs/azext_eventhub/_params.py @@ -36,7 +36,7 @@ def load_arguments_namespace(self, _): c.argument('authorization_rule_name', options_list=['--name', '-n'], help='name of the Namespace AuthorizationRule') with self.argument_context('eventhubs namespace authorizationrule create') as c: - c.argument('accessrights', options_list=['--access-rights'], arg_type=get_enum_type(['Send', 'Listen', 'Manage']), help='Authorization rule rights of type list, allowed values are Send, Listen or Manage') + c.argument('accessrights', options_list=['--access-rights'], arg_type=get_enum_type(['Send', 'Listen', 'Manage']), help='Authorization rule rights of type list') with self.argument_context('eventhubs namespace authorizationrule keys renew') as c: c.argument('key_type', options_list=['--key-name'], arg_type=get_enum_type(['PrimaryKey', 'SecondaryKey']), help='specifies Primary or Secondary key needs to be reset') @@ -67,7 +67,7 @@ def load_arguments_eventhub(self, _): c.argument('event_hub_name', options_list=['--event-hub-name'], help='name of the EventHub') with self.argument_context('eventhubs eventhub authorizationrule create') as c: - c.argument('accessrights', options_list=['--access-rights'], arg_type=get_enum_type(['Send', 'Listen', 'Manage']), help='AuthorizationRule rights of type list, allowed values are Send, Listen or Manage') + c.argument('accessrights', options_list=['--access-rights'], arg_type=get_enum_type(['Send', 'Listen', 'Manage']), help='AuthorizationRule rights of type list') with self.argument_context('eventhubs eventhub authorizationrule keys renew') as c: c.argument('key_type', options_list=['--key-name'], arg_type=get_enum_type(['PrimaryKey', 'SecondaryKey']))