From 8891292a565a9ffe048fb070a922abd65b844435 Mon Sep 17 00:00:00 2001 From: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 1 Aug 2023 12:35:21 +0800 Subject: [PATCH] [TimeSeriesInsights] `az tsi access-policy/environment/reference-data-set`: Migrate to Codegen V2 (#6577) * initial gen * az tsi environment gen1 create tested * az tsi access-policy tested * location option list add -l * change to patch for reference-data-set update, fix referenceDataSetName regex pattern for create, tests passed for reference-data-set * tests passed for environment gen1 * tests passed for environment gen2 * unwrap more class into obj * dont use aaz for event-source eventhub * testsed event-source iothub which still uses sdk as well * remove all unused code, lint, rerun test, update version * move command import into function, use inheritance --- src/timeseriesinsights/HISTORY.rst | 4 + .../azext_timeseriesinsights/__init__.py | 19 +- .../_client_factory.py | 12 - .../azext_timeseriesinsights/_help.py | 138 +--- .../azext_timeseriesinsights/_params.py | 34 - .../azext_timeseriesinsights/aaz/__init__.py | 6 + .../aaz/latest/__init__.py | 6 + .../aaz/latest/tsi/__cmd_group.py | 23 + .../aaz/latest/tsi/__init__.py | 11 + .../latest/tsi/access_policy/__cmd_group.py | 23 + .../aaz/latest/tsi/access_policy/__init__.py | 16 + .../aaz/latest/tsi/access_policy/_create.py | 247 ++++++ .../aaz/latest/tsi/access_policy/_delete.py | 149 ++++ .../aaz/latest/tsi/access_policy/_list.py | 191 +++++ .../aaz/latest/tsi/access_policy/_show.py | 196 +++++ .../aaz/latest/tsi/access_policy/_update.py | 238 ++++++ .../aaz/latest/tsi/environment/__cmd_group.py | 23 + .../aaz/latest/tsi/environment/__init__.py | 16 + .../aaz/latest/tsi/environment/_create.py | 579 ++++++++++++++ .../aaz/latest/tsi/environment/_delete.py | 139 ++++ .../aaz/latest/tsi/environment/_list.py | 574 ++++++++++++++ .../aaz/latest/tsi/environment/_show.py | 371 +++++++++ .../aaz/latest/tsi/environment/_update.py | 747 ++++++++++++++++++ .../tsi/reference_data_set/__cmd_group.py | 23 + .../latest/tsi/reference_data_set/__init__.py | 16 + .../latest/tsi/reference_data_set/_create.py | 302 +++++++ .../latest/tsi/reference_data_set/_delete.py | 149 ++++ .../latest/tsi/reference_data_set/_list.py | 212 +++++ .../latest/tsi/reference_data_set/_show.py | 217 +++++ .../latest/tsi/reference_data_set/_update.py | 247 ++++++ .../azext_metadata.json | 2 +- .../azext_timeseriesinsights/commands.py | 50 +- .../azext_timeseriesinsights/custom.py | 270 ++----- ...test_timeseriesinsights_access_policy.yaml | 171 +--- ...t_timeseriesinsights_environment_gen1.yaml | 278 +++---- ...t_timeseriesinsights_environment_gen2.yaml | 153 ++-- ...eseriesinsights_event_source_eventhub.yaml | 228 +++--- ...imeseriesinsights_event_source_iothub.yaml | 532 ++++++------- ...timeseriesinsights_reference_data_set.yaml | 187 ++--- .../test_timeseriesinsights_scenario.py | 14 +- src/timeseriesinsights/setup.py | 2 +- 41 files changed, 5397 insertions(+), 1418 deletions(-) create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/__init__.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/__init__.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/__cmd_group.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/__init__.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/__cmd_group.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/__init__.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_create.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_delete.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_list.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_show.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_update.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/__cmd_group.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/__init__.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_create.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_delete.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_list.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_show.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_update.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/__cmd_group.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/__init__.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_create.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_delete.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_list.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_show.py create mode 100644 src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_update.py diff --git a/src/timeseriesinsights/HISTORY.rst b/src/timeseriesinsights/HISTORY.rst index 4efed509982..18dcbc51204 100644 --- a/src/timeseriesinsights/HISTORY.rst +++ b/src/timeseriesinsights/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +1.0.0b1 +++++++ +* Migrate `az tsi access-policy/environment/reference-data-set` to CodeGen + 0.2.1 ++++++ * Command group ``az tsi`` GA diff --git a/src/timeseriesinsights/azext_timeseriesinsights/__init__.py b/src/timeseriesinsights/azext_timeseriesinsights/__init__.py index 2e7b1121151..6000787705b 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/__init__.py +++ b/src/timeseriesinsights/azext_timeseriesinsights/__init__.py @@ -16,15 +16,22 @@ class TimeSeriesInsightsClientCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_timeseriesinsights._client_factory import cf_timeseriesinsights_cl - timeseriesinsights_custom = CliCommandType( - operations_tmpl='azext_timeseriesinsights.custom#{}', - client_factory=cf_timeseriesinsights_cl) - parent = super(TimeSeriesInsightsClientCommandsLoader, self) - parent.__init__(cli_ctx=cli_ctx, custom_command_type=timeseriesinsights_custom) + custom_command_type = CliCommandType(operations_tmpl='azext_timeseriesinsights.custom#{}') + super(TimeSeriesInsightsClientCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=custom_command_type) def load_command_table(self, args): from azext_timeseriesinsights.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) load_command_table(self, args) return self.command_table diff --git a/src/timeseriesinsights/azext_timeseriesinsights/_client_factory.py b/src/timeseriesinsights/azext_timeseriesinsights/_client_factory.py index 49ad0e887df..7937235dc17 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/_client_factory.py +++ b/src/timeseriesinsights/azext_timeseriesinsights/_client_factory.py @@ -12,17 +12,5 @@ def cf_timeseriesinsights_cl(cli_ctx, *_): TimeSeriesInsightsClient) -def cf_environment(cli_ctx, *_): - return cf_timeseriesinsights_cl(cli_ctx).environments - - def cf_event_source(cli_ctx, *_): return cf_timeseriesinsights_cl(cli_ctx).event_sources - - -def cf_reference_data_set(cli_ctx, *_): - return cf_timeseriesinsights_cl(cli_ctx).reference_data_sets - - -def cf_access_policy(cli_ctx, *_): - return cf_timeseriesinsights_cl(cli_ctx).access_policies diff --git a/src/timeseriesinsights/azext_timeseriesinsights/_help.py b/src/timeseriesinsights/azext_timeseriesinsights/_help.py index b847ff2770d..4887a8dcc3d 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/_help.py +++ b/src/timeseriesinsights/azext_timeseriesinsights/_help.py @@ -7,20 +7,9 @@ from knack.help_files import helps -helps['tsi'] = """ - type: group - short-summary: Manage Azure Time Series Insights. -""" - -helps['tsi environment'] = """ - type: group - short-summary: Manage environment with Azure Time Series Insights. -""" - helps['tsi environment list'] = """ type: command - short-summary: "List all the available environments associated with the subscription and within the specified \ - resource group." + short-summary: "List all the available environments associated with the subscription and within the specified resource group." examples: - name: EnvironmentsByResourceGroup text: |- @@ -30,15 +19,6 @@ az tsi environment list """ -helps['tsi environment show'] = """ - type: command - short-summary: "Show the environment with the specified name in the specified subscription and resource group." - examples: - - name: EnvironmentsGet - text: |- - az tsi environment show --name "env1" --resource-group "rg1" -""" - helps['tsi environment gen1'] = """ type: group short-summary: "Manage a gen1 environment in the specified subscription and resource group." @@ -173,29 +153,6 @@ --storage-configuration account-name=your-account-name management-key=your-account-key """ -helps['tsi environment delete'] = """ - type: command - short-summary: "Delete the environment with the specified name in the specified subscription and resource group." - examples: - - name: EnvironmentsDelete - text: |- - az tsi environment delete --name "env1" --resource-group "rg1" -""" - -helps['tsi environment wait'] = """ - type: command - short-summary: Place the CLI in a waiting state until a condition of the timeseriesinsights environment is met. - examples: - - name: Pause executing next line of CLI script until the timeseriesinsights environment is successfully \ -created. - text: |- - az tsi environment wait --name "env1" --resource-group "rg1" --created - - name: Pause executing next line of CLI script until the timeseriesinsights environment is successfully \ -updated. - text: |- - az tsi environment wait --name "env1" --resource-group "rg1" --updated -""" - helps['tsi event-source'] = """ type: group short-summary: Manage event source with timeseriesinsights @@ -283,11 +240,6 @@ az tsi event-source delete --environment-name "env1" --name "es1" --resource-group "rg1" """ -helps['tsi reference-data-set'] = """ - type: group - short-summary: Manage reference data set with timeseriesinsights -""" - helps['tsi reference-data-set list'] = """ type: command short-summary: "List all the available reference data sets associated with the subscription and within the \ @@ -298,16 +250,6 @@ az tsi reference-data-set list --environment-name "env1" --resource-group "rg1" """ -helps['tsi reference-data-set show'] = """ - type: command - short-summary: "Show the reference data set with the specified name in the specified environment." - examples: - - name: ReferenceDataSetsGet - text: |- - az tsi reference-data-set show --environment-name "env1" --name "rds1" --resource-group \ -"rg1" -""" - helps['tsi reference-data-set create'] = """ type: command short-summary: "Create a reference data set in the specified environment." @@ -328,81 +270,3 @@ --key-properties name="DeviceId1" type="String" --key-properties name="DeviceFloor" type="Double" --name "rds1" \ --resource-group "rg1" """ - -helps['tsi reference-data-set update'] = """ - type: command - short-summary: "Update the reference data set." - examples: - - name: ReferenceDataSetsUpdate - text: |- - az tsi reference-data-set update --environment-name "env1" --name "rds1" --tags \ -someKey="someValue" --resource-group "rg1" -""" - -helps['tsi reference-data-set delete'] = """ - type: command - short-summary: "Delete the reference data set." - examples: - - name: ReferenceDataSetsDelete - text: |- - az tsi reference-data-set delete --environment-name "env1" --name "rds1" \ ---resource-group "rg1" -""" - -helps['tsi access-policy'] = """ - type: group - short-summary: Manage access policy with timeseriesinsights -""" - -helps['tsi access-policy list'] = """ - type: command - short-summary: "List all the available access policies associated with the environment." - examples: - - name: AccessPoliciesByEnvironment - text: |- - az tsi access-policy list --environment-name "env1" --resource-group "rg1" -""" - -helps['tsi access-policy show'] = """ - type: command - short-summary: "Show the access policy with the specified name in the specified environment." - examples: - - name: AccessPoliciesGet - text: |- - az tsi access-policy show --name "ap1" --environment-name "env1" --resource-group "rg1" -""" - -helps['tsi access-policy create'] = """ - type: command - short-summary: "Create an access policy in the specified environment." - parameters: - - name: --principal-object-id - populator-commands: - - az ad user - - az ad sp - examples: - - name: AccessPoliciesCreate - text: |- - az tsi access-policy create --name "ap1" --environment-name "env1" --description "some \ -description" --principal-object-id "aGuid" --roles Reader Contributor --resource-group "rg1" -""" - -helps['tsi access-policy update'] = """ - type: command - short-summary: "Update the access policy." - examples: - - name: AccessPoliciesUpdate - text: |- - az tsi access-policy update --name "ap1" --roles "Reader" --roles "Contributor" \ ---environment-name "env1" --resource-group "rg1" -""" - -helps['tsi access-policy delete'] = """ - type: command - short-summary: "Delete the access policy." - examples: - - name: AccessPoliciesDelete - text: |- - az tsi access-policy delete --name "ap1" --environment-name "env1" --resource-group \ -"rg1" -""" diff --git a/src/timeseriesinsights/azext_timeseriesinsights/_params.py b/src/timeseriesinsights/azext_timeseriesinsights/_params.py index 9580a305ad2..0c2aed7a52d 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/_params.py +++ b/src/timeseriesinsights/azext_timeseriesinsights/_params.py @@ -28,18 +28,6 @@ def load_arguments(self, _): - - with self.argument_context('tsi environment') as c: - c.argument('resource_group_name', resource_group_name_type) - c.argument('environment_name', options_list=['--name', '-n', '--environment-name'], type=str, help='The name ' - 'of the Time Series Insights environment associated with the specified resource group.', id_part='' - 'name') - c.argument('expand', type=str, help='Setting $expand=status will include the status of the internal services ' - 'of the environment in the Time Series Insights service.') - - with self.argument_context('tsi environment list') as c: - c.argument('environment_name', id_part=None) - with self.argument_context('tsi environment gen1') as c: c.argument('environment_name', options_list=['--name', '-n', '--environment-name'], type=str, help='Name of the' ' environment', id_part='name') @@ -185,27 +173,5 @@ def load_arguments(self, _): 'reference data with events or while adding new reference data. When \'OrdinalIgnoreCase\' is set, ' 'case insensitive comparison will be used.') - with self.argument_context('tsi reference-data-set create') as c: - c.argument('environment_name', id_part=None) - c.argument('reference_data_set_name', id_part=None) - with self.argument_context('tsi reference-data-set list') as c: c.argument('environment_name', id_part=None) - - with self.argument_context('tsi access-policy') as c: - c.argument('resource_group_name', resource_group_name_type) - c.argument('environment_name', type=str, help='The name of the Time Series Insights environment associated ' - 'with the specified resource group.', id_part='name') - c.argument('access_policy_name', options_list=['--name', '-n', '--access-policy-name'], type=str, help='The ' - 'name of the Time Series Insights access policy associated with the specified environment.', - id_part='child_name_1') - c.argument('principal_object_id', type=str, help="The objectId of the principal in Azure Active Directory.") - c.argument('description', type=str, help='An description of the access policy.') - c.argument('roles', nargs='+', help='The list of roles the principal is assigned on the environment.') - - with self.argument_context('tsi access-policy create') as c: - c.argument('environment_name', id_part=None) - c.argument('access_policy_name', id_part=None) - - with self.argument_context('tsi access-policy list') as c: - c.argument('environment_name', id_part=None) diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/__init__.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/__init__.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/__cmd_group.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/__cmd_group.py new file mode 100644 index 00000000000..dc911c9447f --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "tsi", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Time Series Insights. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/__init__.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/__cmd_group.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/__cmd_group.py new file mode 100644 index 00000000000..b1d4335a7f4 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "tsi access-policy", +) +class __CMDGroup(AAZCommandGroup): + """Manage access policy with timeseriesinsights. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/__init__.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/__init__.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. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_create.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_create.py new file mode 100644 index 00000000000..ba683fcf292 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_create.py @@ -0,0 +1,247 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi access-policy create", +) +class Create(AAZCommand): + """Create an access policy in the specified environment. + + :example: AccessPoliciesCreate + az tsi access-policy create --name "ap1" --environment-name "env1" --description "some description" --principal-object-id "aGuid" --roles Reader Contributor --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/accesspolicies/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.access_policy_name = AAZStrArg( + options=["-n", "--name", "--access-policy-name"], + help="Name of the access policy.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="An description of the access policy.", + ) + _args_schema.principal_object_id = AAZStrArg( + options=["--principal-object-id"], + arg_group="Properties", + help="The objectId of the principal in Azure Active Directory. Values from: az ad user, az ad sp.", + ) + _args_schema.roles = AAZListArg( + options=["--roles"], + arg_group="Properties", + help="The list of roles the principal is assigned on the environment.", + ) + + roles = cls._args_schema.roles + roles.Element = AAZStrArg( + enum={"Contributor": "Contributor", "Reader": "Reader"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessPoliciesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AccessPoliciesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/accessPolicies/{accessPolicyName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "accessPolicyName", self.ctx.args.access_policy_name, + required=True, + ), + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("principalObjectId", AAZStrType, ".principal_object_id") + properties.set_prop("roles", AAZListType, ".roles") + + roles = _builder.get(".properties.roles") + if roles is not None: + roles.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.description = AAZStrType() + properties.principal_object_id = AAZStrType( + serialized_name="principalObjectId", + ) + properties.roles = AAZListType() + + roles = cls._schema_on_200_201.properties.roles + roles.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_delete.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_delete.py new file mode 100644 index 00000000000..80da4e915dd --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_delete.py @@ -0,0 +1,149 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi access-policy delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete the access policy with the specified name in the specified subscription, resource group, and environment + + :example: AccessPoliciesDelete + az tsi access-policy delete --name "ap1" --environment-name "env1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/accesspolicies/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.access_policy_name = AAZStrArg( + options=["-n", "--name", "--access-policy-name"], + help="The name of the Time Series Insights access policy associated with the specified environment.", + required=True, + id_part="child_name_1", + ) + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessPoliciesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class AccessPoliciesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/accessPolicies/{accessPolicyName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "accessPolicyName", self.ctx.args.access_policy_name, + required=True, + ), + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_list.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_list.py new file mode 100644 index 00000000000..6cea38bd513 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_list.py @@ -0,0 +1,191 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi access-policy list", +) +class List(AAZCommand): + """List all the available access policies associated with the environment. + + :example: AccessPoliciesByEnvironment + az tsi access-policy list --environment-name "env1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/accesspolicies", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessPoliciesListByEnvironment(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AccessPoliciesListByEnvironment(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/accessPolicies", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.description = AAZStrType() + properties.principal_object_id = AAZStrType( + serialized_name="principalObjectId", + ) + properties.roles = AAZListType() + + roles = cls._schema_on_200.value.Element.properties.roles + roles.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_show.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_show.py new file mode 100644 index 00000000000..eb8321477dc --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_show.py @@ -0,0 +1,196 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi access-policy show", +) +class Show(AAZCommand): + """Get the access policy with the specified name in the specified environment. + + :example: AccessPoliciesGet + az tsi access-policy show --name "ap1" --environment-name "env1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/accesspolicies/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.access_policy_name = AAZStrArg( + options=["-n", "--name", "--access-policy-name"], + help="The name of the Time Series Insights access policy associated with the specified environment.", + required=True, + id_part="child_name_1", + ) + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessPoliciesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AccessPoliciesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/accessPolicies/{accessPolicyName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "accessPolicyName", self.ctx.args.access_policy_name, + required=True, + ), + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.description = AAZStrType() + properties.principal_object_id = AAZStrType( + serialized_name="principalObjectId", + ) + properties.roles = AAZListType() + + roles = cls._schema_on_200.properties.roles + roles.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_update.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_update.py new file mode 100644 index 00000000000..6f634d4ac79 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/access_policy/_update.py @@ -0,0 +1,238 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi access-policy update", +) +class Update(AAZCommand): + """Update the access policy with the specified name in the specified subscription, resource group, and environment. + + :example: AccessPoliciesUpdate + az tsi access-policy update --name "ap1" --roles "Reader" --roles "Contributor" --environment-name "env1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/accesspolicies/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.access_policy_name = AAZStrArg( + options=["-n", "--name", "--access-policy-name"], + help="The name of the Time Series Insights access policy associated with the specified environment.", + required=True, + id_part="child_name_1", + ) + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="An description of the access policy.", + ) + _args_schema.roles = AAZListArg( + options=["--roles"], + arg_group="Properties", + help="The list of roles the principal is assigned on the environment.", + ) + + roles = cls._args_schema.roles + roles.Element = AAZStrArg( + enum={"Contributor": "Contributor", "Reader": "Reader"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessPoliciesUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AccessPoliciesUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/accessPolicies/{accessPolicyName}", + **self.url_parameters + ) + + @property + def method(self): + return "PATCH" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "accessPolicyName", self.ctx.args.access_policy_name, + required=True, + ), + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("roles", AAZListType, ".roles") + + roles = _builder.get(".properties.roles") + if roles is not None: + roles.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.description = AAZStrType() + properties.principal_object_id = AAZStrType( + serialized_name="principalObjectId", + ) + properties.roles = AAZListType() + + roles = cls._schema_on_200.properties.roles + roles.Element = AAZStrType() + + return cls._schema_on_200 + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/__cmd_group.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/__cmd_group.py new file mode 100644 index 00000000000..581cfafffaf --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "tsi environment", +) +class __CMDGroup(AAZCommandGroup): + """Manage environment with Azure Time Series Insights. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/__init__.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/__init__.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. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_create.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_create.py new file mode 100644 index 00000000000..8a2c95bb802 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_create.py @@ -0,0 +1,579 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Create(AAZCommand): + """Create an environment in the specified subscription and resource group. + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}", "2020-05-15"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["-n", "--name", "--environment-name"], + help="Name of the environment", + required=True, + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.gen1 = AAZObjectArg( + options=["--gen1"], + arg_group="Parameters", + ) + _args_schema.gen2 = AAZObjectArg( + options=["--gen2"], + arg_group="Parameters", + ) + _args_schema.location = AAZStrArg( + options=["-l", "--location"], + arg_group="Parameters", + help="The location of the resource.", + required=True, + ) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="Parameters", + help="The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the capacity of the environment, the ingress rate, and the billing rate.", + required=True, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Parameters", + help="Key-value pairs of additional properties for the resource.", + ) + + gen1 = cls._args_schema.gen1 + gen1.data_retention_time = AAZDurationArg( + options=["data-retention-time"], + help="ISO8601 timespan specifying the minimum number of days the environment's events will be available for query.", + required=True, + ) + gen1.partition_key_properties = AAZListArg( + options=["key-properties", "partition-key-properties"], + help="The list of event properties which will be used to partition data in the environment. Currently, only a single partition key property is supported.", + ) + gen1.storage_limit_exceeded_behavior = AAZStrArg( + options=["exceeded-behavior", "storage-limit-exceeded-behavior"], + help="The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. If \"PauseIngress\" is specified, new events will not be read from the event source. If \"PurgeOldData\" is specified, new events will continue to be read and old events will be deleted from the environment. The default behavior is PurgeOldData.", + enum={"PauseIngress": "PauseIngress", "PurgeOldData": "PurgeOldData"}, + ) + + partition_key_properties = cls._args_schema.gen1.partition_key_properties + partition_key_properties.Element = AAZObjectArg() + + _element = cls._args_schema.gen1.partition_key_properties.Element + _element.name = AAZStrArg( + options=["name"], + ) + _element.type = AAZStrArg( + options=["type"], + enum={"String": "String"}, + ) + + gen2 = cls._args_schema.gen2 + gen2.storage_configuration = AAZObjectArg( + options=["storage-config", "storage-configuration"], + help="The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data.", + required=True, + ) + gen2.time_series_id_properties = AAZListArg( + options=["id-properties", "time-series-id-properties"], + help="The list of event properties which will be used to define the environment's time series id.", + required=True, + ) + gen2.warm_store_configuration = AAZObjectArg( + options=["warm-store-config", "warm-store-configuration"], + help="The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query.", + ) + + storage_configuration = cls._args_schema.gen2.storage_configuration + storage_configuration.account_name = AAZStrArg( + options=["account-name"], + help="The name of the storage account that will hold the environment's Gen2 data.", + required=True, + ) + storage_configuration.management_key = AAZStrArg( + options=["management-key"], + help="The value of the management key that grants the Time Series Insights service write access to the storage account. This property is not shown in environment responses.", + required=True, + ) + + time_series_id_properties = cls._args_schema.gen2.time_series_id_properties + time_series_id_properties.Element = AAZObjectArg() + + _element = cls._args_schema.gen2.time_series_id_properties.Element + _element.name = AAZStrArg( + options=["name"], + ) + _element.type = AAZStrArg( + options=["type"], + enum={"String": "String"}, + ) + + warm_store_configuration = cls._args_schema.gen2.warm_store_configuration + warm_store_configuration.data_retention = AAZDurationArg( + options=["data-retention"], + help="ISO8601 timespan specifying the number of days the environment's events will be available for query from the warm store.", + required=True, + ) + + sku = cls._args_schema.sku + sku.capacity = AAZIntArg( + options=["capacity"], + help="The capacity of the sku. For Gen1 environments, this value can be changed to support scale out of environments after they have been created.", + required=True, + fmt=AAZIntArgFormat( + maximum=10, + minimum=1, + ), + ) + sku.name = AAZStrArg( + options=["name"], + help="The name of this SKU.", + required=True, + enum={"L1": "L1", "P1": "P1", "S1": "S1", "S2": "S2"}, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.EnvironmentsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class EnvironmentsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_const("kind", "Gen1", AAZStrType, ".gen1", typ_kwargs={"flags": {"required": True}}) + _builder.set_const("kind", "Gen2", AAZStrType, ".gen2", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("sku", AAZObjectType, ".sku", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + _builder.discriminate_by("kind", "Gen1") + _builder.discriminate_by("kind", "Gen2") + + sku = _builder.get(".sku") + if sku is not None: + sku.set_prop("capacity", AAZIntType, ".capacity", typ_kwargs={"flags": {"required": True}}) + sku.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + disc_gen1 = _builder.get("{kind:Gen1}") + if disc_gen1 is not None: + disc_gen1.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get("{kind:Gen1}.properties") + if properties is not None: + properties.set_prop("dataRetentionTime", AAZStrType, ".gen1.data_retention_time", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("partitionKeyProperties", AAZListType, ".gen1.partition_key_properties") + properties.set_prop("storageLimitExceededBehavior", AAZStrType, ".gen1.storage_limit_exceeded_behavior") + + partition_key_properties = _builder.get("{kind:Gen1}.properties.partitionKeyProperties") + if partition_key_properties is not None: + partition_key_properties.set_elements(AAZObjectType, ".") + + _elements = _builder.get("{kind:Gen1}.properties.partitionKeyProperties[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("type", AAZStrType, ".type") + + disc_gen2 = _builder.get("{kind:Gen2}") + if disc_gen2 is not None: + disc_gen2.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get("{kind:Gen2}.properties") + if properties is not None: + properties.set_prop("storageConfiguration", AAZObjectType, ".gen2.storage_configuration", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("timeSeriesIdProperties", AAZListType, ".gen2.time_series_id_properties", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("warmStoreConfiguration", AAZObjectType, ".gen2.warm_store_configuration") + + storage_configuration = _builder.get("{kind:Gen2}.properties.storageConfiguration") + if storage_configuration is not None: + storage_configuration.set_prop("accountName", AAZStrType, ".account_name", typ_kwargs={"flags": {"required": True}}) + storage_configuration.set_prop("managementKey", AAZStrType, ".management_key", typ_kwargs={"flags": {"required": True}}) + + time_series_id_properties = _builder.get("{kind:Gen2}.properties.timeSeriesIdProperties") + if time_series_id_properties is not None: + time_series_id_properties.set_elements(AAZObjectType, ".") + + _elements = _builder.get("{kind:Gen2}.properties.timeSeriesIdProperties[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("type", AAZStrType, ".type") + + warm_store_configuration = _builder.get("{kind:Gen2}.properties.warmStoreConfiguration") + if warm_store_configuration is not None: + warm_store_configuration.set_prop("dataRetention", AAZStrType, ".data_retention", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.kind = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.sku = AAZObjectType( + flags={"required": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = cls._schema_on_200_201.sku + sku.capacity = AAZIntType( + flags={"required": True}, + ) + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + disc_gen1 = cls._schema_on_200_201.discriminate_by("kind", "Gen1") + disc_gen1.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = cls._schema_on_200_201.discriminate_by("kind", "Gen1").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.data_retention_time = AAZStrType( + serialized_name="dataRetentionTime", + flags={"required": True}, + ) + properties.partition_key_properties = AAZListType( + serialized_name="partitionKeyProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + _CreateHelper._build_schema_environment_status_read(properties.status) + properties.storage_limit_exceeded_behavior = AAZStrType( + serialized_name="storageLimitExceededBehavior", + ) + + partition_key_properties = cls._schema_on_200_201.discriminate_by("kind", "Gen1").properties.partition_key_properties + partition_key_properties.Element = AAZObjectType() + _CreateHelper._build_schema_time_series_id_property_read(partition_key_properties.Element) + + disc_gen2 = cls._schema_on_200_201.discriminate_by("kind", "Gen2") + disc_gen2.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = cls._schema_on_200_201.discriminate_by("kind", "Gen2").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + _CreateHelper._build_schema_environment_status_read(properties.status) + properties.storage_configuration = AAZObjectType( + serialized_name="storageConfiguration", + flags={"required": True}, + ) + properties.time_series_id_properties = AAZListType( + serialized_name="timeSeriesIdProperties", + flags={"required": True}, + ) + properties.warm_store_configuration = AAZObjectType( + serialized_name="warmStoreConfiguration", + ) + + storage_configuration = cls._schema_on_200_201.discriminate_by("kind", "Gen2").properties.storage_configuration + storage_configuration.account_name = AAZStrType( + serialized_name="accountName", + flags={"required": True}, + ) + + time_series_id_properties = cls._schema_on_200_201.discriminate_by("kind", "Gen2").properties.time_series_id_properties + time_series_id_properties.Element = AAZObjectType() + _CreateHelper._build_schema_time_series_id_property_read(time_series_id_properties.Element) + + warm_store_configuration = cls._schema_on_200_201.discriminate_by("kind", "Gen2").properties.warm_store_configuration + warm_store_configuration.data_retention = AAZStrType( + serialized_name="dataRetention", + flags={"required": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + _schema_environment_status_read = None + + @classmethod + def _build_schema_environment_status_read(cls, _schema): + if cls._schema_environment_status_read is not None: + _schema.ingress = cls._schema_environment_status_read.ingress + _schema.warm_storage = cls._schema_environment_status_read.warm_storage + return + + cls._schema_environment_status_read = _schema_environment_status_read = AAZObjectType( + flags={"read_only": True} + ) + + environment_status_read = _schema_environment_status_read + environment_status_read.ingress = AAZObjectType( + flags={"read_only": True}, + ) + environment_status_read.warm_storage = AAZObjectType( + serialized_name="warmStorage", + flags={"read_only": True}, + ) + + ingress = _schema_environment_status_read.ingress + ingress.state = AAZStrType() + ingress.state_details = AAZObjectType( + serialized_name="stateDetails", + flags={"read_only": True}, + ) + + state_details = _schema_environment_status_read.ingress.state_details + state_details.code = AAZStrType() + state_details.message = AAZStrType() + + warm_storage = _schema_environment_status_read.warm_storage + warm_storage.properties_usage = AAZObjectType( + serialized_name="propertiesUsage", + flags={"client_flatten": True, "read_only": True}, + ) + + properties_usage = _schema_environment_status_read.warm_storage.properties_usage + properties_usage.state = AAZStrType() + properties_usage.state_details = AAZObjectType( + serialized_name="stateDetails", + flags={"client_flatten": True, "read_only": True}, + ) + + state_details = _schema_environment_status_read.warm_storage.properties_usage.state_details + state_details.current_count = AAZIntType( + serialized_name="currentCount", + ) + state_details.max_count = AAZIntType( + serialized_name="maxCount", + ) + + _schema.ingress = cls._schema_environment_status_read.ingress + _schema.warm_storage = cls._schema_environment_status_read.warm_storage + + _schema_time_series_id_property_read = None + + @classmethod + def _build_schema_time_series_id_property_read(cls, _schema): + if cls._schema_time_series_id_property_read is not None: + _schema.name = cls._schema_time_series_id_property_read.name + _schema.type = cls._schema_time_series_id_property_read.type + return + + cls._schema_time_series_id_property_read = _schema_time_series_id_property_read = AAZObjectType() + + time_series_id_property_read = _schema_time_series_id_property_read + time_series_id_property_read.name = AAZStrType() + time_series_id_property_read.type = AAZStrType() + + _schema.name = cls._schema_time_series_id_property_read.name + _schema.type = cls._schema_time_series_id_property_read.type + + +__all__ = ["Create"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_delete.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_delete.py new file mode 100644 index 00000000000..4d3c62cb02e --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_delete.py @@ -0,0 +1,139 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi environment delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete the environment with the specified name in the specified subscription and resource group. + + :example: EnvironmentsDelete + az tsi environment delete --name "env1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["-n", "--name", "--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.EnvironmentsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class EnvironmentsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_list.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_list.py new file mode 100644 index 00000000000..acf4700139f --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_list.py @@ -0,0 +1,574 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi environment list", +) +class List(AAZCommand): + """List all the available environments within a subscription, irrespective of the resource groups. + + :example: EnvironmentsByResourceGroup + az tsi environment list --resource-group "rg1" + + :example: EnvironmentsBySubscription + az tsi environment list + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.timeseriesinsights/environments", "2020-05-15"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.EnvironmentsListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.EnvironmentsListBySubscription(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class EnvironmentsListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.kind = AAZStrType( + flags={"required": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.sku = AAZObjectType( + flags={"required": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.value.Element.sku + sku.capacity = AAZIntType( + flags={"required": True}, + ) + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + disc_gen1 = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen1") + disc_gen1.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen1").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.data_retention_time = AAZStrType( + serialized_name="dataRetentionTime", + flags={"required": True}, + ) + properties.partition_key_properties = AAZListType( + serialized_name="partitionKeyProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + _ListHelper._build_schema_environment_status_read(properties.status) + properties.storage_limit_exceeded_behavior = AAZStrType( + serialized_name="storageLimitExceededBehavior", + ) + + partition_key_properties = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen1").properties.partition_key_properties + partition_key_properties.Element = AAZObjectType() + _ListHelper._build_schema_time_series_id_property_read(partition_key_properties.Element) + + disc_gen2 = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2") + disc_gen2.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + _ListHelper._build_schema_environment_status_read(properties.status) + properties.storage_configuration = AAZObjectType( + serialized_name="storageConfiguration", + flags={"required": True}, + ) + properties.time_series_id_properties = AAZListType( + serialized_name="timeSeriesIdProperties", + flags={"required": True}, + ) + properties.warm_store_configuration = AAZObjectType( + serialized_name="warmStoreConfiguration", + ) + + storage_configuration = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2").properties.storage_configuration + storage_configuration.account_name = AAZStrType( + serialized_name="accountName", + flags={"required": True}, + ) + + time_series_id_properties = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2").properties.time_series_id_properties + time_series_id_properties.Element = AAZObjectType() + _ListHelper._build_schema_time_series_id_property_read(time_series_id_properties.Element) + + warm_store_configuration = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2").properties.warm_store_configuration + warm_store_configuration.data_retention = AAZStrType( + serialized_name="dataRetention", + flags={"required": True}, + ) + + return cls._schema_on_200 + + class EnvironmentsListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.TimeSeriesInsights/environments", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.kind = AAZStrType( + flags={"required": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.sku = AAZObjectType( + flags={"required": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.value.Element.sku + sku.capacity = AAZIntType( + flags={"required": True}, + ) + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + disc_gen1 = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen1") + disc_gen1.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen1").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.data_retention_time = AAZStrType( + serialized_name="dataRetentionTime", + flags={"required": True}, + ) + properties.partition_key_properties = AAZListType( + serialized_name="partitionKeyProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + _ListHelper._build_schema_environment_status_read(properties.status) + properties.storage_limit_exceeded_behavior = AAZStrType( + serialized_name="storageLimitExceededBehavior", + ) + + partition_key_properties = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen1").properties.partition_key_properties + partition_key_properties.Element = AAZObjectType() + _ListHelper._build_schema_time_series_id_property_read(partition_key_properties.Element) + + disc_gen2 = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2") + disc_gen2.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + _ListHelper._build_schema_environment_status_read(properties.status) + properties.storage_configuration = AAZObjectType( + serialized_name="storageConfiguration", + flags={"required": True}, + ) + properties.time_series_id_properties = AAZListType( + serialized_name="timeSeriesIdProperties", + flags={"required": True}, + ) + properties.warm_store_configuration = AAZObjectType( + serialized_name="warmStoreConfiguration", + ) + + storage_configuration = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2").properties.storage_configuration + storage_configuration.account_name = AAZStrType( + serialized_name="accountName", + flags={"required": True}, + ) + + time_series_id_properties = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2").properties.time_series_id_properties + time_series_id_properties.Element = AAZObjectType() + _ListHelper._build_schema_time_series_id_property_read(time_series_id_properties.Element) + + warm_store_configuration = cls._schema_on_200.value.Element.discriminate_by("kind", "Gen2").properties.warm_store_configuration + warm_store_configuration.data_retention = AAZStrType( + serialized_name="dataRetention", + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_environment_status_read = None + + @classmethod + def _build_schema_environment_status_read(cls, _schema): + if cls._schema_environment_status_read is not None: + _schema.ingress = cls._schema_environment_status_read.ingress + _schema.warm_storage = cls._schema_environment_status_read.warm_storage + return + + cls._schema_environment_status_read = _schema_environment_status_read = AAZObjectType( + flags={"read_only": True} + ) + + environment_status_read = _schema_environment_status_read + environment_status_read.ingress = AAZObjectType( + flags={"read_only": True}, + ) + environment_status_read.warm_storage = AAZObjectType( + serialized_name="warmStorage", + flags={"read_only": True}, + ) + + ingress = _schema_environment_status_read.ingress + ingress.state = AAZStrType() + ingress.state_details = AAZObjectType( + serialized_name="stateDetails", + flags={"read_only": True}, + ) + + state_details = _schema_environment_status_read.ingress.state_details + state_details.code = AAZStrType() + state_details.message = AAZStrType() + + warm_storage = _schema_environment_status_read.warm_storage + warm_storage.properties_usage = AAZObjectType( + serialized_name="propertiesUsage", + flags={"client_flatten": True, "read_only": True}, + ) + + properties_usage = _schema_environment_status_read.warm_storage.properties_usage + properties_usage.state = AAZStrType() + properties_usage.state_details = AAZObjectType( + serialized_name="stateDetails", + flags={"client_flatten": True, "read_only": True}, + ) + + state_details = _schema_environment_status_read.warm_storage.properties_usage.state_details + state_details.current_count = AAZIntType( + serialized_name="currentCount", + ) + state_details.max_count = AAZIntType( + serialized_name="maxCount", + ) + + _schema.ingress = cls._schema_environment_status_read.ingress + _schema.warm_storage = cls._schema_environment_status_read.warm_storage + + _schema_time_series_id_property_read = None + + @classmethod + def _build_schema_time_series_id_property_read(cls, _schema): + if cls._schema_time_series_id_property_read is not None: + _schema.name = cls._schema_time_series_id_property_read.name + _schema.type = cls._schema_time_series_id_property_read.type + return + + cls._schema_time_series_id_property_read = _schema_time_series_id_property_read = AAZObjectType() + + time_series_id_property_read = _schema_time_series_id_property_read + time_series_id_property_read.name = AAZStrType() + time_series_id_property_read.type = AAZStrType() + + _schema.name = cls._schema_time_series_id_property_read.name + _schema.type = cls._schema_time_series_id_property_read.type + + +__all__ = ["List"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_show.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_show.py new file mode 100644 index 00000000000..0bd45954c20 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_show.py @@ -0,0 +1,371 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi environment show", +) +class Show(AAZCommand): + """Get the environment with the specified name in the specified subscription and resource group. + + :example: EnvironmentsGet + az tsi environment show --name "env1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["-n", "--name", "--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.expand = AAZStrArg( + options=["--expand"], + help="Setting $expand=status will include the status of the internal services of the environment in the Time Series Insights service.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.EnvironmentsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class EnvironmentsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$expand", self.ctx.args.expand, + ), + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.kind = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.sku = AAZObjectType( + flags={"required": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.sku + sku.capacity = AAZIntType( + flags={"required": True}, + ) + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + disc_gen1 = cls._schema_on_200.discriminate_by("kind", "Gen1") + disc_gen1.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = cls._schema_on_200.discriminate_by("kind", "Gen1").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.data_retention_time = AAZStrType( + serialized_name="dataRetentionTime", + flags={"required": True}, + ) + properties.partition_key_properties = AAZListType( + serialized_name="partitionKeyProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + _ShowHelper._build_schema_environment_status_read(properties.status) + properties.storage_limit_exceeded_behavior = AAZStrType( + serialized_name="storageLimitExceededBehavior", + ) + + partition_key_properties = cls._schema_on_200.discriminate_by("kind", "Gen1").properties.partition_key_properties + partition_key_properties.Element = AAZObjectType() + _ShowHelper._build_schema_time_series_id_property_read(partition_key_properties.Element) + + disc_gen2 = cls._schema_on_200.discriminate_by("kind", "Gen2") + disc_gen2.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = cls._schema_on_200.discriminate_by("kind", "Gen2").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + _ShowHelper._build_schema_environment_status_read(properties.status) + properties.storage_configuration = AAZObjectType( + serialized_name="storageConfiguration", + flags={"required": True}, + ) + properties.time_series_id_properties = AAZListType( + serialized_name="timeSeriesIdProperties", + flags={"required": True}, + ) + properties.warm_store_configuration = AAZObjectType( + serialized_name="warmStoreConfiguration", + ) + + storage_configuration = cls._schema_on_200.discriminate_by("kind", "Gen2").properties.storage_configuration + storage_configuration.account_name = AAZStrType( + serialized_name="accountName", + flags={"required": True}, + ) + + time_series_id_properties = cls._schema_on_200.discriminate_by("kind", "Gen2").properties.time_series_id_properties + time_series_id_properties.Element = AAZObjectType() + _ShowHelper._build_schema_time_series_id_property_read(time_series_id_properties.Element) + + warm_store_configuration = cls._schema_on_200.discriminate_by("kind", "Gen2").properties.warm_store_configuration + warm_store_configuration.data_retention = AAZStrType( + serialized_name="dataRetention", + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_environment_status_read = None + + @classmethod + def _build_schema_environment_status_read(cls, _schema): + if cls._schema_environment_status_read is not None: + _schema.ingress = cls._schema_environment_status_read.ingress + _schema.warm_storage = cls._schema_environment_status_read.warm_storage + return + + cls._schema_environment_status_read = _schema_environment_status_read = AAZObjectType( + flags={"read_only": True} + ) + + environment_status_read = _schema_environment_status_read + environment_status_read.ingress = AAZObjectType( + flags={"read_only": True}, + ) + environment_status_read.warm_storage = AAZObjectType( + serialized_name="warmStorage", + flags={"read_only": True}, + ) + + ingress = _schema_environment_status_read.ingress + ingress.state = AAZStrType() + ingress.state_details = AAZObjectType( + serialized_name="stateDetails", + flags={"read_only": True}, + ) + + state_details = _schema_environment_status_read.ingress.state_details + state_details.code = AAZStrType() + state_details.message = AAZStrType() + + warm_storage = _schema_environment_status_read.warm_storage + warm_storage.properties_usage = AAZObjectType( + serialized_name="propertiesUsage", + flags={"client_flatten": True, "read_only": True}, + ) + + properties_usage = _schema_environment_status_read.warm_storage.properties_usage + properties_usage.state = AAZStrType() + properties_usage.state_details = AAZObjectType( + serialized_name="stateDetails", + flags={"client_flatten": True, "read_only": True}, + ) + + state_details = _schema_environment_status_read.warm_storage.properties_usage.state_details + state_details.current_count = AAZIntType( + serialized_name="currentCount", + ) + state_details.max_count = AAZIntType( + serialized_name="maxCount", + ) + + _schema.ingress = cls._schema_environment_status_read.ingress + _schema.warm_storage = cls._schema_environment_status_read.warm_storage + + _schema_time_series_id_property_read = None + + @classmethod + def _build_schema_time_series_id_property_read(cls, _schema): + if cls._schema_time_series_id_property_read is not None: + _schema.name = cls._schema_time_series_id_property_read.name + _schema.type = cls._schema_time_series_id_property_read.type + return + + cls._schema_time_series_id_property_read = _schema_time_series_id_property_read = AAZObjectType() + + time_series_id_property_read = _schema_time_series_id_property_read + time_series_id_property_read.name = AAZStrType() + time_series_id_property_read.type = AAZStrType() + + _schema.name = cls._schema_time_series_id_property_read.name + _schema.type = cls._schema_time_series_id_property_read.type + + +__all__ = ["Show"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_update.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_update.py new file mode 100644 index 00000000000..9f16d666720 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/environment/_update.py @@ -0,0 +1,747 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Update(AAZCommand): + """Update an environment in the specified subscription and resource group. + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}", "2020-05-15"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["-n", "--name", "--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.gen1 = AAZObjectArg( + options=["--gen1"], + arg_group="Parameters", + ) + _args_schema.gen2 = AAZObjectArg( + options=["--gen2"], + arg_group="Parameters", + ) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="Parameters", + help="The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the capacity of the environment, the ingress rate, and the billing rate.", + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Parameters", + help="Key-value pairs of additional properties for the resource.", + nullable=True, + ) + + gen1 = cls._args_schema.gen1 + gen1.data_retention_time = AAZDurationArg( + options=["data-retention-time"], + help="ISO8601 timespan specifying the minimum number of days the environment's events will be available for query.", + ) + gen1.partition_key_properties = AAZListArg( + options=["key-properties", "partition-key-properties"], + help="The list of event properties which will be used to partition data in the environment. Currently, only a single partition key property is supported.", + nullable=True, + ) + gen1.storage_limit_exceeded_behavior = AAZStrArg( + options=["exceeded-behavior", "storage-limit-exceeded-behavior"], + help="The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. If \"PauseIngress\" is specified, new events will not be read from the event source. If \"PurgeOldData\" is specified, new events will continue to be read and old events will be deleted from the environment. The default behavior is PurgeOldData.", + nullable=True, + enum={"PauseIngress": "PauseIngress", "PurgeOldData": "PurgeOldData"}, + ) + + partition_key_properties = cls._args_schema.gen1.partition_key_properties + partition_key_properties.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.gen1.partition_key_properties.Element + _element.name = AAZStrArg( + options=["name"], + nullable=True, + ) + _element.type = AAZStrArg( + options=["type"], + nullable=True, + enum={"String": "String"}, + ) + + gen2 = cls._args_schema.gen2 + gen2.storage_configuration = AAZObjectArg( + options=["storage-configuration"], + help="The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data.", + ) + gen2.time_series_id_properties = AAZListArg( + options=["id-properties", "time-series-id-properties"], + help="The list of event properties which will be used to define the environment's time series id.", + ) + gen2.warm_store_configuration = AAZObjectArg( + options=["warm-store-config", "warm-store-configuration"], + help="The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query.", + nullable=True, + ) + + storage_configuration = cls._args_schema.gen2.storage_configuration + storage_configuration.account_name = AAZStrArg( + options=["account-name"], + help="The name of the storage account that will hold the environment's Gen2 data.", + ) + storage_configuration.management_key = AAZStrArg( + options=["management-key"], + help="The value of the management key that grants the Time Series Insights service write access to the storage account. This property is not shown in environment responses.", + ) + + time_series_id_properties = cls._args_schema.gen2.time_series_id_properties + time_series_id_properties.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.gen2.time_series_id_properties.Element + _element.name = AAZStrArg( + options=["name"], + nullable=True, + ) + _element.type = AAZStrArg( + options=["type"], + nullable=True, + enum={"String": "String"}, + ) + + warm_store_configuration = cls._args_schema.gen2.warm_store_configuration + warm_store_configuration.data_retention = AAZDurationArg( + options=["data-retention"], + help="ISO8601 timespan specifying the number of days the environment's events will be available for query from the warm store.", + ) + + sku = cls._args_schema.sku + sku.capacity = AAZIntArg( + options=["capacity"], + help="The capacity of the sku. For Gen1 environments, this value can be changed to support scale out of environments after they have been created.", + fmt=AAZIntArgFormat( + maximum=10, + minimum=1, + ), + ) + sku.name = AAZStrArg( + options=["name"], + help="The name of this SKU.", + enum={"L1": "L1", "P1": "P1", "S1": "S1", "S2": "S2"}, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.EnvironmentsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.EnvironmentsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class EnvironmentsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_environment_resource_read(cls._schema_on_200) + + return cls._schema_on_200 + + class EnvironmentsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_environment_resource_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("sku", AAZObjectType, ".sku", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + _builder.discriminate_by("kind", "Gen1") + _builder.discriminate_by("kind", "Gen2") + + sku = _builder.get(".sku") + if sku is not None: + sku.set_prop("capacity", AAZIntType, ".capacity", typ_kwargs={"flags": {"required": True}}) + sku.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + disc_gen1 = _builder.get("{kind:Gen1}") + if disc_gen1 is not None: + disc_gen1.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get("{kind:Gen1}.properties") + if properties is not None: + properties.set_prop("dataRetentionTime", AAZStrType, ".gen1.data_retention_time", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("partitionKeyProperties", AAZListType, ".gen1.partition_key_properties") + properties.set_prop("storageLimitExceededBehavior", AAZStrType, ".gen1.storage_limit_exceeded_behavior") + + partition_key_properties = _builder.get("{kind:Gen1}.properties.partitionKeyProperties") + if partition_key_properties is not None: + partition_key_properties.set_elements(AAZObjectType, ".") + + _elements = _builder.get("{kind:Gen1}.properties.partitionKeyProperties[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("type", AAZStrType, ".type") + + disc_gen2 = _builder.get("{kind:Gen2}") + if disc_gen2 is not None: + disc_gen2.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get("{kind:Gen2}.properties") + if properties is not None: + properties.set_prop("storageConfiguration", AAZObjectType, ".gen2.storage_configuration", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("timeSeriesIdProperties", AAZListType, ".gen2.time_series_id_properties", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("warmStoreConfiguration", AAZObjectType, ".gen2.warm_store_configuration") + + storage_configuration = _builder.get("{kind:Gen2}.properties.storageConfiguration") + if storage_configuration is not None: + storage_configuration.set_prop("accountName", AAZStrType, ".account_name", typ_kwargs={"flags": {"required": True}}) + storage_configuration.set_prop("managementKey", AAZStrType, ".management_key", typ_kwargs={"flags": {"required": True}}) + + time_series_id_properties = _builder.get("{kind:Gen2}.properties.timeSeriesIdProperties") + if time_series_id_properties is not None: + time_series_id_properties.set_elements(AAZObjectType, ".") + + _elements = _builder.get("{kind:Gen2}.properties.timeSeriesIdProperties[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("type", AAZStrType, ".type") + + warm_store_configuration = _builder.get("{kind:Gen2}.properties.warmStoreConfiguration") + if warm_store_configuration is not None: + warm_store_configuration.set_prop("dataRetention", AAZStrType, ".data_retention", typ_kwargs={"flags": {"required": True}}) + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_environment_resource_read = None + + @classmethod + def _build_schema_environment_resource_read(cls, _schema): + if cls._schema_environment_resource_read is not None: + _schema.id = cls._schema_environment_resource_read.id + _schema.kind = cls._schema_environment_resource_read.kind + _schema.location = cls._schema_environment_resource_read.location + _schema.name = cls._schema_environment_resource_read.name + _schema.sku = cls._schema_environment_resource_read.sku + _schema.tags = cls._schema_environment_resource_read.tags + _schema.type = cls._schema_environment_resource_read.type + _schema.discriminate_by( + "kind", + "Gen1", + cls._schema_environment_resource_read.discriminate_by( + "kind", + "Gen1", + ) + ) + _schema.discriminate_by( + "kind", + "Gen2", + cls._schema_environment_resource_read.discriminate_by( + "kind", + "Gen2", + ) + ) + return + + cls._schema_environment_resource_read = _schema_environment_resource_read = AAZObjectType() + + environment_resource_read = _schema_environment_resource_read + environment_resource_read.id = AAZStrType( + flags={"read_only": True}, + ) + environment_resource_read.kind = AAZStrType( + flags={"required": True}, + ) + environment_resource_read.location = AAZStrType( + flags={"required": True}, + ) + environment_resource_read.name = AAZStrType( + flags={"read_only": True}, + ) + environment_resource_read.sku = AAZObjectType( + flags={"required": True}, + ) + environment_resource_read.tags = AAZDictType() + environment_resource_read.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = _schema_environment_resource_read.sku + sku.capacity = AAZIntType( + flags={"required": True}, + ) + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = _schema_environment_resource_read.tags + tags.Element = AAZStrType() + + disc_gen1 = _schema_environment_resource_read.discriminate_by("kind", "Gen1") + disc_gen1.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = _schema_environment_resource_read.discriminate_by("kind", "Gen1").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.data_retention_time = AAZStrType( + serialized_name="dataRetentionTime", + flags={"required": True}, + ) + properties.partition_key_properties = AAZListType( + serialized_name="partitionKeyProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_environment_status_read(properties.status) + properties.storage_limit_exceeded_behavior = AAZStrType( + serialized_name="storageLimitExceededBehavior", + ) + + partition_key_properties = _schema_environment_resource_read.discriminate_by("kind", "Gen1").properties.partition_key_properties + partition_key_properties.Element = AAZObjectType() + cls._build_schema_time_series_id_property_read(partition_key_properties.Element) + + disc_gen2 = _schema_environment_resource_read.discriminate_by("kind", "Gen2") + disc_gen2.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + + properties = _schema_environment_resource_read.discriminate_by("kind", "Gen2").properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_access_fqdn = AAZStrType( + serialized_name="dataAccessFqdn", + flags={"read_only": True}, + ) + properties.data_access_id = AAZStrType( + serialized_name="dataAccessId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_environment_status_read(properties.status) + properties.storage_configuration = AAZObjectType( + serialized_name="storageConfiguration", + flags={"required": True}, + ) + properties.time_series_id_properties = AAZListType( + serialized_name="timeSeriesIdProperties", + flags={"required": True}, + ) + properties.warm_store_configuration = AAZObjectType( + serialized_name="warmStoreConfiguration", + ) + + storage_configuration = _schema_environment_resource_read.discriminate_by("kind", "Gen2").properties.storage_configuration + storage_configuration.account_name = AAZStrType( + serialized_name="accountName", + flags={"required": True}, + ) + + time_series_id_properties = _schema_environment_resource_read.discriminate_by("kind", "Gen2").properties.time_series_id_properties + time_series_id_properties.Element = AAZObjectType() + cls._build_schema_time_series_id_property_read(time_series_id_properties.Element) + + warm_store_configuration = _schema_environment_resource_read.discriminate_by("kind", "Gen2").properties.warm_store_configuration + warm_store_configuration.data_retention = AAZStrType( + serialized_name="dataRetention", + flags={"required": True}, + ) + + _schema.id = cls._schema_environment_resource_read.id + _schema.kind = cls._schema_environment_resource_read.kind + _schema.location = cls._schema_environment_resource_read.location + _schema.name = cls._schema_environment_resource_read.name + _schema.sku = cls._schema_environment_resource_read.sku + _schema.tags = cls._schema_environment_resource_read.tags + _schema.type = cls._schema_environment_resource_read.type + _schema.discriminate_by( + "kind", + "Gen1", + cls._schema_environment_resource_read.discriminate_by( + "kind", + "Gen1", + ) + ) + _schema.discriminate_by( + "kind", + "Gen2", + cls._schema_environment_resource_read.discriminate_by( + "kind", + "Gen2", + ) + ) + + _schema_environment_status_read = None + + @classmethod + def _build_schema_environment_status_read(cls, _schema): + if cls._schema_environment_status_read is not None: + _schema.ingress = cls._schema_environment_status_read.ingress + _schema.warm_storage = cls._schema_environment_status_read.warm_storage + return + + cls._schema_environment_status_read = _schema_environment_status_read = AAZObjectType( + flags={"read_only": True} + ) + + environment_status_read = _schema_environment_status_read + environment_status_read.ingress = AAZObjectType( + flags={"read_only": True}, + ) + environment_status_read.warm_storage = AAZObjectType( + serialized_name="warmStorage", + flags={"read_only": True}, + ) + + ingress = _schema_environment_status_read.ingress + ingress.state = AAZStrType() + ingress.state_details = AAZObjectType( + serialized_name="stateDetails", + flags={"read_only": True}, + ) + + state_details = _schema_environment_status_read.ingress.state_details + state_details.code = AAZStrType() + state_details.message = AAZStrType() + + warm_storage = _schema_environment_status_read.warm_storage + warm_storage.properties_usage = AAZObjectType( + serialized_name="propertiesUsage", + flags={"client_flatten": True, "read_only": True}, + ) + + properties_usage = _schema_environment_status_read.warm_storage.properties_usage + properties_usage.state = AAZStrType() + properties_usage.state_details = AAZObjectType( + serialized_name="stateDetails", + flags={"client_flatten": True, "read_only": True}, + ) + + state_details = _schema_environment_status_read.warm_storage.properties_usage.state_details + state_details.current_count = AAZIntType( + serialized_name="currentCount", + ) + state_details.max_count = AAZIntType( + serialized_name="maxCount", + ) + + _schema.ingress = cls._schema_environment_status_read.ingress + _schema.warm_storage = cls._schema_environment_status_read.warm_storage + + _schema_time_series_id_property_read = None + + @classmethod + def _build_schema_time_series_id_property_read(cls, _schema): + if cls._schema_time_series_id_property_read is not None: + _schema.name = cls._schema_time_series_id_property_read.name + _schema.type = cls._schema_time_series_id_property_read.type + return + + cls._schema_time_series_id_property_read = _schema_time_series_id_property_read = AAZObjectType() + + time_series_id_property_read = _schema_time_series_id_property_read + time_series_id_property_read.name = AAZStrType() + time_series_id_property_read.type = AAZStrType() + + _schema.name = cls._schema_time_series_id_property_read.name + _schema.type = cls._schema_time_series_id_property_read.type + + +__all__ = ["Update"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/__cmd_group.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/__cmd_group.py new file mode 100644 index 00000000000..91cfb395a24 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "tsi reference-data-set", +) +class __CMDGroup(AAZCommandGroup): + """Manage reference data set with timeseriesinsights. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/__init__.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/__init__.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. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_create.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_create.py new file mode 100644 index 00000000000..1a5c3ef4e32 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_create.py @@ -0,0 +1,302 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi reference-data-set create", +) +class Create(AAZCommand): + """Create a reference data set in the specified environment. + + :example: ReferenceDataSetsCreate + az tsi reference-data-set create --environment-name "env1" --location westus --key-properties name="DeviceId1" type="String" --key-properties name="DeviceFloor" type="Double" --name "rds1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/referencedatasets/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + ) + _args_schema.reference_data_set_name = AAZStrArg( + options=["-n", "--name", "--reference-data-set-name"], + help="Name of the reference data set.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+$", + max_length=63, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.location = AAZStrArg( + options=["-l", "--location"], + arg_group="Parameters", + help="The location of the resource.", + required=True, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Parameters", + help="Key-value pairs of additional properties for the resource.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.data_string_comparison_behavior = AAZStrArg( + options=["--comparison-behavior", "--data-string-comparison-behavior"], + arg_group="Properties", + help="The reference data set key comparison behavior can be set using this property. By default, the value is 'Ordinal' - which means case sensitive key comparison will be performed while joining reference data with events or while adding new reference data. When 'OrdinalIgnoreCase' is set, case insensitive comparison will be used.", + enum={"Ordinal": "Ordinal", "OrdinalIgnoreCase": "OrdinalIgnoreCase"}, + ) + _args_schema.key_properties = AAZListArg( + options=["--key-properties"], + arg_group="Properties", + help="The list of key properties for the reference data set.", + required=True, + ) + + key_properties = cls._args_schema.key_properties + key_properties.Element = AAZObjectArg() + + _element = cls._args_schema.key_properties.Element + _element.name = AAZStrArg( + options=["name"], + help="The name of the key property.", + ) + _element.type = AAZStrArg( + options=["type"], + help="The type of the key property.", + enum={"Bool": "Bool", "DateTime": "DateTime", "Double": "Double", "String": "String"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ReferenceDataSetsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ReferenceDataSetsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/referenceDataSets/{referenceDataSetName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "referenceDataSetName", self.ctx.args.reference_data_set_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("dataStringComparisonBehavior", AAZStrType, ".data_string_comparison_behavior") + properties.set_prop("keyProperties", AAZListType, ".key_properties", typ_kwargs={"flags": {"required": True}}) + + key_properties = _builder.get(".properties.keyProperties") + if key_properties is not None: + key_properties.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.keyProperties[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("type", AAZStrType, ".type") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_string_comparison_behavior = AAZStrType( + serialized_name="dataStringComparisonBehavior", + ) + properties.key_properties = AAZListType( + serialized_name="keyProperties", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + key_properties = cls._schema_on_200_201.properties.key_properties + key_properties.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.key_properties.Element + _element.name = AAZStrType() + _element.type = AAZStrType() + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_delete.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_delete.py new file mode 100644 index 00000000000..ab698c2f8a7 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_delete.py @@ -0,0 +1,149 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi reference-data-set delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete the reference data set with the specified name in the specified subscription, resource group, and environment + + :example: ReferenceDataSetsDelete + az tsi reference-data-set delete --environment-name "env1" --name "rds1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/referencedatasets/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + id_part="name", + ) + _args_schema.reference_data_set_name = AAZStrArg( + options=["-n", "--name", "--reference-data-set-name"], + help="The name of the Time Series Insights reference data set associated with the specified environment.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ReferenceDataSetsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ReferenceDataSetsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/referenceDataSets/{referenceDataSetName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "referenceDataSetName", self.ctx.args.reference_data_set_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_list.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_list.py new file mode 100644 index 00000000000..c0daabe0c80 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_list.py @@ -0,0 +1,212 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi reference-data-set list", +) +class List(AAZCommand): + """List all the available reference data sets associated with the subscription and within the specified resource group and environment. + + :example: ReferenceDataSetsListByEnvironment + az tsi reference-data-set list --environment-name "env1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/referencedatasets", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ReferenceDataSetsListByEnvironment(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ReferenceDataSetsListByEnvironment(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/referenceDataSets", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_string_comparison_behavior = AAZStrType( + serialized_name="dataStringComparisonBehavior", + ) + properties.key_properties = AAZListType( + serialized_name="keyProperties", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + key_properties = cls._schema_on_200.value.Element.properties.key_properties + key_properties.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.key_properties.Element + _element.name = AAZStrType() + _element.type = AAZStrType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_show.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_show.py new file mode 100644 index 00000000000..806a9f9d011 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_show.py @@ -0,0 +1,217 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi reference-data-set show", +) +class Show(AAZCommand): + """Get the reference data set with the specified name in the specified environment. + + :example: ReferenceDataSetsGet + az tsi reference-data-set show --environment-name "env1" --name "rds1" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/referencedatasets/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + id_part="name", + ) + _args_schema.reference_data_set_name = AAZStrArg( + options=["-n", "--name", "--reference-data-set-name"], + help="The name of the Time Series Insights reference data set associated with the specified environment.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ReferenceDataSetsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ReferenceDataSetsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/referenceDataSets/{referenceDataSetName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "referenceDataSetName", self.ctx.args.reference_data_set_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_string_comparison_behavior = AAZStrType( + serialized_name="dataStringComparisonBehavior", + ) + properties.key_properties = AAZListType( + serialized_name="keyProperties", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + key_properties = cls._schema_on_200.properties.key_properties + key_properties.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.key_properties.Element + _element.name = AAZStrType() + _element.type = AAZStrType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_update.py b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_update.py new file mode 100644 index 00000000000..742a874eda4 --- /dev/null +++ b/src/timeseriesinsights/azext_timeseriesinsights/aaz/latest/tsi/reference_data_set/_update.py @@ -0,0 +1,247 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "tsi reference-data-set update", +) +class Update(AAZCommand): + """Update the reference data set with the specified name in the specified subscription, resource group, and environment. + + :example: ReferenceDataSetsUpdate + az tsi reference-data-set update --environment-name "env1" --name "rds1" --tags someKey="someValue" --resource-group "rg1" + """ + + _aaz_info = { + "version": "2020-05-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.timeseriesinsights/environments/{}/referencedatasets/{}", "2020-05-15"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.environment_name = AAZStrArg( + options=["--environment-name"], + help="The name of the Time Series Insights environment associated with the specified resource group.", + required=True, + id_part="name", + ) + _args_schema.reference_data_set_name = AAZStrArg( + options=["-n", "--name", "--reference-data-set-name"], + help="The name of the Time Series Insights reference data set associated with the specified environment.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "ReferenceDataSetUpdateParameters" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="ReferenceDataSetUpdateParameters", + help="Key-value pairs of additional properties for the reference data set.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ReferenceDataSetsUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ReferenceDataSetsUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/referenceDataSets/{referenceDataSetName}", + **self.url_parameters + ) + + @property + def method(self): + return "PATCH" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "environmentName", self.ctx.args.environment_name, + required=True, + ), + **self.serialize_url_param( + "referenceDataSetName", self.ctx.args.reference_data_set_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-05-15", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("tags", AAZDictType, ".tags") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.data_string_comparison_behavior = AAZStrType( + serialized_name="dataStringComparisonBehavior", + ) + properties.key_properties = AAZListType( + serialized_name="keyProperties", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + key_properties = cls._schema_on_200.properties.key_properties + key_properties.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.key_properties.Element + _element.name = AAZStrType() + _element.type = AAZStrType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/azext_metadata.json b/src/timeseriesinsights/azext_timeseriesinsights/azext_metadata.json index 7b33e2426b0..c91b1a720cc 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/azext_metadata.json +++ b/src/timeseriesinsights/azext_timeseriesinsights/azext_metadata.json @@ -1,3 +1,3 @@ { - "azext.minCliCoreVersion": "2.11.0" + "azext.minCliCoreVersion": "2.50.0" } \ No newline at end of file diff --git a/src/timeseriesinsights/azext_timeseriesinsights/commands.py b/src/timeseriesinsights/azext_timeseriesinsights/commands.py index 9b4c2b52aad..c1b362571be 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/commands.py +++ b/src/timeseriesinsights/azext_timeseriesinsights/commands.py @@ -10,27 +10,23 @@ def load_command_table(self, _): - from azext_timeseriesinsights._client_factory import cf_environment - timeseriesinsights_environment = CliCommandType( - operations_tmpl='azext_timeseriesinsights.vendored_sdks.timeseriesinsights.operations._environments_operations#' - 'EnvironmentsOperations.{}', - client_factory=cf_environment) - with self.command_group('tsi environment', timeseriesinsights_environment, client_factory=cf_environment) as g: - g.custom_command('list', 'timeseriesinsights_environment_list') - g.custom_show_command('show', 'timeseriesinsights_environment_show') - g.custom_command('delete', 'timeseriesinsights_environment_delete', confirmation=True) - g.custom_wait_command('wait', 'timeseriesinsights_environment_show') + with self.command_group('tsi environment') as g: + from .custom import EnvironmentList + self.command_table['tsi environment list'] = EnvironmentList(loader=self) - with self.command_group('tsi environment gen1', timeseriesinsights_environment, - client_factory=cf_environment) as g: + with self.command_group('tsi environment gen1') as g: g.custom_command('create', 'timeseriesinsights_environment_gen1_create', supports_no_wait=True) g.custom_command('update', 'timeseriesinsights_environment_gen1_update', supports_no_wait=True) - with self.command_group('tsi environment gen2', timeseriesinsights_environment, - client_factory=cf_environment) as g: + with self.command_group('tsi environment gen2') as g: g.custom_command('create', 'timeseriesinsights_environment_gen2_create', supports_no_wait=True) g.custom_command('update', 'timeseriesinsights_environment_gen2_update', supports_no_wait=True) + with self.command_group('tsi reference-data-set') as g: + g.custom_command('create', 'timeseriesinsights_reference_data_set_create') + from .custom import ReferenceDataSetList + self.command_table['tsi reference-data-set list'] = ReferenceDataSetList(loader=self) + from azext_timeseriesinsights._client_factory import cf_event_source timeseriesinsights_event_source = CliCommandType( operations_tmpl='azext_timeseriesinsights.vendored_sdks.timeseriesinsights.operations._event_sources_operations' @@ -50,29 +46,3 @@ def load_command_table(self, _): client_factory=cf_event_source) as g: g.custom_command('create', 'timeseriesinsights_event_source_iot_hub_create') g.custom_command('update', 'timeseriesinsights_event_source_iot_hub_update') - - from azext_timeseriesinsights._client_factory import cf_reference_data_set - timeseriesinsights_reference_data_set = CliCommandType( - operations_tmpl='azext_timeseriesinsights.vendored_sdks.timeseriesinsights.operations._reference_data_sets_oper' - 'ations#ReferenceDataSetsOperations.{}', - client_factory=cf_reference_data_set) - with self.command_group('tsi reference-data-set', timeseriesinsights_reference_data_set, - client_factory=cf_reference_data_set) as g: - g.custom_command('list', 'timeseriesinsights_reference_data_set_list') - g.custom_show_command('show', 'timeseriesinsights_reference_data_set_show') - g.custom_command('create', 'timeseriesinsights_reference_data_set_create') - g.custom_command('update', 'timeseriesinsights_reference_data_set_update') - g.custom_command('delete', 'timeseriesinsights_reference_data_set_delete', confirmation=True) - - from azext_timeseriesinsights._client_factory import cf_access_policy - timeseriesinsights_access_policy = CliCommandType( - operations_tmpl='azext_timeseriesinsights.vendored_sdks.timeseriesinsights.operations._access_policies_operatio' - 'ns#AccessPoliciesOperations.{}', - client_factory=cf_access_policy) - with self.command_group('tsi access-policy', timeseriesinsights_access_policy, - client_factory=cf_access_policy) as g: - g.custom_command('list', 'timeseriesinsights_access_policy_list') - g.custom_show_command('show', 'timeseriesinsights_access_policy_show') - g.custom_command('create', 'timeseriesinsights_access_policy_create') - g.custom_command('update', 'timeseriesinsights_access_policy_update') - g.custom_command('delete', 'timeseriesinsights_access_policy_delete', confirmation=True) diff --git a/src/timeseriesinsights/azext_timeseriesinsights/custom.py b/src/timeseriesinsights/azext_timeseriesinsights/custom.py index e8f7f24cc4c..0ced9dea5a4 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/custom.py +++ b/src/timeseriesinsights/azext_timeseriesinsights/custom.py @@ -5,35 +5,12 @@ # -------------------------------------------------------------------------- # pylint: disable=too-many-lines -from azure.cli.core.util import sdk_no_wait from azure.cli.core.azclierror import InvalidArgumentValueError +from .aaz.latest.tsi.environment import List as _EnvironmentList +from .aaz.latest.tsi.reference_data_set import List as _ReferenceDataSetList -def timeseriesinsights_environment_list(client, - resource_group_name=None): - if resource_group_name: - return client.list_by_resource_group(resource_group_name=resource_group_name).value - return client.list_by_subscription().value - - -def timeseriesinsights_environment_show(client, - resource_group_name, - environment_name, - expand=None): - return client.get(resource_group_name=resource_group_name, - environment_name=environment_name, - expand=expand) - - -def timeseriesinsights_environment_delete(client, - resource_group_name, - environment_name): - return client.delete(resource_group_name=resource_group_name, - environment_name=environment_name) - - -def timeseriesinsights_environment_gen1_create(client, - resource_group_name, +def timeseriesinsights_environment_gen1_create(cmd, resource_group_name, environment_name, location, sku, @@ -42,22 +19,24 @@ def timeseriesinsights_environment_gen1_create(client, storage_limit_exceeded_behavior=None, partition_key_properties=None, no_wait=False): + from .aaz.latest.tsi.environment import Create as _EnvironmentCreate + Create = _EnvironmentCreate(cmd.loader) parameters = {} + parameters['resource_group'] = resource_group_name + parameters['environment_name'] = environment_name parameters['location'] = location parameters['tags'] = tags - parameters['kind'] = 'Gen1' parameters['sku'] = sku - parameters['data_retention_time'] = data_retention_time - parameters['storage_limit_exceeded_behavior'] = storage_limit_exceeded_behavior - parameters['partition_key_properties'] = partition_key_properties - return sdk_no_wait(no_wait, - client.begin_create_or_update, - resource_group_name=resource_group_name, - environment_name=environment_name, - parameters=parameters) + parameters['gen1'] = {} + parameters['gen1']['data_retention_time'] = data_retention_time + parameters['gen1']['storage_limit_exceeded_behavior'] = storage_limit_exceeded_behavior + parameters['gen1']['partition_key_properties'] = partition_key_properties + parameters['no_wait'] = no_wait + + return Create(parameters) -def timeseriesinsights_environment_gen1_update(client, +def timeseriesinsights_environment_gen1_update(cmd, resource_group_name, environment_name, sku=None, @@ -65,38 +44,26 @@ def timeseriesinsights_environment_gen1_update(client, tags=None, storage_limit_exceeded_behavior=None, no_wait=False): - instance = timeseriesinsights_environment_show(client, resource_group_name, environment_name) - body = instance.as_dict(keep_readonly=False) - if body['kind'] != 'Gen1': - raise InvalidArgumentValueError('Instance kind value is "{}", not match "{}"'.format(body['kind'], 'Gen1')) - - patch_parameters = { - 'kind': 'Gen1' - } + from .aaz.latest.tsi.environment import Update as _EnvironmentUpdate + Update = _EnvironmentUpdate(cmd.loader) + parameters = {} + parameters['resource_group'] = resource_group_name + parameters['environment_name'] = environment_name + parameters['gen1'] = {} if sku is not None: - patch_parameters['sku'] = sku + parameters['sku'] = sku if data_retention_time is not None: - patch_parameters['data_retention_time'] = data_retention_time + parameters['gen1']['data_retention_time'] = data_retention_time if storage_limit_exceeded_behavior is not None: - patch_parameters['storage_limit_exceeded_behavior'] = storage_limit_exceeded_behavior + parameters['gen1']['storage_limit_exceeded_behavior'] = storage_limit_exceeded_behavior if tags is not None: - patch_parameters['tags'] = tags + parameters['tags'] = tags + parameters['no_wait'] = no_wait - if len(patch_parameters) > 2: # Only a single event source property can be updated per PATCH request - body.update(patch_parameters) - return sdk_no_wait(no_wait, - client.begin_create_or_update, - resource_group_name=resource_group_name, - environment_name=environment_name, - parameters=body) - return sdk_no_wait(no_wait, - client.begin_update, - resource_group_name=resource_group_name, - environment_name=environment_name, - environment_update_parameters=patch_parameters) - - -def timeseriesinsights_environment_gen2_create(client, + return Update(parameters) + + +def timeseriesinsights_environment_gen2_create(cmd, resource_group_name, environment_name, location, @@ -106,58 +73,46 @@ def timeseriesinsights_environment_gen2_create(client, tags=None, warm_store_configuration=None, no_wait=False): + from .aaz.latest.tsi.environment import Create as _EnvironmentCreate + Create = _EnvironmentCreate(cmd.loader) parameters = {} + parameters['resource_group'] = resource_group_name + parameters['environment_name'] = environment_name parameters['location'] = location parameters['tags'] = tags - parameters['kind'] = 'Gen2' parameters['sku'] = sku - parameters['time_series_id_properties'] = time_series_id_properties - parameters['storage_configuration'] = storage_configuration - parameters['warm_store_configuration'] = warm_store_configuration - return sdk_no_wait(no_wait, - client.begin_create_or_update, - resource_group_name=resource_group_name, - environment_name=environment_name, - parameters=parameters) + parameters['gen2'] = {} + parameters['gen2']['time_series_id_properties'] = time_series_id_properties + parameters['gen2']['storage_configuration'] = storage_configuration + if warm_store_configuration is not None: + parameters['gen2']['warm_store_configuration'] = warm_store_configuration + parameters['no_wait'] = no_wait + + return Create(parameters) -def timeseriesinsights_environment_gen2_update(client, +def timeseriesinsights_environment_gen2_update(cmd, resource_group_name, environment_name, storage_configuration=None, tags=None, warm_store_configuration=None, no_wait=False): - instance = timeseriesinsights_environment_show(client, resource_group_name, environment_name) - body = instance.as_dict(keep_readonly=False) - if body['kind'] != 'Gen2': - raise InvalidArgumentValueError('Instance kind value is "{}", not match "{}"'.format(body['kind'], 'Gen2')) - - patch_parameters = { - 'kind': 'Gen2' - } + from .aaz.latest.tsi.environment import Update as _EnvironmentUpdate + Update = _EnvironmentUpdate(cmd.loader) + parameters = {} + parameters['resource_group'] = resource_group_name + parameters['environment_name'] = environment_name + parameters['gen2'] = {} if storage_configuration is not None: - patch_parameters['storage_configuration'] = storage_configuration + parameters['gen2']['storage_configuration'] = storage_configuration if warm_store_configuration is not None: - patch_parameters['warm_store_configuration'] = warm_store_configuration - + parameters['gen2']['warm_store_configuration'] = warm_store_configuration if tags is not None: - patch_parameters['tags'] = tags + parameters['tags'] = tags + parameters['no_wait'] = no_wait - if len(patch_parameters) > 2: # Only a single event source property can be updated per PATCH request - if 'storage_configuration' not in patch_parameters: - raise InvalidArgumentValueError('--storage-configuration is required for multi properties update') - body.update(patch_parameters) - return sdk_no_wait(no_wait, - client.begin_create_or_update, - resource_group_name=resource_group_name, - environment_name=environment_name, - parameters=body) - return sdk_no_wait(no_wait, - client.begin_update, - resource_group_name=resource_group_name, - environment_name=environment_name, - environment_update_parameters=patch_parameters) + return Update(parameters) def timeseriesinsights_event_source_list(client, @@ -327,23 +282,7 @@ def timeseriesinsights_event_source_iot_hub_update(client, event_source_update_parameters=patch_parameters) -def timeseriesinsights_reference_data_set_list(client, - resource_group_name, - environment_name): - return client.list_by_environment(resource_group_name=resource_group_name, - environment_name=environment_name).value - - -def timeseriesinsights_reference_data_set_show(client, - resource_group_name, - environment_name, - reference_data_set_name): - return client.get(resource_group_name=resource_group_name, - environment_name=environment_name, - reference_data_set_name=reference_data_set_name) - - -def timeseriesinsights_reference_data_set_create(client, +def timeseriesinsights_reference_data_set_create(cmd, resource_group_name, environment_name, reference_data_set_name, @@ -351,97 +290,26 @@ def timeseriesinsights_reference_data_set_create(client, key_properties, tags=None, data_string_comparison_behavior=None): + from .aaz.latest.tsi.reference_data_set import Create as _ReferenceDataSetCreate + Create = _ReferenceDataSetCreate(cmd.loader) parameters = {} + parameters['resource_group'] = resource_group_name + parameters['environment_name'] = environment_name + parameters['reference_data_set_name'] = reference_data_set_name parameters['location'] = location parameters['tags'] = tags parameters['key_properties'] = key_properties parameters['data_string_comparison_behavior'] = data_string_comparison_behavior - return client.create_or_update(resource_group_name=resource_group_name, - environment_name=environment_name, - reference_data_set_name=reference_data_set_name, - parameters=parameters) + return Create(parameters) -def timeseriesinsights_reference_data_set_update(client, - resource_group_name, - environment_name, - reference_data_set_name, - tags=None): - patch_parameters = {} - if tags is not None: - patch_parameters['tags'] = tags - - return client.update(resource_group_name=resource_group_name, - environment_name=environment_name, - reference_data_set_name=reference_data_set_name, - reference_data_set_update_parameters=patch_parameters) - - -def timeseriesinsights_reference_data_set_delete(client, - resource_group_name, - environment_name, - reference_data_set_name): - return client.delete(resource_group_name=resource_group_name, - environment_name=environment_name, - reference_data_set_name=reference_data_set_name) +class EnvironmentList(_EnvironmentList): + def _output(self): + result = super()._output(self) + return result["value"] -def timeseriesinsights_access_policy_list(client, - resource_group_name, - environment_name): - return client.list_by_environment(resource_group_name=resource_group_name, - environment_name=environment_name).value - - -def timeseriesinsights_access_policy_show(client, - resource_group_name, - environment_name, - access_policy_name): - return client.get(resource_group_name=resource_group_name, - environment_name=environment_name, - access_policy_name=access_policy_name) - - -def timeseriesinsights_access_policy_create(client, - resource_group_name, - environment_name, - access_policy_name, - principal_object_id=None, - description=None, - roles=None): - parameters = {} - parameters['principal_object_id'] = principal_object_id - parameters['description'] = description - parameters['roles'] = roles - return client.create_or_update(resource_group_name=resource_group_name, - environment_name=environment_name, - access_policy_name=access_policy_name, - parameters=parameters) - - -def timeseriesinsights_access_policy_update(client, - resource_group_name, - environment_name, - access_policy_name, - description=None, - roles=None): - patch_parameters = {} - if description is not None: - patch_parameters['description'] = description - - if roles is not None: - patch_parameters['roles'] = roles - - return client.update(resource_group_name=resource_group_name, - environment_name=environment_name, - access_policy_name=access_policy_name, - access_policy_update_parameters=patch_parameters) - - -def timeseriesinsights_access_policy_delete(client, - resource_group_name, - environment_name, - access_policy_name): - return client.delete(resource_group_name=resource_group_name, - environment_name=environment_name, - access_policy_name=access_policy_name) +class ReferenceDataSetList(_ReferenceDataSetList): + def _output(self): + result = super()._output(self) + return result["value"] diff --git a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_access_policy.yaml b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_access_policy.yaml index 0f26c984696..d14762b58c6 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_access_policy.yaml +++ b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_access_policy.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"location": "westus", "kind": "Gen1", "sku": {"name": "S1", "capacity": - 1}, "properties": {"dataRetentionTime": "P31D", "storageLimitExceededBehavior": - "PauseIngress", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}]}}' + body: '{"kind": "Gen1", "location": "westus", "sku": {"capacity": 1, "name": "S1"}, + "properties": {"dataRetentionTime": "P31D", "partitionKeyProperties": [{"name": + "DeviceId1", "type": "String"}], "storageLimitExceededBehavior": "PauseIngress"}}' headers: Accept: - application/json @@ -20,22 +20,21 @@ interactions: - --resource-group --location --name --sku --data-retention-time --partition-key-properties --storage-limit-exceeded-behavior User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:42:47.2211274+00:00","provisioningState":"Accepted","dataAccessId":"149eaebd-73fd-4549-9447-b0fb23e2fbcd","dataAccessFqdn":"149eaebd-73fd-4549-9447-b0fb23e2fbcd.env.timeseries.azure.com","requestApiVersion":"2020-05-15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002","name":"cli-test-tsi-env000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:00.1325150Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:01.2098313Z","provisioningState":"Succeeded","dataAccessId":"e1e37c22-e694-47a9-8b71-282c7816b494","dataAccessFqdn":"e1e37c22-e694-47a9-8b71-282c7816b494.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002","name":"cli-test-tsi-env000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '794' + - '737' content-type: - application/json date: - - Wed, 27 Jan 2021 05:42:48 GMT + - Tue, 01 Aug 2023 03:27:01 GMT expires: - '-1' pragma: @@ -46,110 +45,16 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/11f1333b-9b85-41e3-a897-869c232bdacb x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1194' status: code: 201 message: Created - request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - tsi environment gen1 create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --location --name --sku --data-retention-time --partition-key-properties - --storage-limit-exceeded-behavior - User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002?api-version=2020-05-15 - response: - body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:42:47.2211274Z","provisioningState":"Creating","requestApiVersion":"2020-05-15","dataAccessId":"149eaebd-73fd-4549-9447-b0fb23e2fbcd","dataAccessFqdn":"149eaebd-73fd-4549-9447-b0fb23e2fbcd.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002","name":"cli-test-tsi-env000002","type":"Microsoft.TimeSeriesInsights/Environments"}' - headers: - cache-control: - - no-cache - content-length: - - '789' - content-type: - - application/json - date: - - Wed, 27 Jan 2021 05:43:20 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - tsi environment gen1 create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --location --name --sku --data-retention-time --partition-key-properties - --storage-limit-exceeded-behavior - User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002?api-version=2020-05-15 - response: - body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:42:47.2211274Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"149eaebd-73fd-4549-9447-b0fb23e2fbcd","dataAccessFqdn":"149eaebd-73fd-4549-9447-b0fb23e2fbcd.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002","name":"cli-test-tsi-env000002","type":"Microsoft.TimeSeriesInsights/Environments"}' - headers: - cache-control: - - no-cache - content-length: - - '790' - content-type: - - application/json - date: - - Wed, 27 Jan 2021 05:43:50 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"properties": {"principalObjectId": "001", "description": "some description", - "roles": ["Contributor", "Reader"]}}' + body: '{"properties": {"description": "some description", "principalObjectId": + "001", "roles": ["Contributor", "Reader"]}}' headers: Accept: - application/json @@ -166,22 +71,21 @@ interactions: ParameterSetName: - -g --environment-name --name --principal-object-id --description --roles User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accessPolicies/ap1?api-version=2020-05-15 response: body: - string: '{"properties":{"principalObjectId":"001","description":"some description","roles":["Contributor","Reader"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accesspolicies/ap1","name":"ap1","type":"Microsoft.TimeSeriesInsights/Environments/AccessPolicies"}' + string: '{"properties":{"description":"some description","principalObjectId":"001","roles":["Contributor","Reader"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accesspolicies/ap1","name":"ap1","type":"Microsoft.TimeSeriesInsights/Environments/AccessPolicies"}' headers: cache-control: - no-cache content-length: - - '433' + - '371' content-type: - application/json date: - - Wed, 27 Jan 2021 05:43:51 GMT + - Tue, 01 Aug 2023 03:27:04 GMT expires: - '-1' pragma: @@ -197,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' status: code: 200 message: OK @@ -219,23 +123,21 @@ interactions: ParameterSetName: - -g --environment-name --name --description --roles User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accessPolicies/ap1?api-version=2020-05-15 response: body: - string: '{"properties":{"principalObjectId":"001","description":"some description - updated","roles":["Contributor"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accesspolicies/ap1","name":"ap1","type":"Microsoft.TimeSeriesInsights/Environments/AccessPolicies"}' + string: '{"properties":{"description":"some description updated","principalObjectId":"001","roles":["Contributor"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accesspolicies/ap1","name":"ap1","type":"Microsoft.TimeSeriesInsights/Environments/AccessPolicies"}' headers: cache-control: - no-cache content-length: - - '432' + - '370' content-type: - application/json date: - - Wed, 27 Jan 2021 05:43:54 GMT + - Tue, 01 Aug 2023 03:27:06 GMT expires: - '-1' pragma: @@ -251,7 +153,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1195' status: code: 200 message: OK @@ -269,23 +171,21 @@ interactions: ParameterSetName: - -g --environment-name --name User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accessPolicies/ap1?api-version=2020-05-15 response: body: - string: '{"properties":{"principalObjectId":"001","description":"some description - updated","roles":["Contributor"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accesspolicies/ap1","name":"ap1","type":"Microsoft.TimeSeriesInsights/Environments/AccessPolicies"}' + string: '{"properties":{"description":"some description updated","principalObjectId":"001","roles":["Contributor"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accesspolicies/ap1","name":"ap1","type":"Microsoft.TimeSeriesInsights/Environments/AccessPolicies"}' headers: cache-control: - no-cache content-length: - - '432' + - '370' content-type: - application/json date: - - Wed, 27 Jan 2021 05:43:55 GMT + - Tue, 01 Aug 2023 03:27:08 GMT expires: - '-1' pragma: @@ -317,23 +217,21 @@ interactions: ParameterSetName: - -g --environment-name User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accessPolicies?api-version=2020-05-15 response: body: - string: '{"value":[{"properties":{"principalObjectId":"001","description":"some - description updated","roles":["Contributor"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accesspolicies/ap1","name":"ap1","type":"Microsoft.TimeSeriesInsights/Environments/AccessPolicies"}]}' + string: '{"value":[{"properties":{"description":"some description updated","principalObjectId":"001","roles":["Contributor"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accesspolicies/ap1","name":"ap1","type":"Microsoft.TimeSeriesInsights/Environments/AccessPolicies"}]}' headers: cache-control: - no-cache content-length: - - '444' + - '382' content-type: - application/json date: - - Wed, 27 Jan 2021 05:43:56 GMT + - Tue, 01 Aug 2023 03:27:10 GMT expires: - '-1' pragma: @@ -355,7 +253,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -367,8 +265,7 @@ interactions: ParameterSetName: - -g --environment-name --name --yes User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000002/accessPolicies/ap1?api-version=2020-05-15 response: @@ -380,7 +277,7 @@ interactions: content-length: - '0' date: - - Wed, 27 Jan 2021 05:43:58 GMT + - Tue, 01 Aug 2023 03:27:11 GMT expires: - '-1' pragma: @@ -392,7 +289,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' status: code: 200 message: OK diff --git a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_environment_gen1.yaml b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_environment_gen1.yaml index 7b6d2006296..58c5a15aef4 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_environment_gen1.yaml +++ b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_environment_gen1.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"location": "westus", "kind": "Gen1", "sku": {"name": "S1", "capacity": - 1}, "properties": {"dataRetentionTime": "P31D", "storageLimitExceededBehavior": - "PauseIngress", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}]}}' + body: '{"kind": "Gen1", "location": "westus", "sku": {"capacity": 1, "name": "S1"}, + "properties": {"dataRetentionTime": "P31D", "partitionKeyProperties": [{"name": + "DeviceId1", "type": "String"}], "storageLimitExceededBehavior": "PauseIngress"}}' headers: Accept: - application/json @@ -20,22 +20,21 @@ interactions: - --resource-group --location --name --sku --data-retention-time --partition-key-properties --storage-limit-exceeded-behavior User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578+00:00","provisioningState":"Accepted","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com","requestApiVersion":"2020-05-15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9009309Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '794' + - '739' content-type: - application/json date: - - Wed, 27 Jan 2021 05:44:22 GMT + - Tue, 01 Aug 2023 03:27:00 GMT expires: - '-1' pragma: @@ -46,107 +45,13 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/f14487f5-98b0-455c-bfe6-0f524e3e319e x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1194' status: code: 201 message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - tsi environment gen1 create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --location --name --sku --data-retention-time --partition-key-properties - --storage-limit-exceeded-behavior - User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 - response: - body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Creating","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' - headers: - cache-control: - - no-cache - content-length: - - '789' - content-type: - - application/json - date: - - Wed, 27 Jan 2021 05:44:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - tsi environment gen1 create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --location --name --sku --data-retention-time --partition-key-properties - --storage-limit-exceeded-behavior - User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 - response: - body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' - headers: - cache-control: - - no-cache - content-length: - - '790' - content-type: - - application/json - date: - - Wed, 27 Jan 2021 05:45:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK - request: body: null headers: @@ -161,22 +66,21 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9009309Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '790' + - '739' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:26 GMT + - Tue, 01 Aug 2023 03:27:03 GMT expires: - '-1' pragma: @@ -208,22 +112,21 @@ interactions: ParameterSetName: - --resource-group --name --sku User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9009309Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '790' + - '739' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:27 GMT + - Tue, 01 Aug 2023 03:27:05 GMT expires: - '-1' pragma: @@ -242,7 +145,10 @@ interactions: code: 200 message: OK - request: - body: '{"sku": {"name": "S1", "capacity": 2}}' + body: '{"kind": "Gen1", "location": "westus", "sku": {"capacity": 2, "name": "S1"}, + "tags": {"CreatedOnDate": "2023-08-01T03:26:59.9009309Z"}, "properties": {"dataRetentionTime": + "P31D", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}], + "storageLimitExceededBehavior": "PauseIngress"}}' headers: Accept: - application/json @@ -253,28 +159,27 @@ interactions: Connection: - keep-alive Content-Length: - - '38' + - '297' Content-Type: - application/json ParameterSetName: - --resource-group --name --sku User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: PATCH + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) + method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":2},"kind":"Gen1","location":"westus","tags":{},"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":2},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9009309Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '788' + - '739' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:32 GMT + - Tue, 01 Aug 2023 03:27:06 GMT expires: - '-1' pragma: @@ -289,8 +194,10 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/18f1130b-ead1-47a5-b8d8-a8acf214b8b9 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1195' status: code: 200 message: OK @@ -308,22 +215,21 @@ interactions: ParameterSetName: - --resource-group --name --storage-limit-exceeded-behavior User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":2},"kind":"Gen1","location":"westus","tags":{},"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":2},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9009309Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '788' + - '739' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:33 GMT + - Tue, 01 Aug 2023 03:27:08 GMT expires: - '-1' pragma: @@ -342,7 +248,10 @@ interactions: code: 200 message: OK - request: - body: '{"properties": {"storageLimitExceededBehavior": "PurgeOldData"}}' + body: '{"kind": "Gen1", "location": "westus", "sku": {"capacity": 2, "name": "S1"}, + "tags": {"CreatedOnDate": "2023-08-01T03:26:59.9009309Z"}, "properties": {"dataRetentionTime": + "P31D", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}], + "storageLimitExceededBehavior": "PurgeOldData"}}' headers: Accept: - application/json @@ -353,28 +262,27 @@ interactions: Connection: - keep-alive Content-Length: - - '64' + - '297' Content-Type: - application/json ParameterSetName: - --resource-group --name --storage-limit-exceeded-behavior User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: PATCH + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) + method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":2},"kind":"Gen1","location":"westus","tags":{},"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PurgeOldData","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":2},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9009309Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PurgeOldData","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '788' + - '739' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:34 GMT + - Tue, 01 Aug 2023 03:27:09 GMT expires: - '-1' pragma: @@ -389,8 +297,10 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/b9cb49f7-be4b-4cab-a82e-ea217f3d55fa x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1196' status: code: 200 message: OK @@ -408,22 +318,21 @@ interactions: ParameterSetName: - --resource-group --name --storage-limit-exceeded-behavior --sku User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":2},"kind":"Gen1","location":"westus","tags":{},"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PurgeOldData","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":2},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9009309Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PurgeOldData","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '788' + - '739' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:35 GMT + - Tue, 01 Aug 2023 03:27:12 GMT expires: - '-1' pragma: @@ -442,9 +351,10 @@ interactions: code: 200 message: OK - request: - body: '{"location": "westus", "tags": {}, "kind": "Gen1", "sku": {"name": "S1", - "capacity": 1}, "properties": {"dataRetentionTime": "P31D", "storageLimitExceededBehavior": - "PauseIngress", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}]}}' + body: '{"kind": "Gen1", "location": "westus", "sku": {"capacity": 1, "name": "S1"}, + "tags": {"CreatedOnDate": "2023-08-01T03:26:59.9009309Z"}, "properties": {"dataRetentionTime": + "P31D", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}], + "storageLimitExceededBehavior": "PauseIngress"}}' headers: Accept: - application/json @@ -455,28 +365,27 @@ interactions: Connection: - keep-alive Content-Length: - - '250' + - '297' Content-Type: - application/json ParameterSetName: - --resource-group --name --storage-limit-exceeded-behavior --sku User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{},"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9009309Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '788' + - '739' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:38 GMT + - Tue, 01 Aug 2023 03:27:12 GMT expires: - '-1' pragma: @@ -491,8 +400,10 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/e4cc4e86-40fd-415c-b975-94777b27da35 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1193' status: code: 200 message: OK @@ -510,22 +421,21 @@ interactions: ParameterSetName: - --resource-group --name --tags User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{},"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9009309Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '788' + - '739' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:40 GMT + - Tue, 01 Aug 2023 03:27:14 GMT expires: - '-1' pragma: @@ -544,7 +454,10 @@ interactions: code: 200 message: OK - request: - body: '{"tags": {"key1": "value1", "key2": "value2"}}' + body: '{"kind": "Gen1", "location": "westus", "sku": {"capacity": 1, "name": "S1"}, + "tags": {"key1": "value1", "key2": "value2"}, "properties": {"dataRetentionTime": + "P31D", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}], + "storageLimitExceededBehavior": "PauseIngress"}}' headers: Accept: - application/json @@ -555,28 +468,27 @@ interactions: Connection: - keep-alive Content-Length: - - '46' + - '284' Content-Type: - application/json ParameterSetName: - --resource-group --name --tags User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: PATCH + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) + method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"key1":"value1","key2":"value2"},"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"key1":"value1","key2":"value2","CreatedOnDate":"2023-08-01T03:27:15.7264875Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '819' + - '771' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:45 GMT + - Tue, 01 Aug 2023 03:27:16 GMT expires: - '-1' pragma: @@ -591,8 +503,10 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/9d345d32-49c8-437b-8198-b3e7648e6515 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1195' status: code: 200 message: OK @@ -610,22 +524,21 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments?api-version=2020-05-15 response: body: - string: '{"value":[{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"key1":"value1","key2":"value2"},"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}]}' + string: '{"value":[{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"key1":"value1","key2":"value2","CreatedOnDate":"2023-08-01T03:27:15.7264875Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}]}' headers: cache-control: - no-cache content-length: - - '831' + - '783' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:46 GMT + - Tue, 01 Aug 2023 03:27:18 GMT expires: - '-1' pragma: @@ -655,22 +568,21 @@ interactions: Connection: - keep-alive User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.TimeSeriesInsights/environments?api-version=2020-05-15 response: body: - string: '{"value":[{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:37:28.3586687Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"bac4ebb4-a9e0-45a9-859d-df7875bbb149","dataAccessFqdn":"bac4ebb4-a9e0-45a9-859d-df7875bbb149.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rgucp7fw6ijrepcfm2ul47s4iqggqidlntv67lmdtvklnc4hxidmmyvb3pwghbhzmx3p/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1orodigd","name":"cli-test-tsi-env1orodigd","type":"Microsoft.TimeSeriesInsights/Environments"},{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"key1":"value1","key2":"value2"},"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:44:19.8814578Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a","dataAccessFqdn":"f2b9fa51-9255-40dc-bbfa-879c8a60db0a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"}]}' + string: '{"value":[{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-07-31T07:00:51.9135961Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-07-31T07:00:52.9345897Z","provisioningState":"Succeeded","dataAccessId":"2f8b095a-ff34-4dae-92e0-98d61ee10d86","dataAccessFqdn":"2f8b095a-ff34-4dae-92e0-98d61ee10d86.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg6lfiy2nshcchbpsye5zwl7vtcrbymfgbxpbug2juwcgyvcmarsmirwbibbzbhbaaog/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-envjkea27as","name":"cli-test-tsi-envjkea27as","type":"Microsoft.TimeSeriesInsights/Environments"},{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-07-31T06:49:18.3300024Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-07-31T06:49:19.3953945Z","provisioningState":"Succeeded","dataAccessId":"16aeda53-c29b-4769-960f-989ea6b0d1a9","dataAccessFqdn":"16aeda53-c29b-4769-960f-989ea6b0d1a9.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rgbeeggxzeys7wlo6eag6uwu3eqn4krcyvg7lzufiipba7e2ju5b4kyjgzv25ny3ucdj/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-envy3szfbyu","name":"cli-test-tsi-envy3szfbyu","type":"Microsoft.TimeSeriesInsights/Environments"},{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9892249Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.8073098Z","provisioningState":"Succeeded","dataAccessId":"99553ab3-e958-49b7-9e8a-0fd501a7cdff","dataAccessFqdn":"99553ab3-e958-49b7-9e8a-0fd501a7cdff.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rgsfdeloea3a74pdax5n6ka7lh4fb3y2mdlexr263ace42otqnypsgvdmvcoolhff2ot/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-envmjvsukfx","name":"cli-test-tsi-envmjvsukfx","type":"Microsoft.TimeSeriesInsights/Environments"},{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"key1":"value1","key2":"value2","CreatedOnDate":"2023-08-01T03:27:15.7264875Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.7083365Z","provisioningState":"Succeeded","dataAccessId":"a722e674-4aa8-4d18-bda5-fba8e78c0e19","dataAccessFqdn":"a722e674-4aa8-4d18-bda5-fba8e78c0e19.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002","name":"cli-test-tsi-env1000002","type":"Microsoft.TimeSeriesInsights/Environments"},{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:19.2920826Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:20.1199021Z","provisioningState":"Succeeded","dataAccessId":"02a9b3d7-8e9e-4ca1-b6de-6d99c6a76148","dataAccessFqdn":"02a9b3d7-8e9e-4ca1-b6de-6d99c6a76148.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rgvdf2bsdihsi2mphav4vvxl5asthpu5tstka6rl7iakgwmg5sn3xrh7qdhjzrwgxabs/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-envehyzhca5","name":"cli-test-tsi-envehyzhca5","type":"Microsoft.TimeSeriesInsights/Environments"},{"sku":{"name":"S1","capacity":2},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-07-31T07:27:24.7645077Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PurgeOldData","creationTime":"2023-07-31T07:28:27.7866602Z","provisioningState":"Succeeded","dataAccessId":"3db0d031-7d71-4eaf-82fd-653ac025f9c6","dataAccessFqdn":"3db0d031-7d71-4eaf-82fd-653ac025f9c6.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg7ohdfaaeli2kll7opojpjg2qi4db7voqnx5ouvfcltmqdqskcii2xr2nlzskvvfh3m/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1dquxi5m","name":"cli-test-tsi-env1dquxi5m","type":"Microsoft.TimeSeriesInsights/Environments"},{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:00.1325150Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:01.2098313Z","provisioningState":"Succeeded","dataAccessId":"e1e37c22-e694-47a9-8b71-282c7816b494","dataAccessFqdn":"e1e37c22-e694-47a9-8b71-282c7816b494.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg5ux7tbufijecqgliwzybfzdufrdsynzoe557hk4unubma323buzxlmgkrk54oztqlx/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-envmmzbl5dx","name":"cli-test-tsi-envmmzbl5dx","type":"Microsoft.TimeSeriesInsights/Environments"},{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-07-28T08:14:38.9892186Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-07-28T08:14:39.9225287Z","provisioningState":"Succeeded","dataAccessId":"d26ce453-1b2c-471b-b9ba-1d571c15a54a","dataAccessFqdn":"d26ce453-1b2c-471b-b9ba-1d571c15a54a.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rgg74me3vkpxx5yjl/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1uasqdcx","name":"cli-test-tsi-env1uasqdcx","type":"Microsoft.TimeSeriesInsights/Environments"},{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-07-28T07:02:04.9415652Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-07-28T07:02:05.8497168Z","provisioningState":"Succeeded","dataAccessId":"d337f4c8-8fe6-4039-99ff-62a136430320","dataAccessFqdn":"d337f4c8-8fe6-4039-99ff-62a136430320.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rggtucawkoyy3b2be77l5odihdusekkhyqfwgjpbu23fbzda2fkgbc455ujgfcmmmjtr/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env3klwclur","name":"cli-test-tsi-env3klwclur","type":"Microsoft.TimeSeriesInsights/Environments"}]}' headers: cache-control: - no-cache content-length: - - '1622' + - '7148' content-type: - application/json date: - - Wed, 27 Jan 2021 05:45:48 GMT + - Tue, 01 Aug 2023 03:27:20 GMT expires: - '-1' pragma: @@ -692,7 +604,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -704,8 +616,7 @@ interactions: ParameterSetName: - --resource-group --name --yes User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env1000002?api-version=2020-05-15 response: @@ -717,7 +628,7 @@ interactions: content-length: - '0' date: - - Wed, 27 Jan 2021 05:45:51 GMT + - Tue, 01 Aug 2023 03:27:23 GMT expires: - '-1' pragma: @@ -747,8 +658,7 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments?api-version=2020-05-15 response: @@ -762,7 +672,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:45:51 GMT + - Tue, 01 Aug 2023 03:27:25 GMT expires: - '-1' pragma: diff --git a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_environment_gen2.yaml b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_environment_gen2.yaml index 68107fe7592..5ecefa24fbc 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_environment_gen2.yaml +++ b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_environment_gen2.yaml @@ -15,21 +15,22 @@ interactions: ParameterSetName: - -g -n --query --output User-Agent: - - AZURECLI/2.20.0 azsdk-python-azure-mgmt-storage/17.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-storage/21.0.0 Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2021-01-01&$expand=kerb + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2022-09-01&$expand=kerb response: body: - string: '{"keys":[{"keyName":"key1","value":"veryFakedStorageAccountKey==","permissions":"FULL"},{"keyName":"key2","value":"veryFakedStorageAccountKey==","permissions":"FULL"}]}' + string: '{"keys":[{"creationTime":"2023-08-01T03:27:01.7652281Z","keyName":"key1","value":"veryFakedStorageAccountKey==","permissions":"FULL"},{"creationTime":"2023-08-01T03:27:01.7652281Z","keyName":"key2","value":"veryFakedStorageAccountKey==","permissions":"FULL"}]}' headers: cache-control: - no-cache content-length: - - '288' + - '260' content-type: - application/json date: - - Wed, 10 Mar 2021 05:53:17 GMT + - Tue, 01 Aug 2023 03:27:26 GMT expires: - '-1' pragma: @@ -45,15 +46,15 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11999' + - '11998' status: code: 200 message: OK - request: - body: '{"location": "westus", "kind": "Gen2", "sku": {"name": "L1", "capacity": - 1}, "properties": {"timeSeriesIdProperties": [{"name": "DeviceId1", "type": - "String"}], "storageConfiguration": {"accountName": "clitest000002", "managementKey": - "veryFakedStorageAccountKey=="}}}' + body: '{"kind": "Gen2", "location": "westus", "sku": {"capacity": 1, "name": "L1"}, + "properties": {"storageConfiguration": {"accountName": "clitest000002", "managementKey": + "veryFakedStorageAccountKey=="}, "timeSeriesIdProperties": [{"name": "DeviceId1", + "type": "String"}]}}' headers: Accept: - application/json @@ -64,28 +65,27 @@ interactions: Connection: - keep-alive Content-Length: - - '339' + - '268' Content-Type: - application/json ParameterSetName: - --resource-group --location --name --sku --time-series-id-properties --storage-configuration User-Agent: - - AZURECLI/2.20.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.8 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"westus","tags":null,"properties":{"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"storageConfiguration":{"accountName":"clitest000002"},"creationTime":"2021-03-10T05:53:27.0641305+00:00","provisioningState":"Accepted","dataAccessId":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd","dataAccessFqdn":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd.env.timeseries.azure.com","requestApiVersion":"2020-05-15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"WestUs","tags":{"CreatedOnDate":"2023-08-01T03:27:28.1248743Z"},"properties":{"storageConfiguration":{"accountName":"clitest000002"},"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2023-08-01T03:27:28.7827767Z","provisioningState":"Succeeded","dataAccessId":"e0718890-573b-425f-9bbb-985e4e8cd96f","dataAccessFqdn":"e0718890-573b-425f-9bbb-985e4e8cd96f.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '787' + - '721' content-type: - application/json date: - - Wed, 10 Mar 2021 05:53:30 GMT + - Tue, 01 Aug 2023 03:27:29 GMT expires: - '-1' pragma: @@ -96,58 +96,13 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/931856fe-2472-4360-be69-557f0f932c5f x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1191' status: code: 201 message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - tsi environment gen2 create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --location --name --sku --time-series-id-properties --storage-configuration - User-Agent: - - AZURECLI/2.20.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.8 - (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003?api-version=2020-05-15 - response: - body: - string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"westus","tags":null,"properties":{"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"storageConfiguration":{"accountName":"clitest000002"},"creationTime":"2021-03-10T05:53:27.0641305Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd","dataAccessFqdn":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' - headers: - cache-control: - - no-cache - content-length: - - '783' - content-type: - - application/json - date: - - Wed, 10 Mar 2021 05:54:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK - request: body: null headers: @@ -162,22 +117,21 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - AZURECLI/2.20.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.8 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"westus","tags":null,"properties":{"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"storageConfiguration":{"accountName":"clitest000002"},"creationTime":"2021-03-10T05:53:27.0641305Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd","dataAccessFqdn":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"WestUs","tags":{"CreatedOnDate":"2023-08-01T03:27:28.1248743Z"},"properties":{"storageConfiguration":{"accountName":"clitest000002"},"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2023-08-01T03:27:28.7827767Z","provisioningState":"Succeeded","dataAccessId":"e0718890-573b-425f-9bbb-985e4e8cd96f","dataAccessFqdn":"e0718890-573b-425f-9bbb-985e4e8cd96f.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '783' + - '721' content-type: - application/json date: - - Wed, 10 Mar 2021 05:54:02 GMT + - Tue, 01 Aug 2023 03:27:31 GMT expires: - '-1' pragma: @@ -209,22 +163,21 @@ interactions: ParameterSetName: - --resource-group --name --warm-store-configuration --storage-configuration User-Agent: - - AZURECLI/2.20.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.8 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"westus","tags":null,"properties":{"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"storageConfiguration":{"accountName":"clitest000002"},"creationTime":"2021-03-10T05:53:27.0641305Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd","dataAccessFqdn":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"WestUs","tags":{"CreatedOnDate":"2023-08-01T03:27:28.1248743Z"},"properties":{"storageConfiguration":{"accountName":"clitest000002"},"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2023-08-01T03:27:28.7827767Z","provisioningState":"Succeeded","dataAccessId":"e0718890-573b-425f-9bbb-985e4e8cd96f","dataAccessFqdn":"e0718890-573b-425f-9bbb-985e4e8cd96f.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '783' + - '721' content-type: - application/json date: - - Wed, 10 Mar 2021 05:54:04 GMT + - Tue, 01 Aug 2023 03:27:33 GMT expires: - '-1' pragma: @@ -243,11 +196,11 @@ interactions: code: 200 message: OK - request: - body: '{"location": "westus", "kind": "Gen2", "sku": {"name": "L1", "capacity": - 1}, "properties": {"timeSeriesIdProperties": [{"name": "DeviceId1", "type": - "String"}], "storageConfiguration": {"accountName": "clitest000002", "managementKey": - "veryFakedStorageAccountKey=="}, "warmStoreConfiguration": {"dataRetention": - "P30D"}}}' + body: '{"kind": "Gen2", "location": "WestUs", "sku": {"capacity": 1, "name": "L1"}, + "tags": {"CreatedOnDate": "2023-08-01T03:27:28.1248743Z"}, "properties": {"storageConfiguration": + {"accountName": "clitest000002", "managementKey": "veryFakedStorageAccountKey=="}, + "timeSeriesIdProperties": [{"name": "DeviceId1", "type": "String"}], "warmStoreConfiguration": + {"dataRetention": "P30D"}}}' headers: Accept: - application/json @@ -258,28 +211,27 @@ interactions: Connection: - keep-alive Content-Length: - - '392' + - '380' Content-Type: - application/json ParameterSetName: - --resource-group --name --warm-store-configuration --storage-configuration User-Agent: - - AZURECLI/2.20.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.8 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"westus","tags":null,"properties":{"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"storageConfiguration":{"accountName":"clitest000002"},"warmStoreConfiguration":{"dataRetention":"P30D"},"creationTime":"2021-03-10T05:53:27.0641305Z","provisioningState":"Updating","requestApiVersion":"2020-05-15","dataAccessId":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd","dataAccessFqdn":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"WestUs","tags":{"CreatedOnDate":"2023-08-01T03:27:28.1248743Z"},"properties":{"storageConfiguration":{"accountName":"clitest000002"},"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"warmStoreConfiguration":{"dataRetention":"P30D"},"creationTime":"2023-08-01T03:27:28.7827767Z","provisioningState":"Updating","dataAccessId":"e0718890-573b-425f-9bbb-985e4e8cd96f","dataAccessFqdn":"e0718890-573b-425f-9bbb-985e4e8cd96f.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '832' + - '770' content-type: - application/json date: - - Wed, 10 Mar 2021 05:54:05 GMT + - Tue, 01 Aug 2023 03:27:33 GMT expires: - '-1' pragma: @@ -294,8 +246,10 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/1241e635-beae-4fa1-be77-c4e3ac74056b x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1193' status: code: 200 message: OK @@ -313,22 +267,21 @@ interactions: ParameterSetName: - --resource-group --name --warm-store-configuration --storage-configuration User-Agent: - - AZURECLI/2.20.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.8 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"westus","tags":null,"properties":{"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"storageConfiguration":{"accountName":"clitest000002"},"warmStoreConfiguration":{"dataRetention":"P30D"},"creationTime":"2021-03-10T05:53:27.0641305Z","provisioningState":"Updating","requestApiVersion":"2020-05-15","dataAccessId":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd","dataAccessFqdn":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"WestUs","tags":{"CreatedOnDate":"2023-08-01T03:27:28.1248743Z"},"properties":{"storageConfiguration":{"accountName":"clitest000002"},"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"warmStoreConfiguration":{"dataRetention":"P30D"},"creationTime":"2023-08-01T03:27:28.7827767Z","provisioningState":"Updating","dataAccessId":"e0718890-573b-425f-9bbb-985e4e8cd96f","dataAccessFqdn":"e0718890-573b-425f-9bbb-985e4e8cd96f.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '832' + - '770' content-type: - application/json date: - - Wed, 10 Mar 2021 05:54:36 GMT + - Tue, 01 Aug 2023 03:27:34 GMT expires: - '-1' pragma: @@ -360,22 +313,21 @@ interactions: ParameterSetName: - --resource-group --name --warm-store-configuration --storage-configuration User-Agent: - - AZURECLI/2.20.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.8 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"westus","tags":null,"properties":{"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"storageConfiguration":{"accountName":"clitest000002"},"warmStoreConfiguration":{"dataRetention":"P30D"},"creationTime":"2021-03-10T05:53:27.0641305Z","provisioningState":"Updating","requestApiVersion":"2020-05-15","dataAccessId":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd","dataAccessFqdn":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"WestUs","tags":{"CreatedOnDate":"2023-08-01T03:27:28.1248743Z"},"properties":{"storageConfiguration":{"accountName":"clitest000002"},"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"warmStoreConfiguration":{"dataRetention":"P30D"},"creationTime":"2023-08-01T03:27:28.7827767Z","provisioningState":"Updating","dataAccessId":"e0718890-573b-425f-9bbb-985e4e8cd96f","dataAccessFqdn":"e0718890-573b-425f-9bbb-985e4e8cd96f.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '832' + - '770' content-type: - application/json date: - - Wed, 10 Mar 2021 05:55:06 GMT + - Tue, 01 Aug 2023 03:28:03 GMT expires: - '-1' pragma: @@ -407,22 +359,21 @@ interactions: ParameterSetName: - --resource-group --name --warm-store-configuration --storage-configuration User-Agent: - - AZURECLI/2.20.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.8 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"westus","tags":null,"properties":{"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"storageConfiguration":{"accountName":"clitest000002"},"warmStoreConfiguration":{"dataRetention":"P30D"},"creationTime":"2021-03-10T05:53:27.0641305Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd","dataAccessFqdn":"ac9bef5c-6af4-4d1a-a667-8974f66c64cd.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"L1","capacity":1},"kind":"Gen2","location":"WestUs","tags":{"CreatedOnDate":"2023-08-01T03:27:28.1248743Z"},"properties":{"storageConfiguration":{"accountName":"clitest000002"},"timeSeriesIdProperties":[{"name":"DeviceId1","type":"String"}],"warmStoreConfiguration":{"dataRetention":"P30D"},"creationTime":"2023-08-01T03:27:28.7827767Z","provisioningState":"Succeeded","dataAccessId":"e0718890-573b-425f-9bbb-985e4e8cd96f","dataAccessFqdn":"e0718890-573b-425f-9bbb-985e4e8cd96f.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env2000003","name":"cli-test-tsi-env2000003","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '833' + - '771' content-type: - application/json date: - - Wed, 10 Mar 2021 05:55:37 GMT + - Tue, 01 Aug 2023 03:28:35 GMT expires: - '-1' pragma: diff --git a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_event_source_eventhub.yaml b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_event_source_eventhub.yaml index 274d2f8c00e..2f6eaedaae7 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_event_source_eventhub.yaml +++ b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_event_source_eventhub.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"location": "westus", "kind": "Gen1", "sku": {"name": "S1", "capacity": - 1}, "properties": {"dataRetentionTime": "P31D", "storageLimitExceededBehavior": - "PauseIngress", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}]}}' + body: '{"kind": "Gen1", "location": "westus", "sku": {"capacity": 1, "name": "S1"}, + "properties": {"dataRetentionTime": "P31D", "partitionKeyProperties": [{"name": + "DeviceId1", "type": "String"}], "storageLimitExceededBehavior": "PauseIngress"}}' headers: Accept: - application/json @@ -20,22 +20,21 @@ interactions: - --resource-group --location --name --sku --data-retention-time --partition-key-properties --storage-limit-exceeded-behavior User-Agent: - - AZURECLI/2.43.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.10.8 - (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2023-01-03T04:32:47.8345842Z","provisioningState":"Succeeded","dataAccessId":"4606d025-65f5-487f-9597-32eafd175e3d","dataAccessFqdn":"4606d025-65f5-487f-9597-32eafd175e3d.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005","name":"cli-test-tsi-env000005","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:26:59.9892249Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:00.8073098Z","provisioningState":"Succeeded","dataAccessId":"99553ab3-e958-49b7-9e8a-0fd501a7cdff","dataAccessFqdn":"99553ab3-e958-49b7-9e8a-0fd501a7cdff.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005","name":"cli-test-tsi-env000005","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '693' + - '737' content-type: - application/json date: - - Tue, 03 Jan 2023 04:32:47 GMT + - Tue, 01 Aug 2023 03:27:00 GMT expires: - '-1' pragma: @@ -46,8 +45,10 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/6f473a13-d319-41c8-97db-097e0e487c16 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1189' status: code: 201 message: Created @@ -65,22 +66,22 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.43.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.8 (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitsi.rg000001?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitsi.rg000001?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001","name":"clitsi.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2023-01-03T04:32:42Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001","name":"clitsi.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_timeseriesinsights_event_source_eventhub","date":"2023-08-01T03:26:55Z","module":"timeseriesinsights","CreatedOnDate":"2023-08-01T03:26:57.1774378Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '351' + - '440' content-type: - application/json; charset=utf-8 date: - - Tue, 03 Jan 2023 04:32:48 GMT + - Tue, 01 Aug 2023 03:27:02 GMT expires: - '-1' pragma: @@ -95,8 +96,8 @@ interactions: code: 200 message: OK - request: - body: '{"location": "westus", "sku": {"name": "Standard", "tier": "Standard"}, - "properties": {"publicNetworkAccess": "Enabled"}}' + body: '{"identity": {"type": "None"}, "location": "westus", "sku": {"name": "Standard", + "tier": "Standard"}}' headers: Accept: - application/json @@ -107,38 +108,37 @@ interactions: Connection: - keep-alive Content-Length: - - '121' + - '101' Content-Type: - application/json ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.43.0 azsdk-python-azure-mgmt-eventhub/10.1.0 Python/3.10.8 (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003?api-version=2022-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003?api-version=2023-01-01-preview response: body: string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003","name":"cli-test-tsi-ehns000003","type":"Microsoft.EventHub/Namespaces","location":"West - US","tags":{},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-tsi-ehns000003","createdAt":"2023-01-03T04:32:51.38Z","updatedAt":"2023-01-03T04:32:51.38Z","serviceBusEndpoint":"https://cli-test-tsi-ehns000003.servicebus.windows.net:443/","status":"Activating"}}' + US","tags":{"CreatedOnDate":"2023-08-01T03:27:04.9283056Z"},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Created","metricId":"7c943c1b-5122-4097-90c8-861411bdd574:cli-test-tsi-ehns000003","createdAt":"2023-08-01T03:27:06.657Z","updatedAt":"2023-08-01T03:27:06.657Z","serviceBusEndpoint":"https://cli-test-tsi-ehns000003.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '796' + - '844' content-type: - application/json; charset=utf-8 date: - - Tue, 03 Jan 2023 04:32:51 GMT + - Tue, 01 Aug 2023 03:27:07 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -147,6 +147,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/45237903-48df-40b7-b59e-231d03fb2716 x-ms-ratelimit-remaining-subscription-resource-requests: - '49' status: @@ -166,32 +168,31 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.43.0 azsdk-python-azure-mgmt-eventhub/10.1.0 Python/3.10.8 (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003?api-version=2022-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003?api-version=2023-01-01-preview response: body: string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003","name":"cli-test-tsi-ehns000003","type":"Microsoft.EventHub/Namespaces","location":"West - US","tags":{},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-tsi-ehns000003","createdAt":"2023-01-03T04:32:51.38Z","updatedAt":"2023-01-03T04:32:51.38Z","serviceBusEndpoint":"https://cli-test-tsi-ehns000003.servicebus.windows.net:443/","status":"Activating"}}' + US","tags":{"CreatedOnDate":"2023-08-01T03:27:04.9283056Z"},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Created","metricId":"7c943c1b-5122-4097-90c8-861411bdd574:cli-test-tsi-ehns000003","createdAt":"2023-08-01T03:27:06.657Z","updatedAt":"2023-08-01T03:27:06.657Z","serviceBusEndpoint":"https://cli-test-tsi-ehns000003.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '796' + - '844' content-type: - application/json; charset=utf-8 date: - - Tue, 03 Jan 2023 04:33:22 GMT + - Tue, 01 Aug 2023 03:27:08 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -217,32 +218,31 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.43.0 azsdk-python-azure-mgmt-eventhub/10.1.0 Python/3.10.8 (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003?api-version=2022-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003?api-version=2023-01-01-preview response: body: string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003","name":"cli-test-tsi-ehns000003","type":"Microsoft.EventHub/Namespaces","location":"West - US","tags":{},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-tsi-ehns000003","createdAt":"2023-01-03T04:32:51.38Z","updatedAt":"2023-01-03T04:33:43.677Z","serviceBusEndpoint":"https://cli-test-tsi-ehns000003.servicebus.windows.net:443/","status":"Active"}}' + US","tags":{"CreatedOnDate":"2023-08-01T03:27:04.9283056Z"},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Created","metricId":"7c943c1b-5122-4097-90c8-861411bdd574:cli-test-tsi-ehns000003","createdAt":"2023-08-01T03:27:06.657Z","updatedAt":"2023-08-01T03:27:06.657Z","serviceBusEndpoint":"https://cli-test-tsi-ehns000003.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '795' + - '844' content-type: - application/json; charset=utf-8 date: - - Tue, 03 Jan 2023 04:33:52 GMT + - Tue, 01 Aug 2023 03:27:40 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -258,7 +258,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -268,32 +268,31 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.43.0 azsdk-python-azure-mgmt-eventhub/10.1.0 Python/3.10.8 (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003?api-version=2022-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003?api-version=2023-01-01-preview response: body: string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003","name":"cli-test-tsi-ehns000003","type":"Microsoft.EventHub/Namespaces","location":"West - US","tags":{},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:cli-test-tsi-ehns000003","createdAt":"2023-01-03T04:32:51.38Z","updatedAt":"2023-01-03T04:33:43.677Z","serviceBusEndpoint":"https://cli-test-tsi-ehns000003.servicebus.windows.net:443/","status":"Active"}}' + US","tags":{"CreatedOnDate":"2023-08-01T03:27:04.9283056Z"},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Succeeded","metricId":"7c943c1b-5122-4097-90c8-861411bdd574:cli-test-tsi-ehns000003","createdAt":"2023-08-01T03:27:06.657Z","updatedAt":"2023-08-01T03:27:54.303Z","serviceBusEndpoint":"https://cli-test-tsi-ehns000003.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '795' + - '842' content-type: - application/json; charset=utf-8 date: - - Tue, 03 Jan 2023 04:33:52 GMT + - Tue, 01 Aug 2023 03:28:10 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -323,22 +322,21 @@ interactions: ParameterSetName: - -g -n --namespace-name User-Agent: - - AZURECLI/2.43.0 azsdk-python-azure-mgmt-eventhub/10.1.0 Python/3.10.8 (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004?api-version=2022-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004?api-version=2023-01-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","name":"cli-test-tsi-eh000004","type":"Microsoft.EventHub/namespaces/eventhubs","location":"westus","properties":{"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2023-01-03T04:33:54.947Z","updatedAt":"2023-01-03T04:33:55.407Z","partitionIds":["0","1","2","3"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","name":"cli-test-tsi-eh000004","type":"Microsoft.EventHub/namespaces/eventhubs","location":"westus","properties":{"retentionDescription":{"cleanupPolicy":"Delete","retentionTimeInHours":168},"messageRetentionInDays":7,"partitionCount":4,"status":"Active","createdAt":"2023-08-01T03:28:14.047Z","updatedAt":"2023-08-01T03:28:14.27Z","partitionIds":["0","1","2","3"]}}' headers: cache-control: - no-cache content-length: - - '477' + - '553' content-type: - application/json; charset=utf-8 date: - - Tue, 03 Jan 2023 04:33:55 GMT + - Tue, 01 Aug 2023 03:28:14 GMT expires: - '-1' pragma: @@ -354,7 +352,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1192' status: code: 200 message: OK @@ -372,15 +370,14 @@ interactions: Content-Length: - '0' ParameterSetName: - - -g --namespace-name -n + - -g --namespace-name --name User-Agent: - - AZURECLI/2.43.0 azsdk-python-azure-mgmt-eventhub/10.1.0 Python/3.10.8 (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2022-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-01-01-preview response: body: - string: '{"primaryConnectionString":"Endpoint=sb://cli-test-tsi-ehns000003.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=mki98IOppW0EgNwj6FQOuOGkpx6kz9xQuZKpUqI9BYM=","secondaryConnectionString":"Endpoint=sb://cli-test-tsi-ehns000003.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=F6fKwemxwGpjfxUhRmJWFfdPG3LcxIGKhRzkxZ6lYds=","primaryKey":"mki98IOppW0EgNwj6FQOuOGkpx6kz9xQuZKpUqI9BYM=","secondaryKey":"F6fKwemxwGpjfxUhRmJWFfdPG3LcxIGKhRzkxZ6lYds=","keyName":"RootManageSharedAccessKey"}' + string: '{"primaryConnectionString":"Endpoint=sb://cli-test-tsi-ehns000003.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=HWms3+JUHOKgE6HH85DHfVleM5KUaGsQW+AEhPvVgH4=","secondaryConnectionString":"Endpoint=sb://cli-test-tsi-ehns000003.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=B0vxBhed7hH3O37SpgFM9JTnvaBpVBKxp+AEhL4C3EM=","primaryKey":"HWms3+JUHOKgE6HH85DHfVleM5KUaGsQW+AEhPvVgH4=","secondaryKey":"B0vxBhed7hH3O37SpgFM9JTnvaBpVBKxp+AEhL4C3EM=","keyName":"RootManageSharedAccessKey"}' headers: cache-control: - no-cache @@ -389,7 +386,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 03 Jan 2023 04:33:56 GMT + - Tue, 01 Aug 2023 03:28:16 GMT expires: - '-1' pragma: @@ -414,7 +411,7 @@ interactions: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004", "serviceBusNamespace": "cli-test-tsi-ehns000003", "eventHubName": "cli-test-tsi-eh000004", "consumerGroupName": "cgn", "keyName": "RootManageSharedAccessKey", "sharedAccessKey": - "mki98IOppW0EgNwj6FQOuOGkpx6kz9xQuZKpUqI9BYM="}}' + "HWms3+JUHOKgE6HH85DHfVleM5KUaGsQW+AEhPvVgH4="}}' headers: Accept: - application/json @@ -432,22 +429,22 @@ interactions: - -g --environment-name --name --location --event-hub-name --service-bus-namespace --key-name --shared-access-key --event-source-resource-id --consumer-group-name User-Agent: - - AZURECLI/2.43.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.10.8 - (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.EventHub","location":"westus","tags":null,"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-01-03T04:33:59.3036232Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.EventHub","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:28:18.7589312Z"},"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-08-01T03:28:19.2968370Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '851' + - '895' content-type: - application/json date: - - Tue, 03 Jan 2023 04:33:59 GMT + - Tue, 01 Aug 2023 03:28:19 GMT expires: - '-1' pragma: @@ -462,8 +459,10 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/16fd216b-2e5e-4b7c-9045-29d4e3166ef2 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1195' status: code: 200 message: OK @@ -481,22 +480,22 @@ interactions: ParameterSetName: - -g --environment-name --name --timestamp-property-name User-Agent: - - AZURECLI/2.43.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.10.8 - (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.EventHub","location":"westus","tags":null,"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-01-03T04:33:59.3036232Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.EventHub","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:28:18.7589312Z"},"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-08-01T03:28:19.2968370Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '851' + - '895' content-type: - application/json date: - - Tue, 03 Jan 2023 04:34:00 GMT + - Tue, 01 Aug 2023 03:28:21 GMT expires: - '-1' pragma: @@ -532,22 +531,22 @@ interactions: ParameterSetName: - -g --environment-name --name --timestamp-property-name User-Agent: - - AZURECLI/2.43.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.10.8 - (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.EventHub","location":"westus","tags":null,"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-01-03T04:33:59.3036232Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"},"timestampPropertyName":"DeviceId1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.EventHub","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:28:18.7589312Z"},"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-08-01T03:28:19.2968370Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"},"timestampPropertyName":"DeviceId1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '887' + - '931' content-type: - application/json date: - - Tue, 03 Jan 2023 04:34:01 GMT + - Tue, 01 Aug 2023 03:28:22 GMT expires: - '-1' pragma: @@ -563,7 +562,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1190' status: code: 200 message: OK @@ -583,15 +582,14 @@ interactions: Content-Type: - application/json ParameterSetName: - - -g --namespace-name -n --key --query --output + - -g --namespace-name --name --key --query --output User-Agent: - - AZURECLI/2.43.0 azsdk-python-azure-mgmt-eventhub/10.1.0 Python/3.10.8 (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/authorizationRules/RootManageSharedAccessKey/regenerateKeys?api-version=2022-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/authorizationRules/RootManageSharedAccessKey/regenerateKeys?api-version=2023-01-01-preview response: body: - string: '{"primaryConnectionString":"Endpoint=sb://cli-test-tsi-ehns000003.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=8fnpnBN3VK2o3fOZub7dkaVL7kTS7X3HDIkHsHyoUg0=","secondaryConnectionString":"Endpoint=sb://cli-test-tsi-ehns000003.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=F6fKwemxwGpjfxUhRmJWFfdPG3LcxIGKhRzkxZ6lYds=","primaryKey":"8fnpnBN3VK2o3fOZub7dkaVL7kTS7X3HDIkHsHyoUg0=","secondaryKey":"F6fKwemxwGpjfxUhRmJWFfdPG3LcxIGKhRzkxZ6lYds=","keyName":"RootManageSharedAccessKey"}' + string: '{"primaryConnectionString":"Endpoint=sb://cli-test-tsi-ehns000003.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=hdb9aH9RUO7QrGgV1gEpl0jdflPBp4NRN+AEhGOPR8c=","secondaryConnectionString":"Endpoint=sb://cli-test-tsi-ehns000003.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=B0vxBhed7hH3O37SpgFM9JTnvaBpVBKxp+AEhL4C3EM=","primaryKey":"hdb9aH9RUO7QrGgV1gEpl0jdflPBp4NRN+AEhGOPR8c=","secondaryKey":"B0vxBhed7hH3O37SpgFM9JTnvaBpVBKxp+AEhL4C3EM=","keyName":"RootManageSharedAccessKey"}' headers: cache-control: - no-cache @@ -600,7 +598,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 03 Jan 2023 04:34:08 GMT + - Tue, 01 Aug 2023 03:28:31 GMT expires: - '-1' pragma: @@ -616,7 +614,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -634,22 +632,22 @@ interactions: ParameterSetName: - -g --environment-name --name --shared-access-key --tags --timestamp-property-name User-Agent: - - AZURECLI/2.43.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.10.8 - (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.EventHub","location":"westus","tags":null,"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-01-03T04:33:59.3036232Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"},"timestampPropertyName":"DeviceId1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.EventHub","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:28:18.7589312Z"},"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-08-01T03:28:19.2968370Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"},"timestampPropertyName":"DeviceId1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '887' + - '931' content-type: - application/json date: - - Tue, 03 Jan 2023 04:34:08 GMT + - Tue, 01 Aug 2023 03:28:32 GMT expires: - '-1' pragma: @@ -673,7 +671,7 @@ interactions: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004", "serviceBusNamespace": "cli-test-tsi-ehns000003", "eventHubName": "cli-test-tsi-eh000004", "consumerGroupName": "cgn", "keyName": "RootManageSharedAccessKey", "sharedAccessKey": - "8fnpnBN3VK2o3fOZub7dkaVL7kTS7X3HDIkHsHyoUg0="}}' + "hdb9aH9RUO7QrGgV1gEpl0jdflPBp4NRN+AEhGOPR8c="}}' headers: Accept: - application/json @@ -690,22 +688,22 @@ interactions: ParameterSetName: - -g --environment-name --name --shared-access-key --tags --timestamp-property-name User-Agent: - - AZURECLI/2.43.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.10.8 - (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.EventHub","location":"westus","tags":{"test":"tag"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-01-03T04:33:59.3036232Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.EventHub","location":"westus","tags":{"test":"tag","CreatedOnDate":"2023-08-01T03:28:33.2867818Z"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-08-01T03:28:19.2968370Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '897' + - '944' content-type: - application/json date: - - Tue, 03 Jan 2023 04:34:10 GMT + - Tue, 01 Aug 2023 03:28:33 GMT expires: - '-1' pragma: @@ -720,6 +718,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/c1bed698-8c39-4365-9b10-7e4bf06f827a x-ms-ratelimit-remaining-subscription-writes: - '1195' status: @@ -739,22 +739,22 @@ interactions: ParameterSetName: - -g --environment-name User-Agent: - - AZURECLI/2.43.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.10.8 - (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventSources?api-version=2020-05-15 response: body: - string: '{"value":[{"kind":"Microsoft.EventHub","location":"westus","tags":{"test":"tag"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-01-03T04:33:59.3036232Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}]}' + string: '{"value":[{"kind":"Microsoft.EventHub","location":"westus","tags":{"test":"tag","CreatedOnDate":"2023-08-01T03:28:33.2867818Z"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-08-01T03:28:19.2968370Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}]}' headers: cache-control: - no-cache content-length: - - '909' + - '956' content-type: - application/json date: - - Tue, 03 Jan 2023 04:34:11 GMT + - Tue, 01 Aug 2023 03:28:35 GMT expires: - '-1' pragma: @@ -786,22 +786,22 @@ interactions: ParameterSetName: - -g --environment-name -n User-Agent: - - AZURECLI/2.43.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.10.8 - (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.EventHub","location":"westus","tags":{"test":"tag"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-01-03T04:33:59.3036232Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.EventHub","location":"westus","tags":{"test":"tag","CreatedOnDate":"2023-08-01T03:28:33.2867818Z"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.EventHub/namespaces/cli-test-tsi-ehns000003/eventhubs/cli-test-tsi-eh000004","serviceBusNamespace":"cli-test-tsi-ehns000003","eventHubName":"cli-test-tsi-eh000004","consumerGroupName":"cgn","keyName":"RootManageSharedAccessKey","creationTime":"2023-08-01T03:28:19.2968370Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '897' + - '944' content-type: - application/json date: - - Tue, 03 Jan 2023 04:34:11 GMT + - Tue, 01 Aug 2023 03:28:37 GMT expires: - '-1' pragma: @@ -835,8 +835,8 @@ interactions: ParameterSetName: - -g --environment-name -n --yes User-Agent: - - AZURECLI/2.43.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.10.8 - (Linux-5.15.0-1023-azure-x86_64-with-glibc2.31) VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000005/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: @@ -848,7 +848,7 @@ interactions: content-length: - '0' date: - - Tue, 03 Jan 2023 04:34:17 GMT + - Tue, 01 Aug 2023 03:28:42 GMT expires: - '-1' pragma: @@ -860,7 +860,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14996' status: code: 200 message: OK diff --git a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_event_source_iothub.yaml b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_event_source_iothub.yaml index c2bb7d7a5c4..37a4a236538 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_event_source_iothub.yaml +++ b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_event_source_iothub.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"location": "westus", "kind": "Gen1", "sku": {"name": "S1", "capacity": - 1}, "properties": {"dataRetentionTime": "P31D", "storageLimitExceededBehavior": - "PauseIngress", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}]}}' + body: '{"kind": "Gen1", "location": "westus", "sku": {"capacity": 1, "name": "S1"}, + "properties": {"dataRetentionTime": "P31D", "partitionKeyProperties": [{"name": + "DeviceId1", "type": "String"}], "storageLimitExceededBehavior": "PauseIngress"}}' headers: Accept: - application/json @@ -20,22 +20,21 @@ interactions: - --resource-group --location --name --sku --data-retention-time --partition-key-properties --storage-limit-exceeded-behavior User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:51:32.5854423+00:00","provisioningState":"Accepted","dataAccessId":"d5b21d91-3e1c-445a-84eb-b318c9314226","dataAccessFqdn":"d5b21d91-3e1c-445a-84eb-b318c9314226.env.timeseries.azure.com","requestApiVersion":"2020-05-15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004","name":"cli-test-tsi-env000004","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:19.2920826Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:20.1199021Z","provisioningState":"Succeeded","dataAccessId":"02a9b3d7-8e9e-4ca1-b6de-6d99c6a76148","dataAccessFqdn":"02a9b3d7-8e9e-4ca1-b6de-6d99c6a76148.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004","name":"cli-test-tsi-env000004","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '794' + - '737' content-type: - application/json date: - - Wed, 27 Jan 2021 05:51:33 GMT + - Tue, 01 Aug 2023 03:27:20 GMT expires: - '-1' pragma: @@ -46,107 +45,13 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/5e2013c4-d947-4da8-aae0-590acb4a3bbd x-ms-ratelimit-remaining-subscription-writes: - '1194' status: code: 201 message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - tsi environment gen1 create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --location --name --sku --data-retention-time --partition-key-properties - --storage-limit-exceeded-behavior - User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004?api-version=2020-05-15 - response: - body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:51:32.5854423Z","provisioningState":"Creating","requestApiVersion":"2020-05-15","dataAccessId":"d5b21d91-3e1c-445a-84eb-b318c9314226","dataAccessFqdn":"d5b21d91-3e1c-445a-84eb-b318c9314226.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004","name":"cli-test-tsi-env000004","type":"Microsoft.TimeSeriesInsights/Environments"}' - headers: - cache-control: - - no-cache - content-length: - - '789' - content-type: - - application/json - date: - - Wed, 27 Jan 2021 05:52:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - tsi environment gen1 create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --location --name --sku --data-retention-time --partition-key-properties - --storage-limit-exceeded-behavior - User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004?api-version=2020-05-15 - response: - body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:51:32.5854423Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"d5b21d91-3e1c-445a-84eb-b318c9314226","dataAccessFqdn":"d5b21d91-3e1c-445a-84eb-b318c9314226.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004","name":"cli-test-tsi-env000004","type":"Microsoft.TimeSeriesInsights/Environments"}' - headers: - cache-control: - - no-cache - content-length: - - '790' - content-type: - - application/json - date: - - Wed, 27 Jan 2021 05:52:34 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK - request: body: null headers: @@ -161,24 +66,22 @@ interactions: ParameterSetName: - -g -n User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.18.0 - accept-language: - - en-US + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitsi.rg000001?api-version=2020-10-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitsi.rg000001?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001","name":"clitsi.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-01-27T05:51:13Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001","name":"clitsi.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_timeseriesinsights_event_source_iothub","date":"2023-08-01T03:27:16Z","module":"timeseriesinsights","CreatedOnDate":"2023-08-01T03:27:17.2553450Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '438' content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:52:36 GMT + - Tue, 01 Aug 2023 03:27:22 GMT expires: - '-1' pragma: @@ -196,10 +99,11 @@ interactions: body: '{"location": "westus", "properties": {"eventHubEndpoints": {"events": {"retentionTimeInDays": 1, "partitionCount": 4}}, "storageEndpoints": {"$default": {"sasTtlAsIso8601": "PT1H", "connectionString": "", "containerName": ""}}, "messagingEndpoints": - {"fileNotifications": {"ttlAsIso8601": "PT1H", "maxDeliveryCount": 10}}, "enableFileUploadNotifications": - false, "cloudToDevice": {"maxDeliveryCount": 10, "defaultTtlAsIso8601": "PT1H", - "feedback": {"lockDurationAsIso8601": "PT5S", "ttlAsIso8601": "PT1H", "maxDeliveryCount": - 10}}}, "sku": {"name": "S1", "capacity": 1}}' + {"fileNotifications": {"lockDurationAsIso8601": "PT5S", "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10}}, "enableFileUploadNotifications": false, "cloudToDevice": + {"maxDeliveryCount": 10, "defaultTtlAsIso8601": "PT1H", "feedback": {"lockDurationAsIso8601": + "PT5S", "ttlAsIso8601": "PT1H", "maxDeliveryCount": 10}}}, "sku": {"name": "S1", + "capacity": 1}}' headers: Accept: - application/json @@ -210,32 +114,29 @@ interactions: Connection: - keep-alive Content-Length: - - '570' + - '603' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g -n User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 - accept-language: - - en-US + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2022-04-30-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"clitsi.rg000001","properties":{"state":"Activating","provisioningState":"Accepted","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4},"operationsMonitoringEvents":{"retentionTimeInDays":1,"partitionCount":4}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":1}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:24.3439861Z"},"subscriptionid":"7c943c1b-5122-4097-90c8-861411bdd574","resourcegroup":"clitsi.rg000001","properties":{"provisioningState":"Accepted","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None","allowedFqdnList":[]},"sku":{"name":"S1","tier":"Standard","capacity":1}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGVkNmQxZTctZWVhNy00YjAyLWE0NjUtYThkMDc3ZTRiYWY5?api-version=2020-03-01&operationSource=os_ih&asyncinfo + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/locations/westus/operationResults/aWQ9b3NfaWhfNmY3OTU3ODItYzQ3ZC00MDAwLTk2MDgtZmYyZGY4MjUwODEwO3JlZ2lvbj13ZXN0dXM=?api-version=2022-04-30-preview&operationSource=other&asyncinfo cache-control: - no-cache content-length: - - '1162' + - '1016' content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:52:44 GMT + - Tue, 01 Aug 2023 03:27:27 GMT expires: - '-1' pragma: @@ -246,6 +147,8 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/8e800eaf-be90-4140-9c53-ae181aa09533 x-ms-ratelimit-remaining-subscription-resource-requests: - '4999' status: @@ -255,7 +158,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -265,10 +168,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGVkNmQxZTctZWVhNy00YjAyLWE0NjUtYThkMDc3ZTRiYWY5?api-version=2020-03-01&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/locations/westus/operationResults/aWQ9b3NfaWhfNmY3OTU3ODItYzQ3ZC00MDAwLTk2MDgtZmYyZGY4MjUwODEwO3JlZ2lvbj13ZXN0dXM=?api-version=2022-04-30-preview&operationSource=other&asyncinfo response: body: string: '{"status":"Running"}' @@ -280,7 +182,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:53:15 GMT + - Tue, 01 Aug 2023 03:27:28 GMT expires: - '-1' pragma: @@ -302,7 +204,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -312,10 +214,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGVkNmQxZTctZWVhNy00YjAyLWE0NjUtYThkMDc3ZTRiYWY5?api-version=2020-03-01&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/locations/westus/operationResults/aWQ9b3NfaWhfNmY3OTU3ODItYzQ3ZC00MDAwLTk2MDgtZmYyZGY4MjUwODEwO3JlZ2lvbj13ZXN0dXM=?api-version=2022-04-30-preview&operationSource=other&asyncinfo response: body: string: '{"status":"Running"}' @@ -327,7 +228,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:53:45 GMT + - Tue, 01 Aug 2023 03:27:59 GMT expires: - '-1' pragma: @@ -349,7 +250,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -359,10 +260,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGVkNmQxZTctZWVhNy00YjAyLWE0NjUtYThkMDc3ZTRiYWY5?api-version=2020-03-01&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/locations/westus/operationResults/aWQ9b3NfaWhfNmY3OTU3ODItYzQ3ZC00MDAwLTk2MDgtZmYyZGY4MjUwODEwO3JlZ2lvbj13ZXN0dXM=?api-version=2022-04-30-preview&operationSource=other&asyncinfo response: body: string: '{"status":"Running"}' @@ -374,7 +274,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:54:17 GMT + - Tue, 01 Aug 2023 03:28:29 GMT expires: - '-1' pragma: @@ -396,7 +296,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -406,10 +306,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGVkNmQxZTctZWVhNy00YjAyLWE0NjUtYThkMDc3ZTRiYWY5?api-version=2020-03-01&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/locations/westus/operationResults/aWQ9b3NfaWhfNmY3OTU3ODItYzQ3ZC00MDAwLTk2MDgtZmYyZGY4MjUwODEwO3JlZ2lvbj13ZXN0dXM=?api-version=2022-04-30-preview&operationSource=other&asyncinfo response: body: string: '{"status":"Running"}' @@ -421,7 +320,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:54:47 GMT + - Tue, 01 Aug 2023 03:28:59 GMT expires: - '-1' pragma: @@ -443,7 +342,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -453,10 +352,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGVkNmQxZTctZWVhNy00YjAyLWE0NjUtYThkMDc3ZTRiYWY5?api-version=2020-03-01&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/locations/westus/operationResults/aWQ9b3NfaWhfNmY3OTU3ODItYzQ3ZC00MDAwLTk2MDgtZmYyZGY4MjUwODEwO3JlZ2lvbj13ZXN0dXM=?api-version=2022-04-30-preview&operationSource=other&asyncinfo response: body: string: '{"status":"Succeeded"}' @@ -468,7 +366,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:55:18 GMT + - Tue, 01 Aug 2023 03:29:30 GMT expires: - '-1' pragma: @@ -490,7 +388,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -500,23 +398,22 @@ interactions: ParameterSetName: - -g -n User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2022-04-30-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"clitsi.rg000001","etag":"AAAACNt4bz8=","properties":{"locations":[{"location":"West - US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"cli-test-tsi-iothub000003.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"cli-test-tsi-iothub000003","endpoint":"sb://iothub-ns-cli-test-t-7652510-139f5cce7f.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":1},"identity":{"type":"None"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:24.3439861Z"},"subscriptionid":"7c943c1b-5122-4097-90c8-861411bdd574","resourcegroup":"clitsi.rg000001","etag":"AAAADH6/WC0=","properties":{"locations":[{"location":"West + US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"cli-test-tsi-iothub000003.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"cli-test-tsi-iothub000003","endpoint":"sb://iothub-ns-cli-test-t-25173957-b1e30a46a8.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[],"cosmosDBSqlCollections":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None","allowedFqdnList":[]},"sku":{"name":"S1","tier":"Standard","capacity":1},"identity":{"type":"None"},"systemData":{"createdAt":"2023-08-01T03:27:27.5133333Z"}}' headers: cache-control: - no-cache content-length: - - '1700' + - '1738' content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:55:18 GMT + - Tue, 01 Aug 2023 03:29:31 GMT expires: - '-1' pragma: @@ -550,16 +447,13 @@ interactions: ParameterSetName: - -g --hub-name --query --output User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 - accept-language: - - en-US + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003/listkeys?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003/listkeys?api-version=2022-04-30-preview response: body: - string: '{"value":[{"keyName":"iothubowner","primaryKey":"YJjD4vGgflnT+CTilmQpYGVW+jZ+1KLNEVoxQaD7B8E=","secondaryKey":"p9x84klIfLgVFaP7HdV/YpMBrOirQTrGwlGjoZXZonM=","rights":"RegistryWrite, - ServiceConnect, DeviceConnect"},{"keyName":"service","primaryKey":"4aZ8gDU+3nCxByJhoNLqI9L4B4+bDptyLzM2ORz2nxc=","secondaryKey":"ZWtP9hh5on/5I81HjkUPbJDikr2w6BUjlO4ekv6vSO4=","rights":"ServiceConnect"},{"keyName":"device","primaryKey":"qvFqV0l3jQ9FXRC/Y+4axC7Nrd/WfmWTMYuxYBRQSdM=","secondaryKey":"vAQD9OB3ETLBztH4I6bSe1FJHnMM8Ja7CxCrQ4qP/Fk=","rights":"DeviceConnect"},{"keyName":"registryRead","primaryKey":"BnNBcVKx5kfMwMcYU/NPuUOkos59VOtuQrFbCZuq3ak=","secondaryKey":"5/gzWXneLPfQzXRstN1MTcccpRR8wXOr2S37XckjUqc=","rights":"RegistryRead"},{"keyName":"registryReadWrite","primaryKey":"ivtsDfGb9k0LU9mnuChY0WZmwYwlwuha3xw4PVu3KXg=","secondaryKey":"6zK4rS/cPZyuq8k9q+G32x213XyQe0b/VNYOWbQSitk=","rights":"RegistryWrite"}]}' + string: '{"value":[{"keyName":"iothubowner","primaryKey":"4uiV7nJqiiSmWi6eCZuwSv1RYLxaQ2LR7tWVoLSy9Ao=","secondaryKey":"JNJo6oKBxCO0HYXmUGsGcPQvproxiD/ykAScwiMU19I=","rights":"RegistryWrite, + ServiceConnect, DeviceConnect"},{"keyName":"service","primaryKey":"+xKGI3bsyd/MsO9VErN8NCKGcQEtfNyJtHVyECYooWc=","secondaryKey":"9VR3sSuqijKoFVgXsSJxX8JwN2lJfNnrh+5NS+qm3n8=","rights":"ServiceConnect"},{"keyName":"device","primaryKey":"cbRgQ6JOhRL/sXG3A8J0aEbOmWYQKP2uQcmfc0DU8o4=","secondaryKey":"4edt7xpTDhZqcIdUUAsWBjcDFhjDnJL1u6cVloDwuDE=","rights":"DeviceConnect"},{"keyName":"registryRead","primaryKey":"2LkTeGo/h0Zs8uaDDLDgaC16Pth45uJG2zFk6gPc1q8=","secondaryKey":"xLmnjPRfCfloUosoen0IC0+VGeS7Q9P/WSnpZjbkayo=","rights":"RegistryRead"},{"keyName":"registryReadWrite","primaryKey":"O8EBkbb82/PF7iOpjGLJTMcMcWdRghQuLUMHNiJYCk8=","secondaryKey":"+TP0lOeSPhaPm8IFILnoN68/S0ASgfGOEQd5OOPgfM0=","rights":"RegistryWrite"}]}' headers: cache-control: - no-cache @@ -568,7 +462,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:55:20 GMT + - Tue, 01 Aug 2023 03:29:34 GMT expires: - '-1' pragma: @@ -592,7 +486,7 @@ interactions: body: '{"location": "westus", "kind": "Microsoft.IoTHub", "properties": {"eventSourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003", "iotHubName": "cli-test-tsi-iothub000003", "consumerGroupName": "cgn", "keyName": - "iothubowner", "sharedAccessKey": "YJjD4vGgflnT+CTilmQpYGVW+jZ+1KLNEVoxQaD7B8E="}}' + "iothubowner", "sharedAccessKey": "4uiV7nJqiiSmWi6eCZuwSv1RYLxaQ2LR7tWVoLSy9Ao="}}' headers: Accept: - application/json @@ -603,29 +497,29 @@ interactions: Connection: - keep-alive Content-Length: - - '461' + - '403' Content-Type: - application/json ParameterSetName: - -g --environment-name --name --location --consumer-group-name --iot-hub-name --key-name --shared-access-key --event-source-resource-id User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":null,"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2021-01-27T05:55:27.0403868Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:29:36.0984782Z"},"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2023-08-01T03:29:37.0619792Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '835' + - '799' content-type: - application/json date: - - Wed, 27 Jan 2021 05:55:28 GMT + - Tue, 01 Aug 2023 03:29:37 GMT expires: - '-1' pragma: @@ -640,8 +534,10 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/5328e80e-f945-495b-8511-7cca9498f234 x-ms-ratelimit-remaining-subscription-writes: - - '1193' + - '1194' status: code: 200 message: OK @@ -659,22 +555,22 @@ interactions: ParameterSetName: - -g --environment-name --name --timestamp-property-name User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":null,"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2021-01-27T05:55:27.0403868Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:29:36.0984782Z"},"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2023-08-01T03:29:37.0619792Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '835' + - '799' content-type: - application/json date: - - Wed, 27 Jan 2021 05:55:30 GMT + - Tue, 01 Aug 2023 03:29:39 GMT expires: - '-1' pragma: @@ -710,22 +606,22 @@ interactions: ParameterSetName: - -g --environment-name --name --timestamp-property-name User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":null,"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2021-01-27T05:55:27.0403868Z","provisioningState":"Succeeded","timestampPropertyName":"timestampProp"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:29:36.0984782Z"},"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2023-08-01T03:29:37.0619792Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"},"timestampPropertyName":"timestampProp"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '875' + - '839' content-type: - application/json date: - - Wed, 27 Jan 2021 05:55:31 GMT + - Tue, 01 Aug 2023 03:29:39 GMT expires: - '-1' pragma: @@ -741,7 +637,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1191' status: code: 200 message: OK @@ -759,12 +655,10 @@ interactions: ParameterSetName: - -g --hub-name -n --renew-key --query --output User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.18.0 - accept-language: - - en-US + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: HEAD - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitsi.rg000001?api-version=2020-10-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitsi.rg000001?api-version=2022-09-01 response: body: string: '' @@ -774,7 +668,7 @@ interactions: content-length: - '0' date: - - Wed, 27 Jan 2021 05:55:31 GMT + - Tue, 01 Aug 2023 03:29:42 GMT expires: - '-1' pragma: @@ -798,18 +692,15 @@ interactions: Connection: - keep-alive Content-Length: - - '36' + - '37' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g --hub-name -n --renew-key --query --output User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 - accept-language: - - en-US + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/checkNameAvailability?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/checkNameAvailability?api-version=2022-04-30-preview response: body: string: '{"nameAvailable":false,"reason":"AlreadyExists","message":"IotHub name @@ -818,11 +709,11 @@ interactions: cache-control: - no-cache content-length: - - '116' + - '117' content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:55:33 GMT + - Tue, 01 Aug 2023 03:29:43 GMT expires: - '-1' pragma: @@ -856,25 +747,22 @@ interactions: ParameterSetName: - -g --hub-name -n --renew-key --query --output User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 - accept-language: - - en-US + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2022-04-30-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"clitsi.rg000001","etag":"AAAACNt4bz8=","properties":{"locations":[{"location":"West - US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"cli-test-tsi-iothub000003.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"cli-test-tsi-iothub000003","endpoint":"sb://iothub-ns-cli-test-t-7652510-139f5cce7f.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":1},"identity":{"type":"None"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:24.3439861Z"},"subscriptionid":"7c943c1b-5122-4097-90c8-861411bdd574","resourcegroup":"clitsi.rg000001","etag":"AAAADH6/WC0=","properties":{"locations":[{"location":"West + US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"cli-test-tsi-iothub000003.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"cli-test-tsi-iothub000003","endpoint":"sb://iothub-ns-cli-test-t-25173957-b1e30a46a8.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[],"cosmosDBSqlCollections":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None","allowedFqdnList":[]},"sku":{"name":"S1","tier":"Standard","capacity":1},"identity":{"type":"None"},"systemData":{"createdAt":"2023-08-01T03:27:27.5133333Z"}}' headers: cache-control: - no-cache content-length: - - '1700' + - '1738' content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:55:33 GMT + - Tue, 01 Aug 2023 03:29:44 GMT expires: - '-1' pragma: @@ -908,16 +796,13 @@ interactions: ParameterSetName: - -g --hub-name -n --renew-key --query --output User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 - accept-language: - - en-US + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003/listkeys?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003/listkeys?api-version=2022-04-30-preview response: body: - string: '{"value":[{"keyName":"iothubowner","primaryKey":"YJjD4vGgflnT+CTilmQpYGVW+jZ+1KLNEVoxQaD7B8E=","secondaryKey":"p9x84klIfLgVFaP7HdV/YpMBrOirQTrGwlGjoZXZonM=","rights":"RegistryWrite, - ServiceConnect, DeviceConnect"},{"keyName":"service","primaryKey":"4aZ8gDU+3nCxByJhoNLqI9L4B4+bDptyLzM2ORz2nxc=","secondaryKey":"ZWtP9hh5on/5I81HjkUPbJDikr2w6BUjlO4ekv6vSO4=","rights":"ServiceConnect"},{"keyName":"device","primaryKey":"qvFqV0l3jQ9FXRC/Y+4axC7Nrd/WfmWTMYuxYBRQSdM=","secondaryKey":"vAQD9OB3ETLBztH4I6bSe1FJHnMM8Ja7CxCrQ4qP/Fk=","rights":"DeviceConnect"},{"keyName":"registryRead","primaryKey":"BnNBcVKx5kfMwMcYU/NPuUOkos59VOtuQrFbCZuq3ak=","secondaryKey":"5/gzWXneLPfQzXRstN1MTcccpRR8wXOr2S37XckjUqc=","rights":"RegistryRead"},{"keyName":"registryReadWrite","primaryKey":"ivtsDfGb9k0LU9mnuChY0WZmwYwlwuha3xw4PVu3KXg=","secondaryKey":"6zK4rS/cPZyuq8k9q+G32x213XyQe0b/VNYOWbQSitk=","rights":"RegistryWrite"}]}' + string: '{"value":[{"keyName":"iothubowner","primaryKey":"4uiV7nJqiiSmWi6eCZuwSv1RYLxaQ2LR7tWVoLSy9Ao=","secondaryKey":"JNJo6oKBxCO0HYXmUGsGcPQvproxiD/ykAScwiMU19I=","rights":"RegistryWrite, + ServiceConnect, DeviceConnect"},{"keyName":"service","primaryKey":"+xKGI3bsyd/MsO9VErN8NCKGcQEtfNyJtHVyECYooWc=","secondaryKey":"9VR3sSuqijKoFVgXsSJxX8JwN2lJfNnrh+5NS+qm3n8=","rights":"ServiceConnect"},{"keyName":"device","primaryKey":"cbRgQ6JOhRL/sXG3A8J0aEbOmWYQKP2uQcmfc0DU8o4=","secondaryKey":"4edt7xpTDhZqcIdUUAsWBjcDFhjDnJL1u6cVloDwuDE=","rights":"DeviceConnect"},{"keyName":"registryRead","primaryKey":"2LkTeGo/h0Zs8uaDDLDgaC16Pth45uJG2zFk6gPc1q8=","secondaryKey":"xLmnjPRfCfloUosoen0IC0+VGeS7Q9P/WSnpZjbkayo=","rights":"RegistryRead"},{"keyName":"registryReadWrite","primaryKey":"O8EBkbb82/PF7iOpjGLJTMcMcWdRghQuLUMHNiJYCk8=","secondaryKey":"+TP0lOeSPhaPm8IFILnoN68/S0ASgfGOEQd5OOPgfM0=","rights":"RegistryWrite"}]}' headers: cache-control: - no-cache @@ -926,7 +811,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:55:34 GMT + - Tue, 01 Aug 2023 03:29:44 GMT expires: - '-1' pragma: @@ -947,28 +832,31 @@ interactions: code: 200 message: OK - request: - body: '{"location": "westus", "tags": {}, "etag": "AAAACNt4bz8=", "properties": - {"authorizationPolicies": [{"keyName": "service", "primaryKey": "4aZ8gDU+3nCxByJhoNLqI9L4B4+bDptyLzM2ORz2nxc=", - "secondaryKey": "ZWtP9hh5on/5I81HjkUPbJDikr2w6BUjlO4ekv6vSO4=", "rights": "ServiceConnect"}, - {"keyName": "device", "primaryKey": "qvFqV0l3jQ9FXRC/Y+4axC7Nrd/WfmWTMYuxYBRQSdM=", - "secondaryKey": "vAQD9OB3ETLBztH4I6bSe1FJHnMM8Ja7CxCrQ4qP/Fk=", "rights": "DeviceConnect"}, - {"keyName": "registryRead", "primaryKey": "BnNBcVKx5kfMwMcYU/NPuUOkos59VOtuQrFbCZuq3ak=", - "secondaryKey": "5/gzWXneLPfQzXRstN1MTcccpRR8wXOr2S37XckjUqc=", "rights": "RegistryRead"}, - {"keyName": "registryReadWrite", "primaryKey": "ivtsDfGb9k0LU9mnuChY0WZmwYwlwuha3xw4PVu3KXg=", - "secondaryKey": "6zK4rS/cPZyuq8k9q+G32x213XyQe0b/VNYOWbQSitk=", "rights": "RegistryWrite"}, - {"keyName": "iothubowner", "primaryKey": "cogK6BYpC2mhJW6wrpJdwKD/HwIDvnEMCi9hOFUQDqk=", - "secondaryKey": "p9x84klIfLgVFaP7HdV/YpMBrOirQTrGwlGjoZXZonM=", "rights": "RegistryWrite, - ServiceConnect, DeviceConnect"}], "ipFilterRules": [], "eventHubEndpoints": - {"events": {"retentionTimeInDays": 1, "partitionCount": 4}}, "routing": {"endpoints": - {"serviceBusQueues": [], "serviceBusTopics": [], "eventHubs": [], "storageContainers": - []}, "routes": [], "fallbackRoute": {"name": "$fallback", "source": "DeviceMessages", - "condition": "true", "endpointNames": ["events"], "isEnabled": true}}, "storageEndpoints": + body: '{"location": "westus", "tags": {"CreatedOnDate": "2023-08-01T03:27:24.3439861Z"}, + "etag": "AAAADH6/WC0=", "properties": {"authorizationPolicies": [{"keyName": + "service", "primaryKey": "+xKGI3bsyd/MsO9VErN8NCKGcQEtfNyJtHVyECYooWc=", "secondaryKey": + "9VR3sSuqijKoFVgXsSJxX8JwN2lJfNnrh+5NS+qm3n8=", "rights": "ServiceConnect"}, + {"keyName": "device", "primaryKey": "cbRgQ6JOhRL/sXG3A8J0aEbOmWYQKP2uQcmfc0DU8o4=", + "secondaryKey": "4edt7xpTDhZqcIdUUAsWBjcDFhjDnJL1u6cVloDwuDE=", "rights": "DeviceConnect"}, + {"keyName": "registryRead", "primaryKey": "2LkTeGo/h0Zs8uaDDLDgaC16Pth45uJG2zFk6gPc1q8=", + "secondaryKey": "xLmnjPRfCfloUosoen0IC0+VGeS7Q9P/WSnpZjbkayo=", "rights": "RegistryRead"}, + {"keyName": "registryReadWrite", "primaryKey": "O8EBkbb82/PF7iOpjGLJTMcMcWdRghQuLUMHNiJYCk8=", + "secondaryKey": "+TP0lOeSPhaPm8IFILnoN68/S0ASgfGOEQd5OOPgfM0=", "rights": "RegistryWrite"}, + {"keyName": "iothubowner", "primaryKey": "1wa3RX5folAlOEzVlHu4/lqCR79NF+9JV400RgroEdQ=", + "secondaryKey": "JNJo6oKBxCO0HYXmUGsGcPQvproxiD/ykAScwiMU19I=", "rights": "RegistryWrite, + ServiceConnect, DeviceConnect"}], "allowedFqdnList": [], "ipFilterRules": [], + "eventHubEndpoints": {"events": {"retentionTimeInDays": 1, "partitionCount": + 4}}, "routing": {"endpoints": {"serviceBusQueues": [], "serviceBusTopics": [], + "eventHubs": [], "storageContainers": [], "cosmosDBSqlCollections": []}, "routes": + [], "fallbackRoute": {"name": "$fallback", "source": "DeviceMessages", "condition": + "true", "endpointNames": ["events"], "isEnabled": true}}, "storageEndpoints": {"$default": {"sasTtlAsIso8601": "PT1H", "connectionString": "", "containerName": ""}}, "messagingEndpoints": {"fileNotifications": {"lockDurationAsIso8601": - "PT1M", "ttlAsIso8601": "PT1H", "maxDeliveryCount": 10}}, "enableFileUploadNotifications": + "PT5S", "ttlAsIso8601": "PT1H", "maxDeliveryCount": 10}}, "enableFileUploadNotifications": false, "cloudToDevice": {"maxDeliveryCount": 10, "defaultTtlAsIso8601": "PT1H", "feedback": {"lockDurationAsIso8601": "PT5S", "ttlAsIso8601": "PT1H", "maxDeliveryCount": - 10}}, "features": "None"}, "sku": {"name": "S1", "capacity": 1}}' + 10}}, "features": "None"}, "sku": {"name": "S1", "capacity": 1}, "identity": + {"type": "None"}}' headers: Accept: - application/json @@ -979,39 +867,36 @@ interactions: Connection: - keep-alive Content-Length: - - '1910' + - '2040' Content-Type: - - application/json; charset=utf-8 + - application/json If-Match: - - '{''IF-MATCH'': ''AAAACNt4bz8=''}' + - '{''IF-MATCH'': ''AAAADH6/WC0=''}' ParameterSetName: - -g --hub-name -n --renew-key --query --output User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 - accept-language: - - en-US + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2022-04-30-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"clitsi.rg000001","etag":"AAAACNt4bz8=","properties":{"operationsMonitoringProperties":{"events":{"None":"None","Connections":"None","DeviceTelemetry":"None","C2DCommands":"None","DeviceIdentityOperations":"None","FileUploadOperations":"None","Routes":"None"}},"provisioningState":"Accepted","authorizationPolicies":[{"keyName":"service","primaryKey":"4aZ8gDU+3nCxByJhoNLqI9L4B4+bDptyLzM2ORz2nxc=","secondaryKey":"ZWtP9hh5on/5I81HjkUPbJDikr2w6BUjlO4ekv6vSO4=","rights":"ServiceConnect"},{"keyName":"device","primaryKey":"qvFqV0l3jQ9FXRC/Y+4axC7Nrd/WfmWTMYuxYBRQSdM=","secondaryKey":"vAQD9OB3ETLBztH4I6bSe1FJHnMM8Ja7CxCrQ4qP/Fk=","rights":"DeviceConnect"},{"keyName":"registryRead","primaryKey":"BnNBcVKx5kfMwMcYU/NPuUOkos59VOtuQrFbCZuq3ak=","secondaryKey":"5/gzWXneLPfQzXRstN1MTcccpRR8wXOr2S37XckjUqc=","rights":"RegistryRead"},{"keyName":"registryReadWrite","primaryKey":"ivtsDfGb9k0LU9mnuChY0WZmwYwlwuha3xw4PVu3KXg=","secondaryKey":"6zK4rS/cPZyuq8k9q+G32x213XyQe0b/VNYOWbQSitk=","rights":"RegistryWrite"},{"keyName":"iothubowner","primaryKey":"cogK6BYpC2mhJW6wrpJdwKD/HwIDvnEMCi9hOFUQDqk=","secondaryKey":"p9x84klIfLgVFaP7HdV/YpMBrOirQTrGwlGjoZXZonM=","rights":"RegistryWrite, - ServiceConnect, DeviceConnect"}],"ipFilterRules":[],"eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4},"operationsMonitoringEvents":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"cli-test-tsi-iothub000003-operationmonitoring","endpoint":"sb://iothub-ns-cli-test-t-7652510-139f5cce7f.servicebus.windows.net/","internalAuthorizationPolicies":[{"ClaimType":"SharedAccessKey","ClaimValue":"None","KeyName":"scaleunitsend-4b608f2f-2a94-4c23-ae4a-00c1a8aba9b6-iothub","PrimaryKey":"3AMEV85FNoa7R0JFfNVS+39QIHKKsqQr6pgOdAoUkJ4=","SecondaryKey":"QXwGQuebkOXfz78fk+iMxfBfTeta5n7x8sxeGT2yWRA=","Rights":["Send"],"CreatedTime":"Wed, - 27 Jan 2021 05:54:23 GMT","ModifiedTime":"Wed, 27 Jan 2021 05:54:23 GMT"},{"ClaimType":"SharedAccessKey","ClaimValue":"None","KeyName":"owner-a4fdcdcc-2a65-47c5-b62f-deed909dabbd-iothub","PrimaryKey":"hO5JeacYmnC0T9rKvPzgc4aOpkpCt8D697h8CarxIAU=","SecondaryKey":"q87/aZ2TtC3oL2e02IXGA/GgvhMcVqDYk8A0PePzqi0=","Rights":["Listen","Manage","Send"],"CreatedTime":"Wed, - 27 Jan 2021 05:54:23 GMT","ModifiedTime":"Wed, 27 Jan 2021 05:54:23 GMT"}],"authorizationPolicies":[{"ClaimType":"SharedAccessKey","ClaimValue":"None","KeyName":"iothubowner","PrimaryKey":"YJjD4vGgflnT+CTilmQpYGVW+jZ+1KLNEVoxQaD7B8E=","SecondaryKey":"p9x84klIfLgVFaP7HdV/YpMBrOirQTrGwlGjoZXZonM=","Rights":["Listen"],"CreatedTime":"Wed, - 27 Jan 2021 05:54:23 GMT","ModifiedTime":"Wed, 27 Jan 2021 05:54:23 GMT"},{"ClaimType":"SharedAccessKey","ClaimValue":"None","KeyName":"service","PrimaryKey":"4aZ8gDU+3nCxByJhoNLqI9L4B4+bDptyLzM2ORz2nxc=","SecondaryKey":"ZWtP9hh5on/5I81HjkUPbJDikr2w6BUjlO4ekv6vSO4=","Rights":["Listen"],"CreatedTime":"Wed, - 27 Jan 2021 05:54:23 GMT","ModifiedTime":"Wed, 27 Jan 2021 05:54:23 GMT"}]}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[],"cosmosDBSqlCollections":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":1}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:24.3439861Z"},"subscriptionid":"7c943c1b-5122-4097-90c8-861411bdd574","resourcegroup":"clitsi.rg000001","etag":"AAAADH6/WC0=","properties":{"operationsMonitoringProperties":{"events":{"None":"None","Connections":"None","DeviceTelemetry":"None","C2DCommands":"None","DeviceIdentityOperations":"None","FileUploadOperations":"None","Routes":"None"}},"provisioningState":"Accepted","authorizationPolicies":[{"keyName":"service","primaryKey":"+xKGI3bsyd/MsO9VErN8NCKGcQEtfNyJtHVyECYooWc=","secondaryKey":"9VR3sSuqijKoFVgXsSJxX8JwN2lJfNnrh+5NS+qm3n8=","rights":"ServiceConnect"},{"keyName":"device","primaryKey":"cbRgQ6JOhRL/sXG3A8J0aEbOmWYQKP2uQcmfc0DU8o4=","secondaryKey":"4edt7xpTDhZqcIdUUAsWBjcDFhjDnJL1u6cVloDwuDE=","rights":"DeviceConnect"},{"keyName":"registryRead","primaryKey":"2LkTeGo/h0Zs8uaDDLDgaC16Pth45uJG2zFk6gPc1q8=","secondaryKey":"xLmnjPRfCfloUosoen0IC0+VGeS7Q9P/WSnpZjbkayo=","rights":"RegistryRead"},{"keyName":"registryReadWrite","primaryKey":"O8EBkbb82/PF7iOpjGLJTMcMcWdRghQuLUMHNiJYCk8=","secondaryKey":"+TP0lOeSPhaPm8IFILnoN68/S0ASgfGOEQd5OOPgfM0=","rights":"RegistryWrite"},{"keyName":"iothubowner","primaryKey":"1wa3RX5folAlOEzVlHu4/lqCR79NF+9JV400RgroEdQ=","secondaryKey":"JNJo6oKBxCO0HYXmUGsGcPQvproxiD/ykAScwiMU19I=","rights":"RegistryWrite, + ServiceConnect, DeviceConnect"}],"ipFilterRules":[],"eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4},"operationsMonitoringEvents":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"cli-test-tsi-iothub000003-operationmonitoring","endpoint":"sb://iothub-ns-cli-test-t-25173957-b1e30a46a8.servicebus.windows.net/","internalAuthorizationPolicies":[{"ClaimType":"SharedAccessKey","ClaimValue":"None","KeyName":"scaleunitsend-9b0574e0-5136-4df4-8e6a-e2f2882e9bab-iothub","PrimaryKey":"Us5rH3dL7PjxKhmfaI/mSZIfcwXeOsyfSq4QrDugdO0=","SecondaryKey":"rO8blXj4HENfbqnFBO/yjhMYAPxHSiaLCLT/xQoxrhA=","Rights":["Send"],"CreatedTime":"Tue, + 01 Aug 2023 03:28:54 GMT","ModifiedTime":"Tue, 01 Aug 2023 03:28:54 GMT"},{"ClaimType":"SharedAccessKey","ClaimValue":"None","KeyName":"owner-cbab5949-d9ac-4e6a-a0ab-bb79afef52d1-iothub","PrimaryKey":"XNzD5JnIb+KiP+0izNPo1tLPYeCHfutybwYy0RqatO4=","SecondaryKey":"qWNLPnpbkv1nt/K4RvdCZ7J1bekG7M+dSQSmPXRuJ2M=","Rights":["Listen","Manage","Send"],"CreatedTime":"Tue, + 01 Aug 2023 03:28:54 GMT","ModifiedTime":"Tue, 01 Aug 2023 03:28:54 GMT"}],"authorizationPolicies":[{"ClaimType":"SharedAccessKey","ClaimValue":"None","KeyName":"iothubowner","PrimaryKey":"4uiV7nJqiiSmWi6eCZuwSv1RYLxaQ2LR7tWVoLSy9Ao=","SecondaryKey":"JNJo6oKBxCO0HYXmUGsGcPQvproxiD/ykAScwiMU19I=","Rights":["Listen"],"CreatedTime":"Tue, + 01 Aug 2023 03:28:54 GMT","ModifiedTime":"Tue, 01 Aug 2023 03:28:54 GMT"},{"ClaimType":"SharedAccessKey","ClaimValue":"None","KeyName":"service","PrimaryKey":"+xKGI3bsyd/MsO9VErN8NCKGcQEtfNyJtHVyECYooWc=","SecondaryKey":"9VR3sSuqijKoFVgXsSJxX8JwN2lJfNnrh+5NS+qm3n8=","Rights":["Listen"],"CreatedTime":"Tue, + 01 Aug 2023 03:28:54 GMT","ModifiedTime":"Tue, 01 Aug 2023 03:28:54 GMT"}]}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[],"cosmosDBSqlCollections":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None","allowedFqdnList":[]},"sku":{"name":"S1","tier":"Standard","capacity":1},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFkYmNkYWItMTUxNy00YWYxLTk1ZGMtYzgxMTc5MTk1MTMz?api-version=2020-03-01&operationSource=os_ih&asyncinfo + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/locations/westus/operationResults/aWQ9b3NfaWhfZTA1NjM4ZjEtZTIwMy00ZjY0LTlkMjktNzIxNTM4ODMxYjMxO3JlZ2lvbj13ZXN0dXM=?api-version=2022-04-30-preview&operationSource=other&asyncinfo cache-control: - no-cache content-length: - - '4150' + - '4128' content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:55:37 GMT + - Tue, 01 Aug 2023 03:29:48 GMT expires: - '-1' pragma: @@ -1022,6 +907,8 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/de82f124-e00c-4af2-beea-622e6d7bcf36 x-ms-ratelimit-remaining-subscription-resource-requests: - '4999' status: @@ -1031,7 +918,53 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - iot hub policy renew-key + Connection: + - keep-alive + ParameterSetName: + - -g --hub-name -n --renew-key --query --output + User-Agent: + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/locations/westus/operationResults/aWQ9b3NfaWhfZTA1NjM4ZjEtZTIwMy00ZjY0LTlkMjktNzIxNTM4ODMxYjMxO3JlZ2lvbj13ZXN0dXM=?api-version=2022-04-30-preview&operationSource=other&asyncinfo + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 01 Aug 2023 03:29:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1041,10 +974,9 @@ interactions: ParameterSetName: - -g --hub-name -n --renew-key --query --output User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFkYmNkYWItMTUxNy00YWYxLTk1ZGMtYzgxMTc5MTk1MTMz?api-version=2020-03-01&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/locations/westus/operationResults/aWQ9b3NfaWhfZTA1NjM4ZjEtZTIwMy00ZjY0LTlkMjktNzIxNTM4ODMxYjMxO3JlZ2lvbj13ZXN0dXM=?api-version=2022-04-30-preview&operationSource=other&asyncinfo response: body: string: '{"status":"Succeeded"}' @@ -1056,7 +988,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:56:09 GMT + - Tue, 01 Aug 2023 03:30:19 GMT expires: - '-1' pragma: @@ -1078,7 +1010,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1088,23 +1020,22 @@ interactions: ParameterSetName: - -g --hub-name -n --renew-key --query --output User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003?api-version=2022-04-30-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"clitsi.rg000001","etag":"AAAACNt7YLs=","properties":{"locations":[{"location":"West - US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"cli-test-tsi-iothub000003.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"cli-test-tsi-iothub000003","endpoint":"sb://iothub-ns-cli-test-t-7652510-139f5cce7f.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":1},"identity":{"type":"None"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","name":"cli-test-tsi-iothub000003","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:24.3439861Z"},"subscriptionid":"7c943c1b-5122-4097-90c8-861411bdd574","resourcegroup":"clitsi.rg000001","etag":"AAAADH6/WGA=","properties":{"locations":[{"location":"West + US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"cli-test-tsi-iothub000003.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"cli-test-tsi-iothub000003","endpoint":"sb://iothub-ns-cli-test-t-25173957-b1e30a46a8.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[],"cosmosDBSqlCollections":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT5S","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None","allowedFqdnList":[]},"sku":{"name":"S1","tier":"Standard","capacity":1},"identity":{"type":"None"},"systemData":{"createdAt":"2023-08-01T03:27:27.5133333Z"}}' headers: cache-control: - no-cache content-length: - - '1700' + - '1738' content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:56:10 GMT + - Tue, 01 Aug 2023 03:30:21 GMT expires: - '-1' pragma: @@ -1138,15 +1069,12 @@ interactions: ParameterSetName: - -g --hub-name -n --renew-key --query --output User-Agent: - - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-iothub/0.12.0 Azure-SDK-For-Python AZURECLI/2.18.0 - accept-language: - - en-US + - AZURECLI/2.50.0 (PIP) azsdk-python-azure-mgmt-iothub/2.3.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003/IotHubKeys/iothubowner/listkeys?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003/IotHubKeys/iothubowner/listkeys?api-version=2022-04-30-preview response: body: - string: '{"keyName":"iothubowner","primaryKey":"cogK6BYpC2mhJW6wrpJdwKD/HwIDvnEMCi9hOFUQDqk=","secondaryKey":"p9x84klIfLgVFaP7HdV/YpMBrOirQTrGwlGjoZXZonM=","rights":"RegistryWrite, + string: '{"keyName":"iothubowner","primaryKey":"1wa3RX5folAlOEzVlHu4/lqCR79NF+9JV400RgroEdQ=","secondaryKey":"JNJo6oKBxCO0HYXmUGsGcPQvproxiD/ykAScwiMU19I=","rights":"RegistryWrite, ServiceConnect, DeviceConnect"}' headers: cache-control: @@ -1156,7 +1084,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 05:56:11 GMT + - Tue, 01 Aug 2023 03:30:22 GMT expires: - '-1' pragma: @@ -1190,22 +1118,22 @@ interactions: ParameterSetName: - -g --environment-name --name --shared-access-key --tags --timestamp-property-name User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":null,"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2021-01-27T05:55:27.0403868Z","provisioningState":"Succeeded","timestampPropertyName":"timestampProp"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:29:36.0984782Z"},"properties":{"eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2023-08-01T03:29:37.0619792Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"},"timestampPropertyName":"timestampProp"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '875' + - '839' content-type: - application/json date: - - Wed, 27 Jan 2021 05:56:13 GMT + - Tue, 01 Aug 2023 03:30:24 GMT expires: - '-1' pragma: @@ -1228,7 +1156,7 @@ interactions: "properties": {"timestampPropertyName": "DeviceId1", "eventSourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003", "iotHubName": "cli-test-tsi-iothub000003", "consumerGroupName": "cgn", "keyName": - "iothubowner", "sharedAccessKey": "cogK6BYpC2mhJW6wrpJdwKD/HwIDvnEMCi9hOFUQDqk="}}' + "iothubowner", "sharedAccessKey": "1wa3RX5folAlOEzVlHu4/lqCR79NF+9JV400RgroEdQ="}}' headers: Accept: - application/json @@ -1239,28 +1167,28 @@ interactions: Connection: - keep-alive Content-Length: - - '524' + - '466' Content-Type: - application/json ParameterSetName: - -g --environment-name --name --shared-access-key --tags --timestamp-property-name User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":{"test":"tag"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2021-01-27T05:55:27.0403868Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":{"test":"tag","CreatedOnDate":"2023-08-01T03:30:24.4383088Z"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2023-08-01T03:29:37.0619792Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '881' + - '848' content-type: - application/json date: - - Wed, 27 Jan 2021 05:56:18 GMT + - Tue, 01 Aug 2023 03:30:25 GMT expires: - '-1' pragma: @@ -1275,8 +1203,10 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/0b9c8a6a-688b-4efc-9da6-2231226ee4c2 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1194' status: code: 200 message: OK @@ -1294,22 +1224,22 @@ interactions: ParameterSetName: - -g --environment-name User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventSources?api-version=2020-05-15 response: body: - string: '{"value":[{"kind":"Microsoft.IoTHub","location":"westus","tags":{"test":"tag"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2021-01-27T05:55:27.0403868Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}]}' + string: '{"value":[{"kind":"Microsoft.IoTHub","location":"westus","tags":{"test":"tag","CreatedOnDate":"2023-08-01T03:30:24.4383088Z"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2023-08-01T03:29:37.0619792Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}]}' headers: cache-control: - no-cache content-length: - - '893' + - '860' content-type: - application/json date: - - Wed, 27 Jan 2021 05:56:20 GMT + - Tue, 01 Aug 2023 03:30:28 GMT expires: - '-1' pragma: @@ -1341,22 +1271,22 @@ interactions: ParameterSetName: - -g --environment-name -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: body: - string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":{"test":"tag"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2021-01-27T05:55:27.0403868Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' + string: '{"kind":"Microsoft.IoTHub","location":"westus","tags":{"test":"tag","CreatedOnDate":"2023-08-01T03:30:24.4383088Z"},"properties":{"timestampPropertyName":"DeviceId1","eventSourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.Devices/IotHubs/cli-test-tsi-iothub000003","iotHubName":"cli-test-tsi-iothub000003","consumerGroupName":"cgn","keyName":"iothubowner","creationTime":"2023-08-01T03:29:37.0619792Z","provisioningState":"Succeeded","ingressStartAt":{"type":"EarliestAvailable"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventsources/cli-test-tsi-es000002","name":"cli-test-tsi-es000002","type":"Microsoft.TimeSeriesInsights/Environments/EventSources"}' headers: cache-control: - no-cache content-length: - - '881' + - '848' content-type: - application/json date: - - Wed, 27 Jan 2021 05:56:21 GMT + - Tue, 01 Aug 2023 03:30:29 GMT expires: - '-1' pragma: @@ -1390,8 +1320,8 @@ interactions: ParameterSetName: - -g --environment-name -n --yes User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) azsdk-python-timeseriesinsightsclient/unknown Python/3.9.13 + (Windows-10-10.0.19045-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/eventSources/cli-test-tsi-es000002?api-version=2020-05-15 response: @@ -1403,7 +1333,7 @@ interactions: content-length: - '0' date: - - Wed, 27 Jan 2021 05:56:31 GMT + - Tue, 01 Aug 2023 03:30:36 GMT expires: - '-1' pragma: @@ -1415,7 +1345,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14995' status: code: 200 message: OK diff --git a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_reference_data_set.yaml b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_reference_data_set.yaml index 75fb387745f..a9862394675 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_reference_data_set.yaml +++ b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/recordings/test_timeseriesinsights_reference_data_set.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"location": "westus", "kind": "Gen1", "sku": {"name": "S1", "capacity": - 1}, "properties": {"dataRetentionTime": "P31D", "storageLimitExceededBehavior": - "PauseIngress", "partitionKeyProperties": [{"name": "DeviceId1", "type": "String"}]}}' + body: '{"kind": "Gen1", "location": "westus", "sku": {"capacity": 1, "name": "S1"}, + "properties": {"dataRetentionTime": "P31D", "partitionKeyProperties": [{"name": + "DeviceId1", "type": "String"}], "storageLimitExceededBehavior": "PauseIngress"}}' headers: Accept: - application/json @@ -20,22 +20,21 @@ interactions: - --resource-group --location --name --sku --data-retention-time --partition-key-properties --storage-limit-exceeded-behavior User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004?api-version=2020-05-15 response: body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:56:54.5699647+00:00","provisioningState":"Accepted","dataAccessId":"32889b10-f1d1-4a76-9fac-f19871c30fc0","dataAccessFqdn":"32889b10-f1d1-4a76-9fac-f19871c30fc0.env.timeseries.azure.com","requestApiVersion":"2020-05-15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004","name":"cli-test-tsi-env000004","type":"Microsoft.TimeSeriesInsights/Environments"}' + string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:33.5931179Z"},"properties":{"dataRetentionTime":"P31D","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"storageLimitExceededBehavior":"PauseIngress","creationTime":"2023-08-01T03:27:34.1138298Z","provisioningState":"Succeeded","dataAccessId":"ccaf7a33-c6e8-4fcb-862d-53cbf61b80ff","dataAccessFqdn":"ccaf7a33-c6e8-4fcb-862d-53cbf61b80ff.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004","name":"cli-test-tsi-env000004","type":"Microsoft.TimeSeriesInsights/Environments"}' headers: cache-control: - no-cache content-length: - - '794' + - '737' content-type: - application/json date: - - Wed, 27 Jan 2021 05:56:56 GMT + - Tue, 01 Aug 2023 03:27:35 GMT expires: - '-1' pragma: @@ -46,110 +45,16 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/2fd1016a-6e70-4d7a-8556-b5a217f97f7b x-ms-ratelimit-remaining-subscription-writes: - - '1194' + - '1193' status: code: 201 message: Created - request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - tsi environment gen1 create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --location --name --sku --data-retention-time --partition-key-properties - --storage-limit-exceeded-behavior - User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004?api-version=2020-05-15 - response: - body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:56:54.5699647Z","provisioningState":"Creating","requestApiVersion":"2020-05-15","dataAccessId":"32889b10-f1d1-4a76-9fac-f19871c30fc0","dataAccessFqdn":"32889b10-f1d1-4a76-9fac-f19871c30fc0.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004","name":"cli-test-tsi-env000004","type":"Microsoft.TimeSeriesInsights/Environments"}' - headers: - cache-control: - - no-cache - content-length: - - '789' - content-type: - - application/json - date: - - Wed, 27 Jan 2021 05:57:27 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - tsi environment gen1 create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --location --name --sku --data-retention-time --partition-key-properties - --storage-limit-exceeded-behavior - User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004?api-version=2020-05-15 - response: - body: - string: '{"sku":{"name":"S1","capacity":1},"kind":"Gen1","location":"westus","tags":null,"properties":{"dataRetentionTime":"P31D","storageLimitExceededBehavior":"PauseIngress","partitionKeyProperties":[{"name":"DeviceId1","type":"String"}],"creationTime":"2021-01-27T05:56:54.5699647Z","provisioningState":"Succeeded","requestApiVersion":"2020-05-15","dataAccessId":"32889b10-f1d1-4a76-9fac-f19871c30fc0","dataAccessFqdn":"32889b10-f1d1-4a76-9fac-f19871c30fc0.env.timeseries.azure.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004","name":"cli-test-tsi-env000004","type":"Microsoft.TimeSeriesInsights/Environments"}' - headers: - cache-control: - - no-cache - content-length: - - '790' - content-type: - - application/json - date: - - Wed, 27 Jan 2021 05:57:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "westus", "properties": {"keyProperties": [{"name": "DeviceFloor", - "type": "Double"}], "dataStringComparisonBehavior": "Ordinal"}}' + body: '{"location": "westus", "properties": {"dataStringComparisonBehavior": "Ordinal", + "keyProperties": [{"name": "DeviceFloor", "type": "Double"}]}}' headers: Accept: - application/json @@ -166,22 +71,21 @@ interactions: ParameterSetName: - -g --environment-name --name --location --key-properties --data-string-comparison-behavior User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002?api-version=2020-05-15 response: body: - string: '{"location":"westus","tags":null,"properties":{"keyProperties":[{"name":"DeviceFloor","type":"Double"}],"dataStringComparisonBehavior":"Ordinal","creationTime":"2021-01-27T05:58:03.8521276Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002","name":"clitesttsirds000002","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}' + string: '{"location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:36.8298662Z"},"properties":{"dataStringComparisonBehavior":"Ordinal","keyProperties":[{"name":"DeviceFloor","type":"Double"}],"creationTime":"2023-08-01T03:27:37.4219224Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002","name":"clitesttsirds000002","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}' headers: cache-control: - no-cache content-length: - - '597' + - '569' content-type: - application/json date: - - Wed, 27 Jan 2021 05:58:04 GMT + - Tue, 01 Aug 2023 03:27:37 GMT expires: - '-1' pragma: @@ -196,15 +100,17 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/ae4146fe-a72c-40ed-b374-7e29f5d98772 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1193' status: code: 200 message: OK - request: - body: '{"location": "westus", "properties": {"keyProperties": [{"name": "DeviceId1", - "type": "String"}, {"name": "DeviceFloor", "type": "Double"}], "dataStringComparisonBehavior": - "OrdinalIgnoreCase"}}' + body: '{"location": "westus", "properties": {"dataStringComparisonBehavior": "OrdinalIgnoreCase", + "keyProperties": [{"name": "DeviceId1", "type": "String"}, {"name": "DeviceFloor", + "type": "Double"}]}}' headers: Accept: - application/json @@ -222,22 +128,21 @@ interactions: - -g --environment-name --name --location --key-properties --key-properties --data-string-comparison-behavior User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds2000003?api-version=2020-05-15 response: body: - string: '{"location":"westus","tags":null,"properties":{"keyProperties":[{"name":"DeviceId1","type":"String"},{"name":"DeviceFloor","type":"Double"}],"dataStringComparisonBehavior":"OrdinalIgnoreCase","creationTime":"2021-01-27T05:58:10.3778254Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds2000003","name":"clitesttsirds2000003","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}' + string: '{"location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:39.4515233Z"},"properties":{"dataStringComparisonBehavior":"OrdinalIgnoreCase","keyProperties":[{"name":"DeviceId1","type":"String"},{"name":"DeviceFloor","type":"Double"}],"creationTime":"2023-08-01T03:27:39.9932865Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds2000003","name":"clitesttsirds2000003","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}' headers: cache-control: - no-cache content-length: - - '644' + - '618' content-type: - application/json date: - - Wed, 27 Jan 2021 05:58:11 GMT + - Tue, 01 Aug 2023 03:27:40 GMT expires: - '-1' pragma: @@ -252,6 +157,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=48f8229a-efaa-4c48-b7c8-08c675d698ec/eastus2euap/7a3c400e-c97c-4f9e-b835-f81fd25543c8 x-ms-ratelimit-remaining-subscription-writes: - '1196' status: @@ -275,22 +182,21 @@ interactions: ParameterSetName: - -g --environment-name --name --tags User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002?api-version=2020-05-15 response: body: - string: '{"location":"westus","tags":{"mykey":"myvalue"},"properties":{"keyProperties":[{"name":"DeviceFloor","type":"Double"}],"dataStringComparisonBehavior":"Ordinal","creationTime":"2021-01-27T05:58:03.8521276Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002","name":"clitesttsirds000002","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}' + string: '{"location":"westus","tags":{"mykey":"myvalue","CreatedOnDate":"2023-08-01T03:27:41.8366847Z"},"properties":{"dataStringComparisonBehavior":"Ordinal","keyProperties":[{"name":"DeviceFloor","type":"Double"}],"creationTime":"2023-08-01T03:27:37.4219224Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002","name":"clitesttsirds000002","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}' headers: cache-control: - no-cache content-length: - - '612' + - '587' content-type: - application/json date: - - Wed, 27 Jan 2021 05:58:16 GMT + - Tue, 01 Aug 2023 03:27:42 GMT expires: - '-1' pragma: @@ -306,7 +212,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1193' + - '1192' status: code: 200 message: OK @@ -324,22 +230,21 @@ interactions: ParameterSetName: - -g --environment-name User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets?api-version=2020-05-15 response: body: - string: '{"value":[{"location":"westus","tags":{"mykey":"myvalue"},"properties":{"keyProperties":[{"name":"DeviceFloor","type":"Double"}],"dataStringComparisonBehavior":"Ordinal","creationTime":"2021-01-27T05:58:03.8521276Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002","name":"clitesttsirds000002","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"},{"location":"westus","tags":null,"properties":{"keyProperties":[{"name":"DeviceId1","type":"String"},{"name":"DeviceFloor","type":"Double"}],"dataStringComparisonBehavior":"OrdinalIgnoreCase","creationTime":"2021-01-27T05:58:10.3778254Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds2000003","name":"clitesttsirds2000003","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}]}' + string: '{"value":[{"location":"westus","tags":{"mykey":"myvalue","CreatedOnDate":"2023-08-01T03:27:41.8366847Z"},"properties":{"dataStringComparisonBehavior":"Ordinal","keyProperties":[{"name":"DeviceFloor","type":"Double"}],"creationTime":"2023-08-01T03:27:37.4219224Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002","name":"clitesttsirds000002","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"},{"location":"westus","tags":{"CreatedOnDate":"2023-08-01T03:27:39.4515233Z"},"properties":{"dataStringComparisonBehavior":"OrdinalIgnoreCase","keyProperties":[{"name":"DeviceId1","type":"String"},{"name":"DeviceFloor","type":"Double"}],"creationTime":"2023-08-01T03:27:39.9932865Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds2000003","name":"clitesttsirds2000003","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}]}' headers: cache-control: - no-cache content-length: - - '1269' + - '1218' content-type: - application/json date: - - Wed, 27 Jan 2021 05:58:18 GMT + - Tue, 01 Aug 2023 03:27:44 GMT expires: - '-1' pragma: @@ -371,22 +276,21 @@ interactions: ParameterSetName: - -g --environment-name -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002?api-version=2020-05-15 response: body: - string: '{"location":"westus","tags":{"mykey":"myvalue"},"properties":{"keyProperties":[{"name":"DeviceFloor","type":"Double"}],"dataStringComparisonBehavior":"Ordinal","creationTime":"2021-01-27T05:58:03.8521276Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002","name":"clitesttsirds000002","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}' + string: '{"location":"westus","tags":{"mykey":"myvalue","CreatedOnDate":"2023-08-01T03:27:41.8366847Z"},"properties":{"dataStringComparisonBehavior":"Ordinal","keyProperties":[{"name":"DeviceFloor","type":"Double"}],"creationTime":"2023-08-01T03:27:37.4219224Z","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002","name":"clitesttsirds000002","type":"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets"}' headers: cache-control: - no-cache content-length: - - '612' + - '587' content-type: - application/json date: - - Wed, 27 Jan 2021 05:58:20 GMT + - Tue, 01 Aug 2023 03:27:46 GMT expires: - '-1' pragma: @@ -408,7 +312,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -420,8 +324,7 @@ interactions: ParameterSetName: - -g --environment-name -n --yes User-Agent: - - AZURECLI/2.18.0 azsdk-python-timeseriesinsightsclient/unknown Python/3.8.7 - (Windows-10-10.0.19041-SP0) + - AZURECLI/2.50.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.19045-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitsi.rg000001/providers/Microsoft.TimeSeriesInsights/environments/cli-test-tsi-env000004/referenceDataSets/clitesttsirds000002?api-version=2020-05-15 response: @@ -433,7 +336,7 @@ interactions: content-length: - '0' date: - - Wed, 27 Jan 2021 05:58:25 GMT + - Tue, 01 Aug 2023 03:27:50 GMT expires: - '-1' pragma: @@ -445,7 +348,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14997' + - '14998' status: code: 200 message: OK diff --git a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/test_timeseriesinsights_scenario.py b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/test_timeseriesinsights_scenario.py index 0aca259a917..14e7476ff59 100644 --- a/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/test_timeseriesinsights_scenario.py +++ b/src/timeseriesinsights/azext_timeseriesinsights/tests/latest/test_timeseriesinsights_scenario.py @@ -33,7 +33,7 @@ def _create_timeseriesinsights_environment(self): @ResourceGroupPreparer(name_prefix='clitsi.rg') def test_timeseriesinsights_environment_gen1(self, resource_group): self.kwargs.update({ - 'env1': self.create_random_name('cli-test-tsi-env1', 24), + 'env1': self.create_random_name('cli-test-tsi-env1', 24) }) # Test `environment gen1 create` with optional arguments @@ -50,7 +50,7 @@ def test_timeseriesinsights_environment_gen1(self, resource_group): self.check('sku.capacity', 1), self.check('partitionKeyProperties', [{"name": "DeviceId1", "type": "String"}]), self.check('storageLimitExceededBehavior', 'PauseIngress'), - self.check('dataRetentionTime', '31 days, 0:00:00') + self.check('dataRetentionTime', 'P31D') ]) self.cmd('az tsi environment show ' @@ -64,13 +64,13 @@ def test_timeseriesinsights_environment_gen1(self, resource_group): self.cmd('az tsi environment gen1 update --resource-group {rg} --name {env1} ' '--storage-limit-exceeded-behavior PurgeOldData', - checks=[self.check('properties.storageLimitExceededBehavior', 'PurgeOldData')]) + checks=[self.check('storageLimitExceededBehavior', 'PurgeOldData')]) self.cmd('az tsi environment gen1 update --resource-group {rg} --name {env1} ' '--storage-limit-exceeded-behavior PauseIngress ' '--sku name=S1 capacity=1', checks=[ - self.check('properties.storageLimitExceededBehavior', 'PauseIngress'), + self.check('storageLimitExceededBehavior', 'PauseIngress'), self.check('sku.capacity', '1')]) self.cmd('az tsi environment gen1 update --resource-group {rg} --name {env1} ' @@ -126,7 +126,7 @@ def test_timeseriesinsights_environment_gen2(self, resource_group, storage_accou self.cmd('az tsi environment gen2 update --resource-group {rg} --name {env} ' '--warm-store-configuration data-retention=P30D ' '--storage-configuration account-name={sa} management-key=' + key, - checks=[self.check('warmStoreConfiguration.dataRetention', "30 days, 0:00:00")]) + checks=[self.check('warmStoreConfiguration.dataRetention', "P30D")]) @ResourceGroupPreparer(name_prefix='clitsi.rg') def test_timeseriesinsights_event_source_eventhub(self, resource_group): @@ -147,7 +147,7 @@ def test_timeseriesinsights_event_source_eventhub(self, resource_group): self.kwargs["es_resource_id"] = result["id"] result = self.cmd( 'az eventhubs namespace authorization-rule keys list -g {rg} --namespace-name {ehns} ' - '-n RootManageSharedAccessKey').get_output_in_json() + '--name RootManageSharedAccessKey').get_output_in_json() self.kwargs["shared_access_key"] = result["primaryKey"] self.cmd('az tsi event-source eventhub create -g {rg} --environment-name {env} --name {es} ' @@ -167,7 +167,7 @@ def test_timeseriesinsights_event_source_eventhub(self, resource_group): # Renew a key self.kwargs["shared_access_key"] = self.cmd( 'az eventhubs namespace authorization-rule keys renew -g {rg} --namespace-name {ehns} ' - '-n RootManageSharedAccessKey --key PrimaryKey --query primaryKey --output tsv').output + '--name RootManageSharedAccessKey --key PrimaryKey --query primaryKey --output tsv').output self.cmd('az tsi event-source eventhub update -g {rg} --environment-name {env} --name {es} ' '--shared-access-key {shared_access_key} ' diff --git a/src/timeseriesinsights/setup.py b/src/timeseriesinsights/setup.py index b9e91a21630..49695047636 100644 --- a/src/timeseriesinsights/setup.py +++ b/src/timeseriesinsights/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '0.2.1' +VERSION = '1.0.0b1' try: from azext_timeseriesinsights.manual.version import VERSION except ImportError: