From 0a05ba13e5b90caaff4b955cbc4ce8385f1ac559 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 8 Jul 2021 17:19:49 +0000 Subject: [PATCH] CodeGen from PR 14917 in Azure/azure-rest-api-specs Merge e0b9dc29fbcc1044712d2720d38fbd3c44466132 into b4c2ab06263894b4b88d5af8e77a1748d73bb3dd --- src/logic/HISTORY.rst | 12 - src/logic/azext_logic/__init__.py | 23 +- src/logic/azext_logic/action.py | 11 +- src/logic/azext_logic/azext_metadata.json | 4 +- src/logic/azext_logic/commands.py | 12 - src/logic/azext_logic/custom.py | 11 +- .../azext_logic/generated/_client_factory.py | 118 +- src/logic/azext_logic/generated/_help.py | 1568 ++++++++++- src/logic/azext_logic/generated/_params.py | 1060 +++++++- .../azext_logic/generated/_validators.py | 9 + src/logic/azext_logic/generated/action.py | 218 +- src/logic/azext_logic/generated/commands.py | 336 ++- src/logic/azext_logic/generated/custom.py | 1631 +++++++++++- src/logic/azext_logic/tests/__init__.py | 104 + .../azext_logic/tests/latest/example_steps.py | 1496 +++++++++++ .../azext_logic/tests/latest/integration.json | 6 - .../azext_logic/tests/latest/preparers.py | 159 ++ .../tests/latest/test_logic_scenario.py | 413 ++- .../azext_logic/tests/latest/workflow.json | 35 - .../tests/latest/workflowupdate.json | 35 - .../azext_logic/vendored_sdks/__init__.py | 2 +- .../vendored_sdks/logic/__init__.py | 6 + .../vendored_sdks/logic/_configuration.py | 15 +- .../logic/_logic_management_client.py | 223 +- .../vendored_sdks/logic/aio/__init__.py | 2 +- ...nfiguration_async.py => _configuration.py} | 15 +- .../logic/aio/_logic_management_client.py | 193 ++ .../aio/_logic_management_client_async.py | 188 -- .../logic/aio/operations/__init__.py | 65 + ...egration_account_agreements_operations.py} | 189 +- ...egration_account_assemblies_operations.py} | 144 +- ...ccount_batch_configurations_operations.py} | 125 +- ...ration_account_certificates_operations.py} | 135 +- .../_integration_account_maps_operations.py} | 179 +- ...ntegration_account_partners_operations.py} | 173 +- ...integration_account_schemas_operations.py} | 185 +- ...ntegration_account_sessions_operations.py} | 133 +- .../_integration_accounts_operations.py} | 386 ++- ...ment_managed_api_operations_operations.py} | 49 +- ...ce_environment_managed_apis_operations.py} | 223 +- ..._environment_network_health_operations.py} | 26 +- ...on_service_environment_skus_operations.py} | 49 +- ...ration_service_environments_operations.py} | 362 +-- .../_operations.py} | 49 +- ...flow_run_action_repetitions_operations.py} | 110 +- ...petitions_request_histories_operations.py} | 68 +- ...un_action_request_histories_operations.py} | 68 +- ...un_action_scope_repetitions_operations.py} | 68 +- .../_workflow_run_actions_operations.py} | 118 +- .../_workflow_run_operations_operations.py} | 26 +- .../_workflow_runs_operations.py} | 96 +- ..._workflow_trigger_histories_operations.py} | 96 +- .../_workflow_triggers_operations.py} | 183 +- .../_workflow_version_triggers_operations.py} | 45 +- .../_workflow_versions_operations.py} | 72 +- .../_workflows_operations.py} | 604 ++--- .../logic/aio/operations_async/__init__.py | 65 - .../vendored_sdks/logic/models/__init__.py | 32 + .../models/_logic_management_client_enums.py | 750 +++--- .../vendored_sdks/logic/models/_models.py | 703 ++--- .../vendored_sdks/logic/models/_models_py3.py | 719 ++--- .../logic/operations/__init__.py | 104 +- ...egration_account_agreements_operations.py} | 197 +- ...egration_account_assemblies_operations.py} | 152 +- ...ccount_batch_configurations_operations.py} | 133 +- ...ration_account_certificates_operations.py} | 143 +- ...> _integration_account_maps_operations.py} | 187 +- ...ntegration_account_partners_operations.py} | 181 +- ...integration_account_schemas_operations.py} | 193 +- ...ntegration_account_sessions_operations.py} | 141 +- ...py => _integration_accounts_operations.py} | 394 ++- ...ment_managed_api_operations_operations.py} | 57 +- ...ce_environment_managed_apis_operations.py} | 221 +- ...e_environment_network_health_operations.py | 36 +- ...on_service_environment_skus_operations.py} | 57 +- ...ration_service_environments_operations.py} | 360 +-- ...operation_operations.py => _operations.py} | 57 +- ...flow_run_action_repetitions_operations.py} | 118 +- ...petitions_request_histories_operations.py} | 76 +- ...un_action_request_histories_operations.py} | 76 +- ...un_action_scope_repetitions_operations.py} | 76 +- ...py => _workflow_run_actions_operations.py} | 126 +- ...=> _workflow_run_operations_operations.py} | 36 +- ...ations.py => _workflow_runs_operations.py} | 104 +- ..._workflow_trigger_histories_operations.py} | 104 +- ...ns.py => _workflow_triggers_operations.py} | 191 +- ... _workflow_version_triggers_operations.py} | 53 +- ...ns.py => _workflow_versions_operations.py} | 80 +- ...operations.py => _workflows_operations.py} | 608 ++--- src/logic/report.md | 2334 +++++++++++++++-- src/logic/setup.cfg | 1 + src/logic/setup.py | 19 +- 92 files changed, 14789 insertions(+), 6026 deletions(-) delete mode 100644 src/logic/azext_logic/commands.py create mode 100644 src/logic/azext_logic/generated/_validators.py create mode 100644 src/logic/azext_logic/tests/latest/example_steps.py delete mode 100644 src/logic/azext_logic/tests/latest/integration.json create mode 100644 src/logic/azext_logic/tests/latest/preparers.py delete mode 100644 src/logic/azext_logic/tests/latest/workflow.json delete mode 100644 src/logic/azext_logic/tests/latest/workflowupdate.json rename src/logic/azext_logic/vendored_sdks/logic/aio/{_configuration_async.py => _configuration.py} (80%) create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client_async.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_account_agreement_operations_async.py => operations/_integration_account_agreements_operations.py} (74%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_account_assembly_operations_async.py => operations/_integration_account_assemblies_operations.py} (78%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_account_batch_configuration_operations_async.py => operations/_integration_account_batch_configurations_operations.py} (77%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_account_certificate_operations_async.py => operations/_integration_account_certificates_operations.py} (76%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_account_map_operations_async.py => operations/_integration_account_maps_operations.py} (75%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_account_partner_operations_async.py => operations/_integration_account_partners_operations.py} (76%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_account_schema_operations_async.py => operations/_integration_account_schemas_operations.py} (74%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_account_session_operations_async.py => operations/_integration_account_sessions_operations.py} (76%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_account_operations_async.py => operations/_integration_accounts_operations.py} (70%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_service_environment_managed_api_operation_operations_async.py => operations/_integration_service_environment_managed_api_operations_operations.py} (73%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_service_environment_managed_api_operations_async.py => operations/_integration_service_environment_managed_apis_operations.py} (63%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_service_environment_network_health_operations_async.py => operations/_integration_service_environment_network_health_operations.py} (81%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_service_environment_sku_operations_async.py => operations/_integration_service_environment_skus_operations.py} (71%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_service_environment_operations_async.py => operations/_integration_service_environments_operations.py} (63%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_operation_operations_async.py => operations/_operations.py} (69%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_run_action_repetition_operations_async.py => operations/_workflow_run_action_repetitions_operations.py} (74%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_run_action_repetition_request_history_operations_async.py => operations/_workflow_run_action_repetitions_request_histories_operations.py} (78%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_run_action_request_history_operations_async.py => operations/_workflow_run_action_request_histories_operations.py} (77%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_run_action_scope_repetition_operations_async.py => operations/_workflow_run_action_scope_repetitions_operations.py} (77%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_run_action_operations_async.py => operations/_workflow_run_actions_operations.py} (71%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_run_operation_operations_async.py => operations/_workflow_run_operations_operations.py} (82%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_run_operations_async.py => operations/_workflow_runs_operations.py} (75%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_trigger_history_operations_async.py => operations/_workflow_trigger_histories_operations.py} (76%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_trigger_operations_async.py => operations/_workflow_triggers_operations.py} (76%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_version_trigger_operations_async.py => operations/_workflow_version_triggers_operations.py} (79%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_version_operations_async.py => operations/_workflow_versions_operations.py} (74%) rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_operations_async.py => operations/_workflows_operations.py} (68%) delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/__init__.py rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_account_agreement_operations.py => _integration_account_agreements_operations.py} (73%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_account_assembly_operations.py => _integration_account_assemblies_operations.py} (77%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_account_batch_configuration_operations.py => _integration_account_batch_configurations_operations.py} (76%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_account_certificate_operations.py => _integration_account_certificates_operations.py} (75%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_account_map_operations.py => _integration_account_maps_operations.py} (75%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_account_partner_operations.py => _integration_account_partners_operations.py} (75%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_account_schema_operations.py => _integration_account_schemas_operations.py} (74%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_account_session_operations.py => _integration_account_sessions_operations.py} (75%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_account_operations.py => _integration_accounts_operations.py} (70%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_service_environment_managed_api_operation_operations.py => _integration_service_environment_managed_api_operations_operations.py} (69%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_service_environment_managed_api_operations.py => _integration_service_environment_managed_apis_operations.py} (65%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_service_environment_sku_operations.py => _integration_service_environment_skus_operations.py} (68%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_integration_service_environment_operations.py => _integration_service_environments_operations.py} (65%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_operation_operations.py => _operations.py} (64%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_run_action_repetition_operations.py => _workflow_run_action_repetitions_operations.py} (72%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_run_action_repetition_request_history_operations.py => _workflow_run_action_repetitions_request_histories_operations.py} (76%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_run_action_request_history_operations.py => _workflow_run_action_request_histories_operations.py} (75%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_run_action_scope_repetition_operations.py => _workflow_run_action_scope_repetitions_operations.py} (75%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_run_action_operations.py => _workflow_run_actions_operations.py} (70%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_run_operation_operations.py => _workflow_run_operations_operations.py} (77%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_run_operations.py => _workflow_runs_operations.py} (73%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_trigger_history_operations.py => _workflow_trigger_histories_operations.py} (75%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_trigger_operations.py => _workflow_triggers_operations.py} (76%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_version_trigger_operations.py => _workflow_version_triggers_operations.py} (74%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_version_operations.py => _workflow_versions_operations.py} (72%) rename src/logic/azext_logic/vendored_sdks/logic/operations/{_workflow_operations.py => _workflows_operations.py} (68%) diff --git a/src/logic/HISTORY.rst b/src/logic/HISTORY.rst index 1243db28376..1c139576ba0 100644 --- a/src/logic/HISTORY.rst +++ b/src/logic/HISTORY.rst @@ -3,18 +3,6 @@ Release History =============== -0.1.3 -++++++ -* Preview logic extension - -0.1.2 -++++++ -* `logic workflow update`: --definition is not to be mandatory while updating - -0.1.1 -++++++ -* Fix parsing argument --integration-service-environment. - 0.1.0 ++++++ * Initial release. diff --git a/src/logic/azext_logic/__init__.py b/src/logic/azext_logic/__init__.py index b41bafda354..b57d48fd57b 100644 --- a/src/logic/azext_logic/__init__.py +++ b/src/logic/azext_logic/__init__.py @@ -1,22 +1,31 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- from azure.cli.core import AzCommandsLoader from azext_logic.generated._help import helps # pylint: disable=unused-import +try: + from azext_logic.manual._help import helps # pylint: disable=reimported +except ImportError: + pass class LogicManagementClientCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_logic.generated._client_factory import cf_logic + from azext_logic.generated._client_factory import cf_logic_cl logic_custom = CliCommandType( operations_tmpl='azext_logic.custom#{}', - client_factory=cf_logic) - super(LogicManagementClientCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=logic_custom) + client_factory=cf_logic_cl) + parent = super(LogicManagementClientCommandsLoader, self) + parent.__init__(cli_ctx=cli_ctx, custom_command_type=logic_custom) def load_command_table(self, args): from azext_logic.generated.commands import load_command_table diff --git a/src/logic/azext_logic/action.py b/src/logic/azext_logic/action.py index d66d3c5d0d7..d95d53bf711 100644 --- a/src/logic/azext_logic/action.py +++ b/src/logic/azext_logic/action.py @@ -1,7 +1,12 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- # pylint: disable=wildcard-import # pylint: disable=unused-wildcard-import diff --git a/src/logic/azext_logic/azext_metadata.json b/src/logic/azext_logic/azext_metadata.json index cf7b8927a07..cfc30c747c7 100644 --- a/src/logic/azext_logic/azext_metadata.json +++ b/src/logic/azext_logic/azext_metadata.json @@ -1,4 +1,4 @@ { - "azext.isPreview": true, + "azext.isExperimental": true, "azext.minCliCoreVersion": "2.15.0" -} +} \ No newline at end of file diff --git a/src/logic/azext_logic/commands.py b/src/logic/azext_logic/commands.py deleted file mode 100644 index 42f0c1a991e..00000000000 --- a/src/logic/azext_logic/commands.py +++ /dev/null @@ -1,12 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# pylint: disable=wildcard-import -# pylint: disable=unused-wildcard-import - -from .generated.commands import * # noqa: F403 -try: - from .manual.commands import * # noqa: F403 -except ImportError: - pass diff --git a/src/logic/azext_logic/custom.py b/src/logic/azext_logic/custom.py index d1fd3543ed0..dbe9d5f9742 100644 --- a/src/logic/azext_logic/custom.py +++ b/src/logic/azext_logic/custom.py @@ -1,7 +1,12 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- # pylint: disable=wildcard-import # pylint: disable=unused-wildcard-import diff --git a/src/logic/azext_logic/generated/_client_factory.py b/src/logic/azext_logic/generated/_client_factory.py index a8df4e1760d..191bdb113ee 100644 --- a/src/logic/azext_logic/generated/_client_factory.py +++ b/src/logic/azext_logic/generated/_client_factory.py @@ -1,18 +1,120 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- -def cf_logic(cli_ctx, *_): +def cf_logic_cl(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client - from ..vendored_sdks.logic import LogicManagementClient - return get_mgmt_service_client(cli_ctx, LogicManagementClient) + from azext_logic.vendored_sdks.logic import LogicManagementClient + return get_mgmt_service_client(cli_ctx, + LogicManagementClient) def cf_workflow(cli_ctx, *_): - return cf_logic(cli_ctx).workflow + return cf_logic_cl(cli_ctx).workflows + + +def cf_workflow_version(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_versions + + +def cf_workflow_trigger(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_triggers + + +def cf_workflow_version_trigger(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_version_triggers + + +def cf_workflow_trigger_history(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_trigger_histories + + +def cf_workflow_run(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_runs + + +def cf_workflow_run_action(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_actions + + +def cf_workflow_run_action_repetition(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_action_repetitions + + +def cf_workflow_run_action_repetition_request_history(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_action_repetitions_request_histories + + +def cf_workflow_run_action_request_history(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_action_request_histories + + +def cf_workflow_run_action_scope_repetition(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_action_scope_repetitions + + +def cf_workflow_run_operation(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_operations def cf_integration_account(cli_ctx, *_): - return cf_logic(cli_ctx).integration_account + return cf_logic_cl(cli_ctx).integration_accounts + + +def cf_integration_account_assembly(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_assemblies + + +def cf_integration_account_batch_configuration(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_batch_configurations + + +def cf_integration_account_schema(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_schemas + + +def cf_integration_account_map(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_maps + + +def cf_integration_account_partner(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_partners + + +def cf_integration_account_agreement(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_agreements + + +def cf_integration_account_certificate(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_certificates + + +def cf_integration_account_session(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_sessions + + +def cf_integration_service_environment(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_service_environments + + +def cf_integration_service_environment_sku(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_service_environment_skus + + +def cf_integration_service_environment_network_health(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_service_environment_network_health + + +def cf_integration_service_environment_managed_api(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_service_environment_managed_apis + + +def cf_integration_service_environment_managed_api_operation(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_service_environment_managed_api_operations diff --git a/src/logic/azext_logic/generated/_help.py b/src/logic/azext_logic/generated/_help.py index b5772ab8f22..a961da5153a 100644 --- a/src/logic/azext_logic/generated/_help.py +++ b/src/logic/azext_logic/generated/_help.py @@ -1,8 +1,12 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- # pylint: disable=too-many-lines from knack.help_files import helps @@ -10,16 +14,16 @@ helps['logic workflow'] = """ type: group - short-summary: logic workflow + short-summary: Manage workflow with logic """ helps['logic workflow list'] = """ type: command - short-summary: Gets a list of workflows by subscription. + short-summary: "Gets a list of workflows by resource group. And Gets a list of workflows by subscription." examples: - name: List all workflows in a resource group text: |- - az logic workflow list --resource-group "test_resource_group" + az logic workflow list --resource-group "test-resource-group" - name: List all workflows in a subscription text: |- az logic workflow list @@ -27,96 +31,1596 @@ helps['logic workflow show'] = """ type: command - short-summary: Gets a workflow. + short-summary: "Gets a workflow." examples: - name: Get a workflow text: |- - az logic workflow show --resource-group "test_resource_group" --name "test_workflow" + az logic workflow show --resource-group "test-resource-group" --name "test-workflow" """ helps['logic workflow create'] = """ type: command - short-summary: Creates or updates a workflow using a JSON file for the defintion. + short-summary: "Create a workflow." + parameters: + - name: --properties-endpoints-configuration-workflow + short-summary: "The workflow endpoints." + long-summary: | + Usage: --properties-endpoints-configuration-workflow outgoing-ip-addresses=XX \ +access-endpoint-ip-addresses=XX + + outgoing-ip-addresses: The outgoing ip address. + access-endpoint-ip-addresses: The access endpoint ip address. + - name: --connector + short-summary: "The connector endpoints." + long-summary: | + Usage: --connector outgoing-ip-addresses=XX access-endpoint-ip-addresses=XX + + outgoing-ip-addresses: The outgoing ip address. + access-endpoint-ip-addresses: The access endpoint ip address. examples: - name: Create or update a workflow text: |- - az logic workflow create --resource-group "test_resource_group" --location "centralus" --name "test_workflow" --definition "workflow.json" + az logic workflow create --resource-group "test-resource-group" --location "brazilsouth" --definition \ +"{\\"$schema\\":\\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.\ +json#\\",\\"actions\\":{\\"Find_pet_by_ID\\":{\\"type\\":\\"ApiConnection\\",\\"inputs\\":{\\"path\\":\\"/pet/@{encodeU\ +RIComponent(\'1\')}\\",\\"method\\":\\"get\\",\\"host\\":{\\"connection\\":{\\"name\\":\\"@parameters(\'$connections\')\ +[\'test-custom-connector\'][\'connectionId\']\\"}}},\\"runAfter\\":{}}},\\"contentVersion\\":\\"1.0.0.0\\",\\"outputs\\\ +":{},\\"parameters\\":{\\"$connections\\":{\\"type\\":\\"Object\\",\\"defaultValue\\":{}}},\\"triggers\\":{\\"manual\\"\ +:{\\"type\\":\\"Request\\",\\"inputs\\":{\\"schema\\":{}},\\"kind\\":\\"Http\\"}}}" --resource-reference-id \ +"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integ\ +rationAccounts/test-integration-account" --parameters "{\\"$connections\\":{\\"value\\":{\\"test-custom-connector\\":{\ +\\"connectionId\\":\\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/\ +Microsoft.Web/connections/test-custom-connector\\",\\"connectionName\\":\\"test-custom-connector\\",\\"id\\":\\"/subscr\ +iptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-conn\ +ector\\"}}}}" --name "test-workflow" """ helps['logic workflow update'] = """ type: command - short-summary: Updates a workflow. + short-summary: "Updates a workflow." examples: - name: Patch a workflow text: |- - az logic workflow update --resource-group "test_resource_group" --definition workflow.json --name "test_workflow" + az logic workflow update --resource-group "test-resource-group" --name "test-workflow" """ helps['logic workflow delete'] = """ type: command - short-summary: Deletes a workflow. + short-summary: "Deletes a workflow." examples: - name: Delete a workflow text: |- - az logic workflow delete --resource-group "test_resource_group" --name "test_workflow" + az logic workflow delete --resource-group "test-resource-group" --name "test-workflow" +""" + +helps['logic workflow disable'] = """ + type: command + short-summary: "Disables a workflow." + examples: + - name: Disable a workflow + text: |- + az logic workflow disable --resource-group "test-resource-group" --name "test-workflow" +""" + +helps['logic workflow enable'] = """ + type: command + short-summary: "Enables a workflow." + examples: + - name: Enable a workflow + text: |- + az logic workflow enable --resource-group "test-resource-group" --name "test-workflow" +""" + +helps['logic workflow generate-upgraded-definition'] = """ + type: command + short-summary: "Generates the upgraded definition for a workflow." + examples: + - name: Generate an upgraded definition + text: |- + az logic workflow generate-upgraded-definition --target-schema-version "2016-06-01" --resource-group \ +"test-resource-group" --name "test-workflow" +""" + +helps['logic workflow list-callback-url'] = """ + type: command + short-summary: "Get the workflow callback Url." + examples: + - name: Get callback url + text: |- + az logic workflow list-callback-url --key-type "Primary" --not-after "2018-04-19T16:00:00Z" \ +--resource-group "testResourceGroup" --name "testWorkflow" +""" + +helps['logic workflow list-swagger'] = """ + type: command + short-summary: "Gets an OpenAPI definition for the workflow." + examples: + - name: Get the swagger for a workflow + text: |- + az logic workflow list-swagger --resource-group "testResourceGroup" --name "testWorkflowName" +""" + +helps['logic workflow move'] = """ + type: command + short-summary: "Moves an existing workflow." + examples: + - name: Move a workflow + text: |- + az logic workflow move --id "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/newResour\ +ceGroup/providers/Microsoft.Logic/workflows/newWorkflowName" --resource-group "testResourceGroup" --name \ +"testWorkflow" +""" + +helps['logic workflow regenerate-access-key'] = """ + type: command + short-summary: "Regenerates the callback URL access key for request triggers." + examples: + - name: Regenerate the callback URL access key for request triggers + text: |- + az logic workflow regenerate-access-key --key-type "Primary" --resource-group "testResourceGroup" \ +--name "testWorkflowName" +""" + +helps['logic workflow validate-by-location'] = """ + type: command + short-summary: "Validates the workflow definition." + parameters: + - name: --workflow + short-summary: "The workflow endpoints." + long-summary: | + Usage: --workflow outgoing-ip-addresses=XX access-endpoint-ip-addresses=XX + + outgoing-ip-addresses: The outgoing ip address. + access-endpoint-ip-addresses: The access endpoint ip address. + - name: --connector + short-summary: "The connector endpoints." + long-summary: | + Usage: --connector outgoing-ip-addresses=XX access-endpoint-ip-addresses=XX + + outgoing-ip-addresses: The outgoing ip address. + access-endpoint-ip-addresses: The access endpoint ip address. + examples: + - name: Validate a workflow + text: |- + az logic workflow validate-by-location --location "brazilsouth" --resource-group "test-resource-group" \ +--resource-location "brazilsouth" --definition "{\\"$schema\\":\\"https://schema.management.azure.com/providers/Microso\ +ft.Logic/schemas/2016-06-01/workflowdefinition.json#\\",\\"actions\\":{},\\"contentVersion\\":\\"1.0.0.0\\",\\"outputs\ +\\":{},\\"parameters\\":{},\\"triggers\\":{}}" --resource-reference-id "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69a\ +b345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account" --name \ +"test-workflow" +""" + +helps['logic workflow validate-by-resource-group'] = """ + type: command + short-summary: "Validates the workflow." + parameters: + - name: --workflow + short-summary: "The workflow endpoints." + long-summary: | + Usage: --workflow outgoing-ip-addresses=XX access-endpoint-ip-addresses=XX + + outgoing-ip-addresses: The outgoing ip address. + access-endpoint-ip-addresses: The access endpoint ip address. + - name: --connector + short-summary: "The connector endpoints." + long-summary: | + Usage: --connector outgoing-ip-addresses=XX access-endpoint-ip-addresses=XX + + outgoing-ip-addresses: The outgoing ip address. + access-endpoint-ip-addresses: The access endpoint ip address. + examples: + - name: Validate a workflow + text: |- + az logic workflow validate-by-resource-group --resource-group "test-resource-group" --location \ +"brazilsouth" --definition "{\\"$schema\\":\\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/201\ +6-06-01/workflowdefinition.json#\\",\\"actions\\":{},\\"contentVersion\\":\\"1.0.0.0\\",\\"outputs\\":{},\\"parameters\ +\\":{},\\"triggers\\":{}}" --resource-reference-id "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/\ +test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account" --name "test-workflow" +""" + +helps['logic workflow wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the logic workflow is met. + examples: + - name: Pause executing next line of CLI script until the logic workflow is successfully created. + text: |- + az logic workflow wait --resource-group "test-resource-group" --name "test-workflow" --created +""" + +helps['logic workflow-version'] = """ + type: group + short-summary: Manage workflow version with logic +""" + +helps['logic workflow-version list'] = """ + type: command + short-summary: "Gets a list of workflow versions." + examples: + - name: List a workflows versions + text: |- + az logic workflow-version list --resource-group "test-resource-group" --workflow-name "test-workflow" +""" + +helps['logic workflow-version show'] = """ + type: command + short-summary: "Gets a workflow version." + examples: + - name: Get a workflow version + text: |- + az logic workflow-version show --resource-group "test-resource-group" --version-id \ +"08586676824806722526" --workflow-name "test-workflow" +""" + +helps['logic workflow-trigger'] = """ + type: group + short-summary: Manage workflow trigger with logic +""" + +helps['logic workflow-trigger list'] = """ + type: command + short-summary: "Gets a list of workflow triggers." + examples: + - name: List workflow triggers + text: |- + az logic workflow-trigger list --resource-group "test-resource-group" --workflow-name "test-workflow" +""" + +helps['logic workflow-trigger show'] = """ + type: command + short-summary: "Gets a workflow trigger." + examples: + - name: Get a workflow trigger + text: |- + az logic workflow-trigger show --resource-group "test-resource-group" --trigger-name "manual" \ +--workflow-name "test-workflow" +""" + +helps['logic workflow-trigger list-callback-url'] = """ + type: command + short-summary: "Get the callback URL for a workflow trigger." + examples: + - name: Get the callback URL for a trigger + text: |- + az logic workflow-trigger list-callback-url --resource-group "test-resource-group" --trigger-name \ +"manual" --workflow-name "test-workflow" +""" + +helps['logic workflow-trigger reset'] = """ + type: command + short-summary: "Resets a workflow trigger." + examples: + - name: Reset trigger + text: |- + az logic workflow-trigger reset --resource-group "testResourceGroup" --trigger-name "testTrigger" \ +--workflow-name "testWorkflow" +""" + +helps['logic workflow-trigger run'] = """ + type: command + short-summary: "Runs a workflow trigger." + examples: + - name: Run a workflow trigger + text: |- + az logic workflow-trigger run --resource-group "test-resource-group" --trigger-name "manual" \ +--workflow-name "test-workflow" +""" + +helps['logic workflow-trigger set-state'] = """ + type: command + short-summary: "Sets the state of a workflow trigger." + parameters: + - name: --source + short-summary: "The source." + long-summary: | + Usage: --source flow-name=XX trigger-name=XX id=XX + + flow-name: The workflow name. + trigger-name: The workflow trigger name. + id: The resource id. + examples: + - name: Set trigger state + text: |- + az logic workflow-trigger set-state --resource-group "testResourceGroup" --source \ +id="subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/sourceResGroup/providers/Microsoft.Logic/workflow\ +s/sourceWorkflow/triggers/sourceTrigger" --trigger-name "testTrigger" --workflow-name "testWorkflow" +""" + +helps['logic workflow-trigger show-schema-json'] = """ + type: command + short-summary: "Get the trigger schema as JSON." + examples: + - name: Get trigger schema + text: |- + az logic workflow-trigger show-schema-json --resource-group "testResourceGroup" --trigger-name \ +"testTrigger" --workflow-name "testWorkflow" +""" + +helps['logic workflow-version-trigger'] = """ + type: group + short-summary: Manage workflow version trigger with logic +""" + +helps['logic workflow-version-trigger list-callback-url'] = """ + type: command + short-summary: "Get the callback url for a trigger of a workflow version." + examples: + - name: Get the callback url for a trigger of a workflow version + text: |- + az logic workflow-version-trigger list-callback-url --key-type "Primary" --not-after \ +"2017-03-05T08:00:00Z" --resource-group "testResourceGroup" --trigger-name "testTriggerName" --version-id \ +"testWorkflowVersionId" --workflow-name "testWorkflowName" +""" + +helps['logic workflow-trigger-history'] = """ + type: group + short-summary: Manage workflow trigger history with logic +""" + +helps['logic workflow-trigger-history list'] = """ + type: command + short-summary: "Gets a list of workflow trigger histories." + examples: + - name: List a workflow trigger history + text: |- + az logic workflow-trigger-history list --resource-group "testResourceGroup" --trigger-name \ +"testTriggerName" --workflow-name "testWorkflowName" +""" + +helps['logic workflow-trigger-history show'] = """ + type: command + short-summary: "Gets a workflow trigger history." + examples: + - name: Get a workflow trigger history + text: |- + az logic workflow-trigger-history show --history-name "08586676746934337772206998657CU22" \ +--resource-group "testResourceGroup" --trigger-name "testTriggerName" --workflow-name "testWorkflowName" +""" + +helps['logic workflow-trigger-history resubmit'] = """ + type: command + short-summary: "Resubmits a workflow run based on the trigger history." + examples: + - name: Resubmit a workflow run based on the trigger history + text: |- + az logic workflow-trigger-history resubmit --history-name "testHistoryName" --resource-group \ +"testResourceGroup" --trigger-name "testTriggerName" --workflow-name "testWorkflowName" +""" + +helps['logic workflow-run'] = """ + type: group + short-summary: Manage workflow run with logic +""" + +helps['logic workflow-run list'] = """ + type: command + short-summary: "Gets a list of workflow runs." + examples: + - name: List workflow runs + text: |- + az logic workflow-run list --resource-group "test-resource-group" --workflow-name "test-workflow" +""" + +helps['logic workflow-run show'] = """ + type: command + short-summary: "Gets a workflow run." + examples: + - name: Get a run for a workflow + text: |- + az logic workflow-run show --resource-group "test-resource-group" --run-name \ +"08586676746934337772206998657CU22" --workflow-name "test-workflow" +""" + +helps['logic workflow-run cancel'] = """ + type: command + short-summary: "Cancels a workflow run." + examples: + - name: Cancel a workflow run + text: |- + az logic workflow-run cancel --resource-group "test-resource-group" --run-name \ +"08586676746934337772206998657CU22" --workflow-name "test-workflow" +""" + +helps['logic workflow-run-action'] = """ + type: group + short-summary: Manage workflow run action with logic +""" + +helps['logic workflow-run-action list'] = """ + type: command + short-summary: "Gets a list of workflow run actions." + examples: + - name: List a workflow run actions + text: |- + az logic workflow-run-action list --resource-group "test-resource-group" --run-name \ +"08586676746934337772206998657CU22" --workflow-name "test-workflow" +""" + +helps['logic workflow-run-action show'] = """ + type: command + short-summary: "Gets a workflow run action." + examples: + - name: Get a workflow run action + text: |- + az logic workflow-run-action show --action-name "HTTP" --resource-group "test-resource-group" \ +--run-name "08586676746934337772206998657CU22" --workflow-name "test-workflow" +""" + +helps['logic workflow-run-action list-expression-trace'] = """ + type: command + short-summary: "Lists a workflow run expression trace." + examples: + - name: List expression traces + text: |- + az logic workflow-run-action list-expression-trace --action-name "testAction" --resource-group \ +"testResourceGroup" --run-name "08586776228332053161046300351" --workflow-name "testFlow" +""" + +helps['logic workflow-run-action-repetition'] = """ + type: group + short-summary: Manage workflow run action repetition with logic +""" + +helps['logic workflow-run-action-repetition list'] = """ + type: command + short-summary: "Get all of a workflow run action repetitions." + examples: + - name: List repetitions + text: |- + az logic workflow-run-action-repetition list --action-name "testAction" --resource-group \ +"testResourceGroup" --run-name "08586776228332053161046300351" --workflow-name "testFlow" +""" + +helps['logic workflow-run-action-repetition show'] = """ + type: command + short-summary: "Get a workflow run action repetition." + examples: + - name: Get a repetition + text: |- + az logic workflow-run-action-repetition show --action-name "testAction" --repetition-name "000001" \ +--resource-group "testResourceGroup" --run-name "08586776228332053161046300351" --workflow-name "testFlow" +""" + +helps['logic workflow-run-action-repetition list-expression-trace'] = """ + type: command + short-summary: "Lists a workflow run expression trace." + examples: + - name: List expression traces for a repetition + text: |- + az logic workflow-run-action-repetition list-expression-trace --action-name "testAction" \ +--repetition-name "000001" --resource-group "testResourceGroup" --run-name "08586776228332053161046300351" \ +--workflow-name "testFlow" +""" + +helps['logic workflow-run-action-repetition-request-history'] = """ + type: group + short-summary: Manage workflow run action repetition request history with logic +""" + +helps['logic workflow-run-action-repetition-request-history list'] = """ + type: command + short-summary: "List a workflow run repetition request history." + examples: + - name: List repetition request history + text: |- + az logic workflow-run-action-repetition-request-history list --action-name "HTTP_Webhook" \ +--repetition-name "000001" --resource-group "test-resource-group" --run-name "08586776228332053161046300351" \ +--workflow-name "test-workflow" +""" + +helps['logic workflow-run-action-repetition-request-history show'] = """ + type: command + short-summary: "Gets a workflow run repetition request history." + examples: + - name: Get a repetition request history + text: |- + az logic workflow-run-action-repetition-request-history show --action-name "HTTP_Webhook" \ +--repetition-name "000001" --request-history-name "08586611142732800686" --resource-group "test-resource-group" \ +--run-name "08586776228332053161046300351" --workflow-name "test-workflow" +""" + +helps['logic workflow-run-action-request-history'] = """ + type: group + short-summary: Manage workflow run action request history with logic +""" + +helps['logic workflow-run-action-request-history list'] = """ + type: command + short-summary: "List a workflow run request history." + examples: + - name: List a request history + text: |- + az logic workflow-run-action-request-history list --action-name "HTTP_Webhook" --resource-group \ +"test-resource-group" --run-name "08586776228332053161046300351" --workflow-name "test-workflow" +""" + +helps['logic workflow-run-action-request-history show'] = """ + type: command + short-summary: "Gets a workflow run request history." + examples: + - name: Get a request history + text: |- + az logic workflow-run-action-request-history show --action-name "HTTP_Webhook" --request-history-name \ +"08586611142732800686" --resource-group "test-resource-group" --run-name "08586776228332053161046300351" \ +--workflow-name "test-workflow" +""" + +helps['logic workflow-run-action-scope-repetition'] = """ + type: group + short-summary: Manage workflow run action scope repetition with logic +""" + +helps['logic workflow-run-action-scope-repetition list'] = """ + type: command + short-summary: "List the workflow run action scoped repetitions." + examples: + - name: List the scoped repetitions + text: |- + az logic workflow-run-action-scope-repetition list --action-name "for_each" --resource-group \ +"testResourceGroup" --run-name "08586776228332053161046300351" --workflow-name "testFlow" +""" + +helps['logic workflow-run-action-scope-repetition show'] = """ + type: command + short-summary: "Get a workflow run action scoped repetition." + examples: + - name: Get a scoped repetition + text: |- + az logic workflow-run-action-scope-repetition show --action-name "for_each" --repetition-name "000000" \ +--resource-group "testResourceGroup" --run-name "08586776228332053161046300351" --workflow-name "testFlow" +""" + +helps['logic workflow-run-operation'] = """ + type: group + short-summary: Manage workflow run operation with logic +""" + +helps['logic workflow-run-operation show'] = """ + type: command + short-summary: "Gets an operation for a run." + examples: + - name: Get a run operation + text: |- + az logic workflow-run-operation show --operation-id "ebdcbbde-c4db-43ec-987c-fd0f7726f43b" \ +--resource-group "testResourceGroup" --run-name "08586774142730039209110422528" --workflow-name "testFlow" """ helps['logic integration-account'] = """ type: group - short-summary: logic integration-account + short-summary: Manage integration account with logic """ helps['logic integration-account list'] = """ type: command - short-summary: Gets a list of integration accounts by subscription. + short-summary: "Gets a list of integration accounts by resource group. And Gets a list of integration accounts by \ +subscription." examples: - name: List integration accounts by resource group name text: |- - az logic integration-account list --resource-group "test_resource_group" + az logic integration-account list --resource-group "testResourceGroup" + - name: List integration accounts by subscription + text: |- + az logic integration-account list """ helps['logic integration-account show'] = """ type: command - short-summary: Gets an integration account. + short-summary: "Gets an integration account." examples: - name: Get integration account by name text: |- - az logic integration-account show --name "test_integration_account" --resource-group "test_resource_group" + az logic integration-account show --name "testIntegrationAccount" --resource-group "testResourceGroup" """ helps['logic integration-account create'] = """ type: command - short-summary: Creates or updates an integration account. + short-summary: "Create an integration account." + parameters: + - name: --sku + short-summary: "The sku." + long-summary: | + Usage: --sku name=XX capacity=XX + + name: The sku name. + capacity: The sku capacity. examples: - name: Create or update an integration account text: |- - az logic integration-account create --location "centralus" --sku name=Standard --name "test_integration_account" --resource-group "test_resource_group" + az logic integration-account create --location "westus" --sku name="Standard" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" """ helps['logic integration-account update'] = """ type: command - short-summary: Updates an integration account. + short-summary: "Updates an integration account." + parameters: + - name: --sku + short-summary: "The sku." + long-summary: | + Usage: --sku name=XX capacity=XX + + name: The sku name. + capacity: The sku capacity. examples: - name: Patch an integration account text: |- - az logic integration-account update --sku name=Basic --tag atag=123 --name "test_integration_account" --resource-group "test_resource_group" + az logic integration-account update --location "westus" --sku name="Standard" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account delete'] = """ + type: command + short-summary: "Deletes an integration account." + examples: + - name: Delete an integration account + text: |- + az logic integration-account delete --name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +""" + +helps['logic integration-account list-callback-url'] = """ + type: command + short-summary: "Gets the integration account callback URL." + examples: + - name: List IntegrationAccount callback URL + text: |- + az logic integration-account list-callback-url --name "testIntegrationAccount" --key-type "Primary" \ +--not-after "2017-03-05T08:00:00Z" --resource-group "testResourceGroup" """ +helps['logic integration-account list-key-vault-key'] = """ + type: command + short-summary: "Gets the integration account's Key Vault keys." + examples: + - name: Get Integration Account callback URL + text: |- + az logic integration-account list-key-vault-key --name "testIntegrationAccount" --id \ +"subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testResourceGroup/providers/Microsoft.KeyVault/vault\ +s/testKeyVault" --skip-token "testSkipToken" --resource-group "testResourceGroup" +""" -helps['logic integration-account import'] = """ +helps['logic integration-account log-tracking-event'] = """ type: command - short-summary: Import an integration account from a JSON file. + short-summary: "Logs the integration account's tracking events." examples: - - name: Import an integration account. + - name: Log a tracked event text: |- - az logic integration-account import --name "test_integration_account" --resource-group "test_resource_group" --input-path "integration.json" + az logic integration-account log-tracking-event --name "testIntegrationAccount" --events \ +"[{\\"error\\":{\\"code\\":\\"NotFound\\",\\"message\\":\\"Some error occurred\\"},\\"eventLevel\\":\\"Informational\\"\ +,\\"eventTime\\":\\"2016-08-05T01:54:49.505567Z\\",\\"record\\":{\\"agreementProperties\\":{\\"agreementName\\":\\"test\ +Agreement\\",\\"as2From\\":\\"testas2from\\",\\"as2To\\":\\"testas2to\\",\\"receiverPartnerName\\":\\"testPartner2\\",\ +\\"senderPartnerName\\":\\"testPartner1\\"},\\"messageProperties\\":{\\"IsMessageEncrypted\\":false,\\"IsMessageSigned\ +\\":false,\\"correlationMessageId\\":\\"Unique message identifier\\",\\"direction\\":\\"Receive\\",\\"dispositionType\\\ +":\\"received-success\\",\\"fileName\\":\\"test\\",\\"isMdnExpected\\":true,\\"isMessageCompressed\\":false,\\"isMessag\ +eFailed\\":false,\\"isNrrEnabled\\":true,\\"mdnType\\":\\"Async\\",\\"messageId\\":\\"12345\\"}},\\"recordType\\":\\"AS\ +2Message\\"}]" --source-type "Microsoft.Logic/workflows" --resource-group "testResourceGroup" """ -helps['logic integration-account delete'] = """ +helps['logic integration-account regenerate-access-key'] = """ type: command - short-summary: Deletes an integration account. + short-summary: "Regenerates the integration account access key." examples: - - name: Delete an integration account + - name: Regenerate access key + text: |- + az logic integration-account regenerate-access-key --name "testIntegrationAccount" --key-type "Primary" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-assembly'] = """ + type: group + short-summary: Manage integration account assembly with logic +""" + +helps['logic integration-account-assembly list'] = """ + type: command + short-summary: "List the assemblies for an integration account." + examples: + - name: List integration account assemblies + text: |- + az logic integration-account-assembly list --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-assembly show'] = """ + type: command + short-summary: "Get an assembly for an integration account." + examples: + - name: Get an integration account assembly + text: |- + az logic integration-account-assembly show --assembly-artifact-name "testAssembly" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-assembly create'] = """ + type: command + short-summary: "Create an assembly for an integration account." + parameters: + - name: --properties + short-summary: "The assembly properties." + long-summary: | + Usage: --properties assembly-name=XX assembly-version=XX assembly-culture=XX assembly-public-key-token=XX \ +content=XX content-type=XX content-link=XX created-time=XX changed-time=XX metadata=XX + + assembly-name: Required. The assembly name. + assembly-version: The assembly version. + assembly-culture: The assembly culture. + assembly-public-key-token: The assembly public key token. + content: Any object + content-type: The content type. + content-link: The content link. + created-time: The artifact creation time. + changed-time: The artifact changed time. + metadata: Any object + examples: + - name: Create or update an account assembly + text: |- + az logic integration-account-assembly create --location "westus" --properties \ +assembly-name="System.IdentityModel.Tokens.Jwt" content="Base64 encoded Assembly Content" metadata={} \ +--assembly-artifact-name "testAssembly" --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +""" + +helps['logic integration-account-assembly update'] = """ + type: command + short-summary: "Update an assembly for an integration account." + parameters: + - name: --properties + short-summary: "The assembly properties." + long-summary: | + Usage: --properties assembly-name=XX assembly-version=XX assembly-culture=XX assembly-public-key-token=XX \ +content=XX content-type=XX content-link=XX created-time=XX changed-time=XX metadata=XX + + assembly-name: Required. The assembly name. + assembly-version: The assembly version. + assembly-culture: The assembly culture. + assembly-public-key-token: The assembly public key token. + content: Any object + content-type: The content type. + content-link: The content link. + created-time: The artifact creation time. + changed-time: The artifact changed time. + metadata: Any object +""" + +helps['logic integration-account-assembly delete'] = """ + type: command + short-summary: "Delete an assembly for an integration account." + examples: + - name: Delete an integration account assembly + text: |- + az logic integration-account-assembly delete --assembly-artifact-name "testAssembly" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-assembly list-content-callback-url'] = """ + type: command + short-summary: "Get the content callback url for an integration account assembly." + examples: + - name: Get the callback url for an integration account assembly + text: |- + az logic integration-account-assembly list-content-callback-url --assembly-artifact-name "testAssembly" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-batch-configuration'] = """ + type: group + short-summary: Manage integration account batch configuration with logic +""" + +helps['logic integration-account-batch-configuration list'] = """ + type: command + short-summary: "List the batch configurations for an integration account." + examples: + - name: List batch configurations + text: |- + az logic integration-account-batch-configuration list --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-batch-configuration show'] = """ + type: command + short-summary: "Get a batch configuration for an integration account." + examples: + - name: Get a batch configuration + text: |- + az logic integration-account-batch-configuration show --batch-configuration-name \ +"testBatchConfiguration" --integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-batch-configuration create'] = """ + type: command + short-summary: "Create a batch configuration for an integration account." + parameters: + - name: --monthly-occurrences + short-summary: "The monthly occurrences." + long-summary: | + Usage: --monthly-occurrences day=XX occurrence=XX + + day: The day of the week. + occurrence: The occurrence. + + Multiple actions can be specified by using more than one --monthly-occurrences argument. + examples: + - name: Create or update a batch configuration + text: |- + az logic integration-account-batch-configuration create --location "westus" --batch-group-name \ +"DEFAULT" --batch-size 234567 --message-count 10 --frequency "Minute" --interval 1 --start-time "2017-03-24T11:43:00" \ +--time-zone "India Standard Time" --batch-configuration-name "testBatchConfiguration" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-batch-configuration update'] = """ + type: command + short-summary: "Update a batch configuration for an integration account." + parameters: + - name: --monthly-occurrences + short-summary: "The monthly occurrences." + long-summary: | + Usage: --monthly-occurrences day=XX occurrence=XX + + day: The day of the week. + occurrence: The occurrence. + + Multiple actions can be specified by using more than one --monthly-occurrences argument. +""" + +helps['logic integration-account-batch-configuration delete'] = """ + type: command + short-summary: "Delete a batch configuration for an integration account." + examples: + - name: Delete a batch configuration + text: |- + az logic integration-account-batch-configuration delete --batch-configuration-name \ +"testBatchConfiguration" --integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-schema'] = """ + type: group + short-summary: Manage integration account schema with logic +""" + +helps['logic integration-account-schema list'] = """ + type: command + short-summary: "Gets a list of integration account schemas." + examples: + - name: Get schemas by integration account name + text: |- + az logic integration-account-schema list --integration-account-name "" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-schema show'] = """ + type: command + short-summary: "Gets an integration account schema." + examples: + - name: Get schema by name + text: |- + az logic integration-account-schema show --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" --schema-name "testSchema" +""" + +helps['logic integration-account-schema create'] = """ + type: command + short-summary: "Create an integration account schema." + examples: + - name: Create or update schema + text: |- + az logic integration-account-schema create --location "westus" --content "\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n" --properties-content-type "application/xml" --metadata "{}" \ +--schema-type "Xml" --tags integrationAccountSchemaName="IntegrationAccountSchema8120" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" --schema-name "testSchema" +""" + +helps['logic integration-account-schema update'] = """ + type: command + short-summary: "Update an integration account schema." +""" + +helps['logic integration-account-schema delete'] = """ + type: command + short-summary: "Deletes an integration account schema." + examples: + - name: Delete a schema by name + text: |- + az logic integration-account-schema delete --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" --schema-name "testSchema" +""" + +helps['logic integration-account-schema list-content-callback-url'] = """ + type: command + short-summary: "Get the content callback url." + examples: + - name: Get the content callback url + text: |- + az logic integration-account-schema list-content-callback-url --integration-account-name \ +"testIntegrationAccount" --key-type "Primary" --not-after "2018-04-19T16:00:00Z" --resource-group "testResourceGroup" \ +--schema-name "testSchema" +""" + +helps['logic integration-account-map'] = """ + type: group + short-summary: Manage integration account map with logic +""" + +helps['logic integration-account-map list'] = """ + type: command + short-summary: "Gets a list of integration account maps." + examples: + - name: Get maps by integration account name + text: |- + az logic integration-account-map list --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-map show'] = """ + type: command + short-summary: "Gets an integration account map." + examples: + - name: Get map by name + text: |- + az logic integration-account-map show --integration-account-name "testIntegrationAccount" --map-name \ +"testMap" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-map create'] = """ + type: command + short-summary: "Create an integration account map." + examples: + - name: Create or update a map + text: |- + az logic integration-account-map create --integration-account-name "testIntegrationAccount" --location \ +"westus" --content "\\r\\n\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \ +\\r\\n \ +\\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n" --properties-content-type "application/xml" --map-type "Xslt" --metadata "{}" \ +--map-name "testMap" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-map update'] = """ + type: command + short-summary: "Update an integration account map." +""" + +helps['logic integration-account-map delete'] = """ + type: command + short-summary: "Deletes an integration account map." + examples: + - name: Delete a map + text: |- + az logic integration-account-map delete --integration-account-name "testIntegrationAccount" --map-name \ +"testMap" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-map list-content-callback-url'] = """ + type: command + short-summary: "Get the content callback url." + examples: + - name: Get the content callback url + text: |- + az logic integration-account-map list-content-callback-url --integration-account-name \ +"testIntegrationAccount" --key-type "Primary" --not-after "2018-04-19T16:00:00Z" --map-name "testMap" --resource-group \ +"testResourceGroup" +""" + +helps['logic integration-account-partner'] = """ + type: group + short-summary: Manage integration account partner with logic +""" + +helps['logic integration-account-partner list'] = """ + type: command + short-summary: "Gets a list of integration account partners." + examples: + - name: Get partners by integration account name + text: |- + az logic integration-account-partner list --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-partner show'] = """ + type: command + short-summary: "Gets an integration account partner." + examples: + - name: Get partner by name + text: |- + az logic integration-account-partner show --integration-account-name "testIntegrationAccount" \ +--partner-name "testPartner" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-partner create'] = """ + type: command + short-summary: "Create an integration account partner." + parameters: + - name: --business-identities + short-summary: "The list of partner business identities." + long-summary: | + Usage: --business-identities qualifier=XX value=XX + + qualifier: Required. The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + value: Required. The user defined business identity value. + + Multiple actions can be specified by using more than one --business-identities argument. + examples: + - name: Create or update a partner + text: |- + az logic integration-account-partner create --integration-account-name "testIntegrationAccount" \ +--location "westus" --business-identities qualifier="AA" value="ZZ" --metadata "{}" --partner-type "B2B" \ +--partner-name "testPartner" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-partner update'] = """ + type: command + short-summary: "Update an integration account partner." + parameters: + - name: --business-identities + short-summary: "The list of partner business identities." + long-summary: | + Usage: --business-identities qualifier=XX value=XX + + qualifier: Required. The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + value: Required. The user defined business identity value. + + Multiple actions can be specified by using more than one --business-identities argument. +""" + +helps['logic integration-account-partner delete'] = """ + type: command + short-summary: "Deletes an integration account partner." + examples: + - name: Delete a partner + text: |- + az logic integration-account-partner delete --integration-account-name "testIntegrationAccount" \ +--partner-name "testPartner" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-partner list-content-callback-url'] = """ + type: command + short-summary: "Get the content callback url." + examples: + - name: Get the content callback url + text: |- + az logic integration-account-partner list-content-callback-url --integration-account-name \ +"testIntegrationAccount" --key-type "Primary" --not-after "2018-04-19T16:00:00Z" --partner-name "testPartner" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-agreement'] = """ + type: group + short-summary: Manage integration account agreement with logic +""" + +helps['logic integration-account-agreement list'] = """ + type: command + short-summary: "Gets a list of integration account agreements." + examples: + - name: Get agreements by integration account name + text: |- + az logic integration-account-agreement list --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-agreement show'] = """ + type: command + short-summary: "Gets an integration account agreement." + examples: + - name: Get agreement by name + text: |- + az logic integration-account-agreement show --agreement-name "testAgreement" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-agreement create'] = """ + type: command + short-summary: "Create an integration account agreement." + examples: + - name: Create or update an agreement + text: |- + az logic integration-account-agreement create --agreement "{\\"location\\":\\"westus\\",\\"tags\\":{\\"I\ +ntegrationAccountAgreement\\":\\"\\"},\\"metadata\\":{},\\"agreementType\\":\\"AS2\\",\ +\\"hostPartner\\":\\"HostPartner\\",\\"guestPartner\\":\\"GuestPartner\\",\\"hostIdentity\\":{\\"qualifier\\":\\"ZZ\\",\ +\\"value\\":\\"ZZ\\"},\\"guestIdentity\\":{\\"qualifier\\":\\"AA\\",\\"value\\":\\"AA\\"},\\"content\\":{\\"aS2\\":{\\"\ +receiveAgreement\\":{\\"protocolSettings\\":{\\"acknowledgementConnectionSettings\\":{\\"ignoreCertificateNameMismatch\ +\\":true,\\"keepHttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true},\\"e\ +nvelopeSettings\\":{\\"autogenerateFileName\\":true,\\"fileNameTemplate\\":\\"Test\\",\\"messageContentType\\":\\"text/\ +plain\\",\\"suspendMessageOnFileNameGenerationError\\":true,\\"transmitFileNameInMimeHeader\\":true},\\"errorSettings\\\ +":{\\"resendIfMDNNotReceived\\":true,\\"suspendDuplicateMessage\\":true},\\"mdnSettings\\":{\\"dispositionNotificationT\ +o\\":\\"http://tempuri.org\\",\\"mdnText\\":\\"Sample\\",\\"micHashingAlgorithm\\":\\"SHA1\\",\\"needMDN\\":true,\\"rec\ +eiptDeliveryUrl\\":\\"http://tempuri.org\\",\\"sendInboundMDNToMessageBox\\":true,\\"sendMDNAsynchronously\\":true,\\"s\ +ignMDN\\":true,\\"signOutboundMDNIfOptional\\":true},\\"messageConnectionSettings\\":{\\"ignoreCertificateNameMismatch\ +\\":true,\\"keepHttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true},\\"s\ +ecuritySettings\\":{\\"enableNRRForInboundDecodedMessages\\":true,\\"enableNRRForInboundEncodedMessages\\":true,\\"enab\ +leNRRForInboundMDN\\":true,\\"enableNRRForOutboundDecodedMessages\\":true,\\"enableNRRForOutboundEncodedMessages\\":tru\ +e,\\"enableNRRForOutboundMDN\\":true,\\"overrideGroupSigningCertificate\\":false},\\"validationSettings\\":{\\"checkCer\ +tificateRevocationListOnReceive\\":true,\\"checkCertificateRevocationListOnSend\\":true,\\"checkDuplicateMessage\\":tru\ +e,\\"compressMessage\\":true,\\"encryptMessage\\":false,\\"encryptionAlgorithm\\":\\"AES128\\",\\"interchangeDuplicates\ +ValidityDays\\":100,\\"overrideMessageProperties\\":true,\\"signMessage\\":false}},\\"receiverBusinessIdentity\\":{\\"q\ +ualifier\\":\\"ZZ\\",\\"value\\":\\"ZZ\\"},\\"senderBusinessIdentity\\":{\\"qualifier\\":\\"AA\\",\\"value\\":\\"AA\\"}\ +},\\"sendAgreement\\":{\\"protocolSettings\\":{\\"acknowledgementConnectionSettings\\":{\\"ignoreCertificateNameMismatc\ +h\\":true,\\"keepHttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true},\\"\ +envelopeSettings\\":{\\"autogenerateFileName\\":true,\\"fileNameTemplate\\":\\"Test\\",\\"messageContentType\\":\\"text\ +/plain\\",\\"suspendMessageOnFileNameGenerationError\\":true,\\"transmitFileNameInMimeHeader\\":true},\\"errorSettings\ +\\":{\\"resendIfMDNNotReceived\\":true,\\"suspendDuplicateMessage\\":true},\\"mdnSettings\\":{\\"dispositionNotificatio\ +nTo\\":\\"http://tempuri.org\\",\\"mdnText\\":\\"Sample\\",\\"micHashingAlgorithm\\":\\"SHA1\\",\\"needMDN\\":true,\\"r\ +eceiptDeliveryUrl\\":\\"http://tempuri.org\\",\\"sendInboundMDNToMessageBox\\":true,\\"sendMDNAsynchronously\\":true,\\\ +"signMDN\\":true,\\"signOutboundMDNIfOptional\\":true},\\"messageConnectionSettings\\":{\\"ignoreCertificateNameMismatc\ +h\\":true,\\"keepHttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true},\\"\ +securitySettings\\":{\\"enableNRRForInboundDecodedMessages\\":true,\\"enableNRRForInboundEncodedMessages\\":true,\\"ena\ +bleNRRForInboundMDN\\":true,\\"enableNRRForOutboundDecodedMessages\\":true,\\"enableNRRForOutboundEncodedMessages\\":tr\ +ue,\\"enableNRRForOutboundMDN\\":true,\\"overrideGroupSigningCertificate\\":false},\\"validationSettings\\":{\\"checkCe\ +rtificateRevocationListOnReceive\\":true,\\"checkCertificateRevocationListOnSend\\":true,\\"checkDuplicateMessage\\":tr\ +ue,\\"compressMessage\\":true,\\"encryptMessage\\":false,\\"encryptionAlgorithm\\":\\"AES128\\",\\"interchangeDuplicate\ +sValidityDays\\":100,\\"overrideMessageProperties\\":true,\\"signMessage\\":false}},\\"receiverBusinessIdentity\\":{\\"\ +qualifier\\":\\"AA\\",\\"value\\":\\"AA\\"},\\"senderBusinessIdentity\\":{\\"qualifier\\":\\"ZZ\\",\\"value\\":\\"ZZ\\"\ +}}}}}" --agreement-name "testAgreement" --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +""" + +helps['logic integration-account-agreement update'] = """ + type: command + short-summary: "Update an integration account agreement." +""" + +helps['logic integration-account-agreement delete'] = """ + type: command + short-summary: "Deletes an integration account agreement." + examples: + - name: Delete an agreement + text: |- + az logic integration-account-agreement delete --agreement-name "testAgreement" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-agreement list-content-callback-url'] = """ + type: command + short-summary: "Get the content callback url." + examples: + - name: Get the content callback url + text: |- + az logic integration-account-agreement list-content-callback-url --agreement-name "testAgreement" \ +--integration-account-name "testIntegrationAccount" --key-type "Primary" --not-after "2018-04-19T16:00:00Z" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-certificate'] = """ + type: group + short-summary: Manage integration account certificate with logic +""" + +helps['logic integration-account-certificate list'] = """ + type: command + short-summary: "Gets a list of integration account certificates." + examples: + - name: Get certificates by integration account name + text: |- + az logic integration-account-certificate list --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-certificate show'] = """ + type: command + short-summary: "Gets an integration account certificate." + examples: + - name: Get certificate by name + text: |- + az logic integration-account-certificate show --certificate-name "testCertificate" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-certificate create'] = """ + type: command + short-summary: "Create an integration account certificate." + parameters: + - name: --key-vault + short-summary: "The key vault reference." + long-summary: | + Usage: --key-vault id=XX + + id: The resource id. + examples: + - name: Create or update a certificate + text: |- + az logic integration-account-certificate create --location "brazilsouth" --key-name "" \ +--key-vault id="/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testResourceGroup/providers/microsof\ +t.keyvault/vaults/" --key-version "87d9764197604449b9b8eb7bd8710868" --public-certificate \ +"" --certificate-name "testCertificate" --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-account-certificate update'] = """ + type: command + short-summary: "Update an integration account certificate." + parameters: + - name: --key-vault + short-summary: "The key vault reference." + long-summary: | + Usage: --key-vault id=XX + + id: The resource id. +""" + +helps['logic integration-account-certificate delete'] = """ + type: command + short-summary: "Deletes an integration account certificate." + examples: + - name: Delete a certificate + text: |- + az logic integration-account-certificate delete --certificate-name "testCertificate" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +""" + +helps['logic integration-account-session'] = """ + type: group + short-summary: Manage integration account session with logic +""" + +helps['logic integration-account-session list'] = """ + type: command + short-summary: "Gets a list of integration account sessions." + examples: + - name: List by integration account session examples + text: |- + az logic integration-account-session list --integration-account-name "testia123" --resource-group \ +"testrg123" +""" + +helps['logic integration-account-session show'] = """ + type: command + short-summary: "Gets an integration account session." + examples: + - name: Get integration account session examples + text: |- + az logic integration-account-session show --integration-account-name "testia123" --resource-group \ +"testrg123" --session-name "testsession123-ICN" +""" + +helps['logic integration-account-session create'] = """ + type: command + short-summary: "Create an integration account session." + examples: + - name: Create or update integration account session example + text: |- + az logic integration-account-session create --integration-account-name "testia123" --resource-group \ +"testrg123" --content "{\\"controlNumber\\":\\"1234\\",\\"controlNumberChangedTime\\":\\"2017-02-21T22:30:11.9923759Z\\\ +"}" --session-name "testsession123-ICN" +""" + +helps['logic integration-account-session update'] = """ + type: command + short-summary: "Update an integration account session." +""" + +helps['logic integration-account-session delete'] = """ + type: command + short-summary: "Deletes an integration account session." + examples: + - name: Delete integration account session examples + text: |- + az logic integration-account-session delete --integration-account-name "testia123" --resource-group \ +"testrg123" --session-name "testsession123-ICN" +""" + +helps['logic integration-service-environment'] = """ + type: group + short-summary: Manage integration service environment with logic +""" + +helps['logic integration-service-environment list'] = """ + type: command + short-summary: "Gets a list of integration service environments by resource group. And Gets a list of integration \ +service environments by subscription." + examples: + - name: List integration service environments by resource group name + text: |- + az logic integration-service-environment list --resource-group "testResourceGroup" + - name: List integration service environments by subscription + text: |- + az logic integration-service-environment list +""" + +helps['logic integration-service-environment show'] = """ + type: command + short-summary: "Gets an integration service environment." + examples: + - name: Get integration service environment by name + text: |- + az logic integration-service-environment show --name "testIntegrationServiceEnvironment" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment create'] = """ + type: command + short-summary: "Create an integration service environment." + parameters: + - name: --sku + short-summary: "The sku." + long-summary: | + Usage: --sku name=XX capacity=XX + + name: The sku name. + capacity: The sku capacity. + examples: + - name: Create or update an integration service environment + text: |- + az logic integration-service-environment create --location "brazilsouth" --encryption-configuration \ +"{\\"encryptionKeyReference\\":{\\"keyName\\":\\"testKeyName\\",\\"keyVault\\":{\\"id\\":\\"/subscriptions/f34b22a3-220\ +2-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.KeyVault/vaults/testKeyVault\\"},\\"keyVe\ +rsion\\":\\"13b261d30b984753869902d7f47f4d55\\"}}" --network-configuration "{\\"accessEndpoint\\":{\\"type\\":\\"Intern\ +al\\"},\\"subnets\\":[{\\"id\\":\\"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup\ +/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s1\\"},{\\"id\\":\\"/subscriptions/f34b22a3-2202-4fb1-b04\ +0-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s2\\"},{\\\ +"id\\":\\"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.Netw\ +ork/virtualNetworks/testVNET/subnets/s3\\"},{\\"id\\":\\"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGr\ +oups/testResourceGroup/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s4\\"}]}" --sku name="Premium" \ +capacity=2 --name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment update'] = """ + type: command + short-summary: "Updates an integration service environment." + parameters: + - name: --sku + short-summary: "The sku." + long-summary: | + Usage: --sku name=XX capacity=XX + + name: The sku name. + capacity: The sku capacity. + examples: + - name: Patch an integration service environment + text: |- + az logic integration-service-environment update --sku name="Developer" capacity=0 --tags tag1="value1" \ +--name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment delete'] = """ + type: command + short-summary: "Deletes an integration service environment." + examples: + - name: Delete an integration account + text: |- + az logic integration-service-environment delete --name "testIntegrationServiceEnvironment" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment restart'] = """ + type: command + short-summary: "Restarts an integration service environment." + examples: + - name: Restarts an integration service environment + text: |- + az logic integration-service-environment restart --name "testIntegrationServiceEnvironment" \ +--resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the logic integration-service-environment is \ +met. + examples: + - name: Pause executing next line of CLI script until the logic integration-service-environment is successfully \ +created. + text: |- + az logic integration-service-environment wait --name "testIntegrationServiceEnvironment" \ +--resource-group "testResourceGroup" --created + - name: Pause executing next line of CLI script until the logic integration-service-environment is successfully \ +updated. + text: |- + az logic integration-service-environment wait --name "testIntegrationServiceEnvironment" \ +--resource-group "testResourceGroup" --updated +""" + +helps['logic integration-service-environment-sku'] = """ + type: group + short-summary: Manage integration service environment sku with logic +""" + +helps['logic integration-service-environment-sku list'] = """ + type: command + short-summary: "Gets a list of integration service environment Skus." + examples: + - name: List integration service environment skus + text: |- + az logic integration-service-environment-sku list --integration-service-environment-name \ +"testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment-network-health'] = """ + type: group + short-summary: Manage integration service environment network health with logic +""" + +helps['logic integration-service-environment-network-health show'] = """ + type: command + short-summary: "Gets the integration service environment network health." + examples: + - name: Gets the integration service environment network health + text: |- + az logic integration-service-environment-network-health show --integration-service-environment-name \ +"testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment-managed-api'] = """ + type: group + short-summary: Manage integration service environment managed api with logic +""" + +helps['logic integration-service-environment-managed-api list'] = """ + type: command + short-summary: "Gets the integration service environment managed Apis." + examples: + - name: Gets the integration service environment managed Apis + text: |- + az logic integration-service-environment-managed-api list --integration-service-environment-name \ +"testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment-managed-api show'] = """ + type: command + short-summary: "Gets the integration service environment managed Api." + examples: + - name: Gets the integration service environment managed Apis + text: |- + az logic integration-service-environment-managed-api show --api-name "servicebus" \ +--integration-service-environment-name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment-managed-api delete'] = """ + type: command + short-summary: "Deletes the integration service environment managed Api." + examples: + - name: Deletes the integration service environment managed Apis + text: |- + az logic integration-service-environment-managed-api delete --api-name "servicebus" \ +--integration-service-environment-name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment-managed-api put'] = """ + type: command + short-summary: "Puts the integration service environment managed Api." + examples: + - name: Gets the integration service environment managed Apis + text: |- + az logic integration-service-environment-managed-api put --api-name "servicebus" \ +--integration-service-environment-name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +""" + +helps['logic integration-service-environment-managed-api wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the logic integration-service-environment-mana\ +ged-api is met. + examples: + - name: Pause executing next line of CLI script until the logic integration-service-environment-managed-api is \ +successfully deleted. + text: |- + az logic integration-service-environment-managed-api wait --api-name "servicebus" \ +--integration-service-environment-name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" \ +--deleted + - name: Pause executing next line of CLI script until the logic integration-service-environment-managed-api is \ +successfully created. + text: |- + az logic integration-service-environment-managed-api wait --api-name "servicebus" \ +--integration-service-environment-name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" \ +--created +""" + +helps['logic integration-service-environment-managed-api-operation'] = """ + type: group + short-summary: Manage integration service environment managed api operation with logic +""" + +helps['logic integration-service-environment-managed-api-operation list'] = """ + type: command + short-summary: "Gets the managed Api operations." + examples: + - name: Gets the integration service environment managed Apis text: |- - az logic integration-account delete --name "test_integration_account" --resource-group "test_resource_group" + az logic integration-service-environment-managed-api-operation list --api-name "servicebus" \ +--integration-service-environment-name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" """ diff --git a/src/logic/azext_logic/generated/_params.py b/src/logic/azext_logic/generated/_params.py index d131f6a02a6..790e3836c04 100644 --- a/src/logic/azext_logic/generated/_params.py +++ b/src/logic/azext_logic/generated/_params.py @@ -1,130 +1,996 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- # pylint: disable=too-many-lines # pylint: disable=too-many-statements -from argcomplete.completers import FilesCompleter -from knack.arguments import CLIArgumentType -from azure.cli.core.commands.validators import validate_file_or_dict, get_default_location_from_resource_group from azure.cli.core.commands.parameters import ( tags_type, get_enum_type, resource_group_name_type, get_location_type ) -from azext_logic.action import AddIntegrationAccount, AddIntegrationServiceEnvironment +from azure.cli.core.commands.validators import ( + get_default_location_from_resource_group, + validate_file_or_dict +) +from azext_logic.action import ( + AddWorkflow, + AddSource, + AddResourceTags, + AddSku, + AddProperties, + AddMonthlyOccurrences, + AddBusinessIdentities, + AddKeyVault +) def load_arguments(self, _): with self.argument_context('logic workflow list') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument( - 'top', help='The number of items to be included in the result.') - c.argument('filter', help='The filter to apply on the operation. Options for filters include: State, Trigger, a' - 'nd ReferencedResourceId.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation. Options ' + 'for filters include: State, Trigger, and ReferencedResourceId.') with self.argument_context('logic workflow show') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument('name', options_list=[ - '--name', '-n'], help='The workflow name.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') with self.argument_context('logic workflow create') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument('name', options_list=[ - '--name', '-n'], help='The workflow name.') - c.argument('definition', type=validate_file_or_dict, help='Path to a workflow defintion JSON file (see README.md for more info on this). ' + - 'This JSON format should match what the logic app design tool exports', completer=FilesCompleter()) - c.argument('location', arg_type=get_location_type( - self.cli_ctx), validator=get_default_location_from_resource_group) - c.argument('integration_account', action=AddIntegrationAccount, - nargs='+', help='The integration account.') - c.argument('integration_service_environment', action=AddIntegrationServiceEnvironment, - nargs='+', help='The integration service environment.') - c.argument('endpoints_configuration', arg_type=CLIArgumentType(options_list=['--endpoints-configuration'], - help='The endpoints configuration.')) - c.argument('access_control', arg_type=CLIArgumentType(options_list=['--access-control'], help='The access contr' - 'ol configuration controls access to this workflow. See README.md for more information')) - c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Sus' - 'pended']), help='The state.') - c.argument('tags', tags_type, help='The resource tags.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', + 'Suspended']), help='The state.') + c.argument('definition', type=validate_file_or_dict, help='The definition. Expected value: ' + 'json-string/@json-file.') + c.argument('parameters', type=validate_file_or_dict, help='The parameters. Expected value: ' + 'json-string/@json-file.') + c.argument('id_', options_list=['--id'], type=str, help='The resource id.', arg_group='Integration Service ' + 'Environment') + c.argument('resource_reference_id', type=str, help='The resource id.', arg_group='Integration Account') + c.argument('triggers', type=validate_file_or_dict, help='The access control configuration for invoking ' + 'workflow triggers. Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('contents', type=validate_file_or_dict, help='The access control configuration for accessing ' + 'workflow run contents. Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('actions', type=validate_file_or_dict, help='The access control configuration for workflow actions. ' + 'Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('workflow_management', type=validate_file_or_dict, help='The access control configuration for ' + 'workflow management. Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('properties_endpoints_configuration_workflow', action=AddWorkflow, nargs='+', help='The workflow ' + 'endpoints.', arg_group='Endpoints Configuration') + c.argument('connector', action=AddWorkflow, nargs='+', help='The connector endpoints.', arg_group='Endpoints ' + 'Configuration') with self.argument_context('logic workflow update') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument('name', options_list=[ - '--name', '-n'], help='The workflow name.') - c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Sus' - 'pended']), help='The state.') - c.argument('definition', type=validate_file_or_dict, help='Path to a workflow defintion JSON file (see README.md for more info on this). ' + - 'This JSON format should match what the logic app design tool exports', completer=FilesCompleter()) - c.argument('tags', tags_type, help='The resource tags.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') with self.argument_context('logic workflow delete') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument('name', options_list=[ - '--name', '-n'], help='The workflow name.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') + + with self.argument_context('logic workflow disable') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') + + with self.argument_context('logic workflow enable') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') + + with self.argument_context('logic workflow generate-upgraded-definition') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') + c.argument('target_schema_version', type=str, help='The target schema version.') + + with self.argument_context('logic workflow list-callback-url') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.') + c.argument('not_after', help='The expiry time.') + c.argument('key_type', arg_type=get_enum_type(['NotSpecified', 'Primary', 'Secondary']), help='The key type.') + + with self.argument_context('logic workflow list-swagger') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.') + + with self.argument_context('logic workflow move') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') + c.argument('id_', options_list=['--id'], type=str, help='The resource id.') + + with self.argument_context('logic workflow regenerate-access-key') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') + c.argument('key_type', arg_type=get_enum_type(['NotSpecified', 'Primary', 'Secondary']), help='The key type.') + + with self.argument_context('logic workflow validate-by-location') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group, id_part='name') + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='child_name_1') + c.argument('resource_location', type=str, help='The resource location.', id_part='name') + c.argument('tags', tags_type) + c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', + 'Suspended']), help='The state.') + c.argument('definition', type=validate_file_or_dict, help='The definition. Expected value: ' + 'json-string/@json-file.') + c.argument('parameters', type=validate_file_or_dict, help='The parameters. Expected value: ' + 'json-string/@json-file.') + c.argument('id_', options_list=['--id'], type=str, help='The resource id.', arg_group='Integration Service ' + 'Environment') + c.argument('resource_reference_id', type=str, help='The resource id.', arg_group='Integration Account') + c.argument('triggers', type=validate_file_or_dict, help='The access control configuration for invoking ' + 'workflow triggers. Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('contents', type=validate_file_or_dict, help='The access control configuration for accessing ' + 'workflow run contents. Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('actions', type=validate_file_or_dict, help='The access control configuration for workflow actions. ' + 'Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('workflow_management', type=validate_file_or_dict, help='The access control configuration for ' + 'workflow management. Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('workflow', action=AddWorkflow, nargs='+', help='The workflow endpoints.', arg_group='Endpoints ' + 'Configuration') + c.argument('connector', action=AddWorkflow, nargs='+', help='The connector endpoints.', arg_group='Endpoints ' + 'Configuration') + + with self.argument_context('logic workflow validate-by-resource-group') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', + 'Suspended']), help='The state.') + c.argument('definition', type=validate_file_or_dict, help='The definition. Expected value: ' + 'json-string/@json-file.') + c.argument('parameters', type=validate_file_or_dict, help='The parameters. Expected value: ' + 'json-string/@json-file.') + c.argument('id_', options_list=['--id'], type=str, help='The resource id.', arg_group='Integration Service ' + 'Environment') + c.argument('resource_reference_id', type=str, help='The resource id.', arg_group='Integration Account') + c.argument('triggers', type=validate_file_or_dict, help='The access control configuration for invoking ' + 'workflow triggers. Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('contents', type=validate_file_or_dict, help='The access control configuration for accessing ' + 'workflow run contents. Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('actions', type=validate_file_or_dict, help='The access control configuration for workflow actions. ' + 'Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('workflow_management', type=validate_file_or_dict, help='The access control configuration for ' + 'workflow management. Expected value: json-string/@json-file.', arg_group='Access Control') + c.argument('workflow', action=AddWorkflow, nargs='+', help='The workflow endpoints.', arg_group='Endpoints ' + 'Configuration') + c.argument('connector', action=AddWorkflow, nargs='+', help='The connector endpoints.', arg_group='Endpoints ' + 'Configuration') + + with self.argument_context('logic workflow wait') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', options_list=['--name', '-n', '--workflow-name'], type=str, help='The workflow ' + 'name.', id_part='name') + + with self.argument_context('logic workflow-version list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + + with self.argument_context('logic workflow-version show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('version_id', type=str, help='The workflow versionId.', id_part='child_name_1') + + with self.argument_context('logic workflow-trigger list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation.') + + with self.argument_context('logic workflow-trigger show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('trigger_name', type=str, help='The workflow trigger name.', id_part='child_name_1') + + with self.argument_context('logic workflow-trigger list-callback-url') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('trigger_name', type=str, help='The workflow trigger name.') + + with self.argument_context('logic workflow-trigger reset') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('trigger_name', type=str, help='The workflow trigger name.', id_part='child_name_1') + + with self.argument_context('logic workflow-trigger run') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('trigger_name', type=str, help='The workflow trigger name.', id_part='child_name_1') + + with self.argument_context('logic workflow-trigger set-state') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('trigger_name', type=str, help='The workflow trigger name.', id_part='child_name_1') + c.argument('source', action=AddSource, nargs='+', help='The source.') + + with self.argument_context('logic workflow-trigger show-schema-json') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('trigger_name', type=str, help='The workflow trigger name.', id_part='child_name_1') + + with self.argument_context('logic workflow-version-trigger list-callback-url') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('version_id', type=str, help='The workflow versionId.') + c.argument('trigger_name', type=str, help='The workflow trigger name.') + c.argument('not_after', help='The expiry time.') + c.argument('key_type', arg_type=get_enum_type(['NotSpecified', 'Primary', 'Secondary']), help='The key type.') + + with self.argument_context('logic workflow-trigger-history list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('trigger_name', type=str, help='The workflow trigger name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation. Options ' + 'for filters include: Status, StartTime, and ClientTrackingId.') + + with self.argument_context('logic workflow-trigger-history show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('trigger_name', type=str, help='The workflow trigger name.', id_part='child_name_1') + c.argument('history_name', type=str, help='The workflow trigger history name. Corresponds to the run name for ' + 'triggers that resulted in a run.', id_part='child_name_2') + + with self.argument_context('logic workflow-trigger-history resubmit') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('trigger_name', type=str, help='The workflow trigger name.', id_part='child_name_1') + c.argument('history_name', type=str, help='The workflow trigger history name. Corresponds to the run name for ' + 'triggers that resulted in a run.', id_part='child_name_2') + + with self.argument_context('logic workflow-run list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation. Options ' + 'for filters include: Status, StartTime, and ClientTrackingId.') + + with self.argument_context('logic workflow-run show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('run_name', type=str, help='The workflow run name.', id_part='child_name_1') + + with self.argument_context('logic workflow-run cancel') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('run_name', type=str, help='The workflow run name.', id_part='child_name_1') + + with self.argument_context('logic workflow-run-action list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('run_name', type=str, help='The workflow run name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation. Options ' + 'for filters include: Status.') + + with self.argument_context('logic workflow-run-action show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('run_name', type=str, help='The workflow run name.', id_part='child_name_1') + c.argument('action_name', type=str, help='The workflow action name.', id_part='child_name_2') + + with self.argument_context('logic workflow-run-action list-expression-trace') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('run_name', type=str, help='The workflow run name.') + c.argument('action_name', type=str, help='The workflow action name.') + + with self.argument_context('logic workflow-run-action-repetition list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('run_name', type=str, help='The workflow run name.') + c.argument('action_name', type=str, help='The workflow action name.') + + with self.argument_context('logic workflow-run-action-repetition show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('run_name', type=str, help='The workflow run name.', id_part='child_name_1') + c.argument('action_name', type=str, help='The workflow action name.', id_part='child_name_2') + c.argument('repetition_name', type=str, help='The workflow repetition.', id_part='child_name_3') + + with self.argument_context('logic workflow-run-action-repetition list-expression-trace') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('run_name', type=str, help='The workflow run name.') + c.argument('action_name', type=str, help='The workflow action name.') + c.argument('repetition_name', type=str, help='The workflow repetition.') + + with self.argument_context('logic workflow-run-action-repetition-request-history list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('run_name', type=str, help='The workflow run name.') + c.argument('action_name', type=str, help='The workflow action name.') + c.argument('repetition_name', type=str, help='The workflow repetition.') + + with self.argument_context('logic workflow-run-action-repetition-request-history show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('run_name', type=str, help='The workflow run name.', id_part='child_name_1') + c.argument('action_name', type=str, help='The workflow action name.', id_part='child_name_2') + c.argument('repetition_name', type=str, help='The workflow repetition.', id_part='child_name_3') + c.argument('request_history_name', type=str, help='The request history name.', id_part='child_name_4') + + with self.argument_context('logic workflow-run-action-request-history list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('run_name', type=str, help='The workflow run name.') + c.argument('action_name', type=str, help='The workflow action name.') + + with self.argument_context('logic workflow-run-action-request-history show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('run_name', type=str, help='The workflow run name.', id_part='child_name_1') + c.argument('action_name', type=str, help='The workflow action name.', id_part='child_name_2') + c.argument('request_history_name', type=str, help='The request history name.', id_part='child_name_3') + + with self.argument_context('logic workflow-run-action-scope-repetition list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.') + c.argument('run_name', type=str, help='The workflow run name.') + c.argument('action_name', type=str, help='The workflow action name.') + + with self.argument_context('logic workflow-run-action-scope-repetition show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('run_name', type=str, help='The workflow run name.', id_part='child_name_1') + c.argument('action_name', type=str, help='The workflow action name.', id_part='child_name_2') + c.argument('repetition_name', type=str, help='The workflow repetition.', id_part='child_name_3') + + with self.argument_context('logic workflow-run-operation show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('workflow_name', type=str, help='The workflow name.', id_part='name') + c.argument('run_name', type=str, help='The workflow run name.', id_part='child_name_1') + c.argument('operation_id', type=str, help='The workflow operation id.', id_part='child_name_2') with self.argument_context('logic integration-account list') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument( - 'top', help='The number of items to be included in the result.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('top', type=int, help='The number of items to be included in the result.') with self.argument_context('logic integration-account show') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument('name', options_list=[ - '--name', '-n'], help='The integration account name.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', options_list=['--name', '-n', '--integration-account-name'], type=str, + help='The integration account name.', id_part='name') with self.argument_context('logic integration-account create') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument('name', options_list=[ - '--name', '-n'], help='The integration account name.') - c.argument('location', arg_type=get_location_type( - self.cli_ctx), validator=get_default_location_from_resource_group) - c.argument('tags', tags_type, help='The resource tags.') - c.argument('sku', type=str, help='The integration account sku.') - c.argument('integration_service_environment', arg_type=CLIArgumentType(options_list=['--integration-service-env' - 'ironment'], help='The integration se' - 'rvice environment. See README.md For more information')) - c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Sus' - 'pended']), help='The workflow state.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', + 'Suspended']), help='The workflow state.') + c.argument('resource_location', type=str, help='The resource location.', arg_group='Integration Service ' + 'Environment') + c.argument('resource_tags', action=AddResourceTags, nargs='+', help='The resource tags. Expect value: ' + 'KEY1=VALUE1 KEY2=VALUE2 ...', arg_group='Integration Service Environment') + c.argument('sku', action=AddSku, nargs='+', help='The sku.', arg_group='Integration Service Environment') + c.argument('provisioning_state', arg_type=get_enum_type(['NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', + 'Canceled', 'Failed', 'Succeeded', 'Moving', + 'Updating', 'Registering', 'Registered', + 'Unregistering', 'Unregistered', 'Completed', + 'Renewing', 'Pending', 'Waiting', 'InProgress']), + help='The provisioning state.', arg_group='Integration Service Environment Properties') + c.argument('workflow_state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', + 'Deleted', 'Suspended']), help='The integration service ' + 'environment state.', arg_group='Integration Service Environment Properties') + c.argument('integration_service_environment_id', type=str, help='Gets the tracking id.', + arg_group='Integration Service Environment Properties') + c.argument('endpoints_configuration', type=validate_file_or_dict, help='The endpoints configuration. Expected ' + 'value: json-string/@json-file.', arg_group='Integration Service Environment Properties') + c.argument('network_configuration', type=validate_file_or_dict, help='The network configuration. Expected ' + 'value: json-string/@json-file.', arg_group='Integration Service Environment Properties') + c.argument('encryption_configuration', type=validate_file_or_dict, help='The encryption configuration. ' + 'Expected value: json-string/@json-file.', arg_group='Integration Service Environment Properties') + c.argument('name', arg_type=get_enum_type(['NotSpecified', 'Free', 'Basic', 'Standard']), help='The sku name.', + arg_group='Sku') with self.argument_context('logic integration-account update') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument('name', options_list=[ - '--name', '-n'], help='The integration account name.') - c.argument('tags', tags_type, help='The resource tags.') - c.argument('sku', type=str, help='The integration account sku.') - c.argument('integration_service_environment', arg_type=CLIArgumentType(options_list=['--integration-service-env' - 'ironment'], help='The integration se' - 'rvice environment. See README.md For more information')) - c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Sus' - 'pended']), help='The workflow state.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', + 'Suspended']), help='The workflow state.') + c.argument('resource_location', type=str, help='The resource location.', arg_group='Integration Service ' + 'Environment') + c.argument('resource_tags', action=AddResourceTags, nargs='+', help='The resource tags. Expect value: ' + 'KEY1=VALUE1 KEY2=VALUE2 ...', arg_group='Integration Service Environment') + c.argument('sku', action=AddSku, nargs='+', help='The sku.', arg_group='Integration Service Environment') + c.argument('provisioning_state', arg_type=get_enum_type(['NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', + 'Canceled', 'Failed', 'Succeeded', 'Moving', + 'Updating', 'Registering', 'Registered', + 'Unregistering', 'Unregistered', 'Completed', + 'Renewing', 'Pending', 'Waiting', 'InProgress']), + help='The provisioning state.', arg_group='Integration Service Environment Properties') + c.argument('workflow_state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', + 'Deleted', 'Suspended']), help='The integration service ' + 'environment state.', arg_group='Integration Service Environment Properties') + c.argument('integration_service_environment_id', type=str, help='Gets the tracking id.', + arg_group='Integration Service Environment Properties') + c.argument('endpoints_configuration', type=validate_file_or_dict, help='The endpoints configuration. Expected ' + 'value: json-string/@json-file.', arg_group='Integration Service Environment Properties') + c.argument('network_configuration', type=validate_file_or_dict, help='The network configuration. Expected ' + 'value: json-string/@json-file.', arg_group='Integration Service Environment Properties') + c.argument('encryption_configuration', type=validate_file_or_dict, help='The encryption configuration. ' + 'Expected value: json-string/@json-file.', arg_group='Integration Service Environment Properties') + c.argument('name', arg_type=get_enum_type(['NotSpecified', 'Free', 'Basic', 'Standard']), help='The sku name.', + arg_group='Sku') with self.argument_context('logic integration-account delete') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument('name', options_list=[ - '--name', '-n'], help='The integration account name.') - - with self.argument_context('logic integration-account import') as c: - c.argument('resource_group_name', resource_group_name_type, - help='The resource group name.') - c.argument('name', options_list=[ - '--name', '-n'], help='The integration account name.') - c.argument('input_path', type=validate_file_or_dict, - help='Path to a intergration-account JSON file', completer=FilesCompleter()) - c.argument('location', arg_type=get_location_type( - self.cli_ctx), validator=get_default_location_from_resource_group) - c.argument('tags', tags_type, help='The resource tags.') - c.argument('sku', type=str, help='The integration account sku.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', options_list=['--name', '-n', '--integration-account-name'], type=str, + help='The integration account name.', id_part='name') + + with self.argument_context('logic integration-account list-callback-url') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', options_list=['--name', '-n', '--integration-account-name'], type=str, + help='The integration account name.') + c.argument('not_after', help='The expiry time.') + c.argument('key_type', arg_type=get_enum_type(['NotSpecified', 'Primary', 'Secondary']), help='The key type.') + + with self.argument_context('logic integration-account list-key-vault-key') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', options_list=['--name', '-n', '--integration-account-name'], type=str, + help='The integration account name.') + c.argument('skip_token', type=str, help='The skip token.') + c.argument('id_', options_list=['--id'], type=str, help='The resource id.', arg_group='Key Vault') + + with self.argument_context('logic integration-account log-tracking-event') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', options_list=['--name', '-n', '--integration-account-name'], type=str, + help='The integration account name.', id_part='name') + c.argument('source_type', type=str, help='The source type.') + c.argument('track_events_options', arg_type=get_enum_type(['None', 'DisableSourceInfoEnrich']), help='The ' + 'track events options.') + c.argument('events', type=validate_file_or_dict, help='The events. Expected value: json-string/@json-file.') + + with self.argument_context('logic integration-account regenerate-access-key') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', options_list=['--name', '-n', '--integration-account-name'], type=str, + help='The integration account name.', id_part='name') + c.argument('key_type', arg_type=get_enum_type(['NotSpecified', 'Primary', 'Secondary']), help='The key type.') + + with self.argument_context('logic integration-account-assembly list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + + with self.argument_context('logic integration-account-assembly show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('assembly_artifact_name', type=str, help='The assembly artifact name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-assembly create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('assembly_artifact_name', type=str, help='The assembly artifact name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('properties', action=AddProperties, nargs='+', help='The assembly properties.') + + with self.argument_context('logic integration-account-assembly update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('assembly_artifact_name', type=str, help='The assembly artifact name.', id_part='child_name_1') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('properties', action=AddProperties, nargs='+', help='The assembly properties.') + c.ignore('assembly_artifact') + + with self.argument_context('logic integration-account-assembly delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('assembly_artifact_name', type=str, help='The assembly artifact name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-assembly list-content-callback-url') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('assembly_artifact_name', type=str, help='The assembly artifact name.') + + with self.argument_context('logic integration-account-batch-configuration list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + + with self.argument_context('logic integration-account-batch-configuration show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('batch_configuration_name', type=str, help='The batch configuration name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-batch-configuration create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('batch_configuration_name', type=str, help='The batch configuration name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('created_time', help='The artifact creation time.') + c.argument('changed_time', help='The artifact changed time.') + c.argument('metadata', type=validate_file_or_dict, help='Any object Expected value: json-string/@json-file.') + c.argument('batch_group_name', type=str, help='The name of the batch group.') + c.argument('message_count', type=int, help='The message count.', arg_group='Release Criteria') + c.argument('batch_size', type=int, help='The batch size in bytes.', arg_group='Release Criteria') + c.argument('frequency', arg_type=get_enum_type(['NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', + 'Month', 'Year']), help='The frequency.', arg_group='Release ' + 'Criteria Recurrence') + c.argument('interval', type=int, help='The interval.', arg_group='Release Criteria Recurrence') + c.argument('start_time', type=str, help='The start time.', arg_group='Release Criteria Recurrence') + c.argument('end_time', type=str, help='The end time.', arg_group='Release Criteria Recurrence') + c.argument('time_zone', type=str, help='The time zone.', arg_group='Release Criteria Recurrence') + c.argument('minutes', nargs='+', help='The minutes.', arg_group='Release Criteria Recurrence Schedule') + c.argument('hours', nargs='+', help='The hours.', arg_group='Release Criteria Recurrence Schedule') + c.argument('week_days', nargs='+', help='The days of the week.', arg_group='Release Criteria Recurrence ' + 'Schedule') + c.argument('month_days', nargs='+', help='The month days.', arg_group='Release Criteria Recurrence Schedule') + c.argument('monthly_occurrences', action=AddMonthlyOccurrences, nargs='+', help='The monthly occurrences.', + arg_group='Release Criteria Recurrence Schedule') + + with self.argument_context('logic integration-account-batch-configuration update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('batch_configuration_name', type=str, help='The batch configuration name.', id_part='child_name_1') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('created_time', help='The artifact creation time.') + c.argument('changed_time', help='The artifact changed time.') + c.argument('metadata', type=validate_file_or_dict, help='Any object Expected value: json-string/@json-file.') + c.argument('batch_group_name', type=str, help='The name of the batch group.') + c.argument('message_count', type=int, help='The message count.', arg_group='Release Criteria') + c.argument('batch_size', type=int, help='The batch size in bytes.', arg_group='Release Criteria') + c.argument('frequency', arg_type=get_enum_type(['NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', + 'Month', 'Year']), help='The frequency.', arg_group='Release ' + 'Criteria Recurrence') + c.argument('interval', type=int, help='The interval.', arg_group='Release Criteria Recurrence') + c.argument('start_time', type=str, help='The start time.', arg_group='Release Criteria Recurrence') + c.argument('end_time', type=str, help='The end time.', arg_group='Release Criteria Recurrence') + c.argument('time_zone', type=str, help='The time zone.', arg_group='Release Criteria Recurrence') + c.argument('minutes', nargs='+', help='The minutes.', arg_group='Release Criteria Recurrence Schedule') + c.argument('hours', nargs='+', help='The hours.', arg_group='Release Criteria Recurrence Schedule') + c.argument('week_days', nargs='+', help='The days of the week.', arg_group='Release Criteria Recurrence ' + 'Schedule') + c.argument('month_days', nargs='+', help='The month days.', arg_group='Release Criteria Recurrence Schedule') + c.argument('monthly_occurrences', action=AddMonthlyOccurrences, nargs='+', help='The monthly occurrences.', + arg_group='Release Criteria Recurrence Schedule') + c.ignore('batch_configuration') + + with self.argument_context('logic integration-account-batch-configuration delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('batch_configuration_name', type=str, help='The batch configuration name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-schema list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation. Options ' + 'for filters include: SchemaType.') + + with self.argument_context('logic integration-account-schema show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('schema_name', type=str, help='The integration account schema name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-schema create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('schema_name', type=str, help='The integration account schema name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('schema_type', arg_type=get_enum_type(['NotSpecified', 'Xml']), help='The schema type.') + c.argument('target_namespace', type=str, help='The target namespace of the schema.') + c.argument('document_name', type=str, help='The document name.') + c.argument('file_name', type=str, help='The file name.') + c.argument('metadata', type=validate_file_or_dict, + help='The metadata. Expected value: json-string/@json-file.') + c.argument('content', type=str, help='The content.') + c.argument('properties_content_type', type=str, help='The content type.') + + with self.argument_context('logic integration-account-schema update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('schema_name', type=str, help='The integration account schema name.', id_part='child_name_1') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('schema_type', arg_type=get_enum_type(['NotSpecified', 'Xml']), help='The schema type.') + c.argument('target_namespace', type=str, help='The target namespace of the schema.') + c.argument('document_name', type=str, help='The document name.') + c.argument('file_name', type=str, help='The file name.') + c.argument('metadata', type=validate_file_or_dict, + help='The metadata. Expected value: json-string/@json-file.') + c.argument('content', type=str, help='The content.') + c.argument('properties_content_type', type=str, help='The content type.') + c.ignore('schema') + + with self.argument_context('logic integration-account-schema delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('schema_name', type=str, help='The integration account schema name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-schema list-content-callback-url') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('schema_name', type=str, help='The integration account schema name.') + c.argument('not_after', help='The expiry time.') + c.argument('key_type', arg_type=get_enum_type(['NotSpecified', 'Primary', 'Secondary']), help='The key type.') + + with self.argument_context('logic integration-account-map list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation. Options ' + 'for filters include: MapType.') + + with self.argument_context('logic integration-account-map show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('map_name', type=str, help='The integration account map name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-map create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('map_name', type=str, help='The integration account map name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('map_type', arg_type=get_enum_type(['NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid']), + help='The map type.') + c.argument('content', type=str, help='The content.') + c.argument('properties_content_type', type=str, help='The content type.') + c.argument('metadata', type=validate_file_or_dict, + help='The metadata. Expected value: json-string/@json-file.') + c.argument('ref', type=str, help='The reference name.', arg_group='Parameters Schema') + + with self.argument_context('logic integration-account-map update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('map_name', type=str, help='The integration account map name.', id_part='child_name_1') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('map_type', arg_type=get_enum_type(['NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid']), + help='The map type.') + c.argument('content', type=str, help='The content.') + c.argument('properties_content_type', type=str, help='The content type.') + c.argument('metadata', type=validate_file_or_dict, + help='The metadata. Expected value: json-string/@json-file.') + c.argument('ref', type=str, help='The reference name.', arg_group='Parameters Schema') + c.ignore('map') + + with self.argument_context('logic integration-account-map delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('map_name', type=str, help='The integration account map name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-map list-content-callback-url') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('map_name', type=str, help='The integration account map name.') + c.argument('not_after', help='The expiry time.') + c.argument('key_type', arg_type=get_enum_type(['NotSpecified', 'Primary', 'Secondary']), help='The key type.') + + with self.argument_context('logic integration-account-partner list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation. Options ' + 'for filters include: PartnerType.') + + with self.argument_context('logic integration-account-partner show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('partner_name', type=str, help='The integration account partner name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-partner create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('partner_name', type=str, help='The integration account partner name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('partner_type', arg_type=get_enum_type(['NotSpecified', 'B2B']), help='The partner type.') + c.argument('metadata', type=validate_file_or_dict, + help='The metadata. Expected value: json-string/@json-file.') + c.argument('business_identities', action=AddBusinessIdentities, nargs='+', help='The list of partner business ' + 'identities.', arg_group='Content B2b') + + with self.argument_context('logic integration-account-partner update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('partner_name', type=str, help='The integration account partner name.', id_part='child_name_1') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('partner_type', arg_type=get_enum_type(['NotSpecified', 'B2B']), help='The partner type.') + c.argument('metadata', type=validate_file_or_dict, + help='The metadata. Expected value: json-string/@json-file.') + c.argument('business_identities', action=AddBusinessIdentities, nargs='+', help='The list of partner business ' + 'identities.', arg_group='Content B2b') + c.ignore('partner') + + with self.argument_context('logic integration-account-partner delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('partner_name', type=str, help='The integration account partner name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-partner list-content-callback-url') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('partner_name', type=str, help='The integration account partner name.') + c.argument('not_after', help='The expiry time.') + c.argument('key_type', arg_type=get_enum_type(['NotSpecified', 'Primary', 'Secondary']), help='The key type.') + + with self.argument_context('logic integration-account-agreement list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation. Options ' + 'for filters include: AgreementType.') + + with self.argument_context('logic integration-account-agreement show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('agreement_name', type=str, help='The integration account agreement name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-agreement create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('agreement_name', type=str, help='The integration account agreement name.') + c.argument('agreement', type=validate_file_or_dict, help='The integration account agreement. Expected value: ' + 'json-string/@json-file.') + + with self.argument_context('logic integration-account-agreement update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('agreement_name', type=str, help='The integration account agreement name.', id_part='child_name_1') + c.argument('agreement', type=validate_file_or_dict, help='The integration account agreement. Expected value: ' + 'json-string/@json-file.') + + with self.argument_context('logic integration-account-agreement delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('agreement_name', type=str, help='The integration account agreement name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-agreement list-content-callback-url') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('agreement_name', type=str, help='The integration account agreement name.') + c.argument('not_after', help='The expiry time.') + c.argument('key_type', arg_type=get_enum_type(['NotSpecified', 'Primary', 'Secondary']), help='The key type.') + + with self.argument_context('logic integration-account-certificate list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + + with self.argument_context('logic integration-account-certificate show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('certificate_name', type=str, help='The integration account certificate name.', + id_part='child_name_1') + + with self.argument_context('logic integration-account-certificate create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('certificate_name', type=str, help='The integration account certificate name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('metadata', type=validate_file_or_dict, + help='The metadata. Expected value: json-string/@json-file.') + c.argument('public_certificate', type=str, help='The public certificate.') + c.argument('key_vault', action=AddKeyVault, nargs='+', help='The key vault reference.', arg_group='Key') + c.argument('key_name', type=str, help='The private key name in key vault.', arg_group='Key') + c.argument('key_version', type=str, help='The private key version in key vault.', arg_group='Key') + + with self.argument_context('logic integration-account-certificate update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('certificate_name', type=str, help='The integration account certificate name.', + id_part='child_name_1') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('metadata', type=validate_file_or_dict, + help='The metadata. Expected value: json-string/@json-file.') + c.argument('public_certificate', type=str, help='The public certificate.') + c.argument('key_vault', action=AddKeyVault, nargs='+', help='The key vault reference.', arg_group='Key') + c.argument('key_name', type=str, help='The private key name in key vault.', arg_group='Key') + c.argument('key_version', type=str, help='The private key version in key vault.', arg_group='Key') + c.ignore('certificate') + + with self.argument_context('logic integration-account-certificate delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('certificate_name', type=str, help='The integration account certificate name.', + id_part='child_name_1') + + with self.argument_context('logic integration-account-session list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('top', type=int, help='The number of items to be included in the result.') + c.argument('filter_', options_list=['--filter'], type=str, help='The filter to apply on the operation. Options ' + 'for filters include: ChangedTime.') + + with self.argument_context('logic integration-account-session show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('session_name', type=str, help='The integration account session name.', id_part='child_name_1') + + with self.argument_context('logic integration-account-session create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.') + c.argument('session_name', type=str, help='The integration account session name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('content', type=validate_file_or_dict, help='The session content. Expected value: ' + 'json-string/@json-file.') + + with self.argument_context('logic integration-account-session update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('session_name', type=str, help='The integration account session name.', id_part='child_name_1') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('content', type=validate_file_or_dict, help='The session content. Expected value: ' + 'json-string/@json-file.') + c.ignore('session') + + with self.argument_context('logic integration-account-session delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('integration_account_name', type=str, help='The integration account name.', id_part='name') + c.argument('session_name', type=str, help='The integration account session name.', id_part='child_name_1') + + with self.argument_context('logic integration-service-environment list') as c: + c.argument('resource_group', type=str, help='The resource group.') + c.argument('top', type=int, help='The number of items to be included in the result.') + + with self.argument_context('logic integration-service-environment show') as c: + c.argument('resource_group', type=str, help='The resource group.', id_part='resource_group') + c.argument('integration_service_environment_name', options_list=['--name', '-n', + '--integration-service-environment-name'], + type=str, help='The integration service environment name.', id_part='name') + + with self.argument_context('logic integration-service-environment create') as c: + c.argument('resource_group', type=str, help='The resource group.') + c.argument('integration_service_environment_name', options_list=['--name', '-n', + '--integration-service-environment-name'], + type=str, help='The integration service environment name.') + c.argument('location', arg_type=get_location_type(self.cli_ctx)) + c.argument('tags', tags_type) + c.argument('sku', action=AddSku, nargs='+', help='The sku.') + c.argument('provisioning_state', arg_type=get_enum_type(['NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', + 'Canceled', 'Failed', 'Succeeded', 'Moving', + 'Updating', 'Registering', 'Registered', + 'Unregistering', 'Unregistered', 'Completed', + 'Renewing', 'Pending', 'Waiting', 'InProgress']), + help='The provisioning state.') + c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', + 'Suspended']), help='The integration service environment state.') + c.argument('integration_service_environment_id', type=str, help='Gets the tracking id.') + c.argument('endpoints_configuration', type=validate_file_or_dict, help='The endpoints configuration. Expected ' + 'value: json-string/@json-file.') + c.argument('network_configuration', type=validate_file_or_dict, help='The network configuration. Expected ' + 'value: json-string/@json-file.') + c.argument('encryption_configuration', type=validate_file_or_dict, help='The encryption configuration. ' + 'Expected value: json-string/@json-file.') + + with self.argument_context('logic integration-service-environment update') as c: + c.argument('resource_group', type=str, help='The resource group.', id_part='resource_group') + c.argument('integration_service_environment_name', options_list=['--name', '-n', + '--integration-service-environment-name'], + type=str, help='The integration service environment name.', id_part='name') + c.argument('location', arg_type=get_location_type(self.cli_ctx)) + c.argument('tags', tags_type) + c.argument('sku', action=AddSku, nargs='+', help='The sku.') + c.argument('provisioning_state', arg_type=get_enum_type(['NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', + 'Canceled', 'Failed', 'Succeeded', 'Moving', + 'Updating', 'Registering', 'Registered', + 'Unregistering', 'Unregistered', 'Completed', + 'Renewing', 'Pending', 'Waiting', 'InProgress']), + help='The provisioning state.') + c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', + 'Suspended']), help='The integration service environment state.') + c.argument('integration_service_environment_id', type=str, help='Gets the tracking id.') + c.argument('endpoints_configuration', type=validate_file_or_dict, help='The endpoints configuration. Expected ' + 'value: json-string/@json-file.') + c.argument('network_configuration', type=validate_file_or_dict, help='The network configuration. Expected ' + 'value: json-string/@json-file.') + c.argument('encryption_configuration', type=validate_file_or_dict, help='The encryption configuration. ' + 'Expected value: json-string/@json-file.') + + with self.argument_context('logic integration-service-environment delete') as c: + c.argument('resource_group', type=str, help='The resource group.', id_part='resource_group') + c.argument('integration_service_environment_name', options_list=['--name', '-n', + '--integration-service-environment-name'], + type=str, help='The integration service environment name.', id_part='name') + + with self.argument_context('logic integration-service-environment restart') as c: + c.argument('resource_group', type=str, help='The resource group.', id_part='resource_group') + c.argument('integration_service_environment_name', options_list=['--name', '-n', + '--integration-service-environment-name'], + type=str, help='The integration service environment name.', id_part='name') + + with self.argument_context('logic integration-service-environment wait') as c: + c.argument('resource_group', type=str, help='The resource group.', id_part='resource_group') + c.argument('integration_service_environment_name', options_list=['--name', '-n', + '--integration-service-environment-name'], + type=str, help='The integration service environment name.', id_part='name') + + with self.argument_context('logic integration-service-environment-sku list') as c: + c.argument('resource_group', type=str, help='The resource group.') + c.argument('integration_service_environment_name', type=str, help='The integration service environment name.') + + with self.argument_context('logic integration-service-environment-network-health show') as c: + c.argument('resource_group', type=str, help='The resource group.', id_part='resource_group') + c.argument('integration_service_environment_name', type=str, help='The integration service environment name.', + id_part='name') + + with self.argument_context('logic integration-service-environment-managed-api list') as c: + c.argument('resource_group', type=str, help='The resource group.') + c.argument('integration_service_environment_name', type=str, help='The integration service environment name.') + + with self.argument_context('logic integration-service-environment-managed-api show') as c: + c.argument('resource_group', type=str, help='The resource group name.', id_part='resource_group') + c.argument('integration_service_environment_name', type=str, help='The integration service environment name.', + id_part='name') + c.argument('api_name', type=str, help='The api name.', id_part='child_name_1') + + with self.argument_context('logic integration-service-environment-managed-api delete') as c: + c.argument('resource_group', type=str, help='The resource group.', id_part='resource_group') + c.argument('integration_service_environment_name', type=str, help='The integration service environment name.', + id_part='name') + c.argument('api_name', type=str, help='The api name.', id_part='child_name_1') + + with self.argument_context('logic integration-service-environment-managed-api put') as c: + c.argument('resource_group', type=str, help='The resource group name.', id_part='resource_group') + c.argument('integration_service_environment_name', type=str, help='The integration service environment name.', + id_part='name') + c.argument('api_name', type=str, help='The api name.', id_part='child_name_1') + + with self.argument_context('logic integration-service-environment-managed-api wait') as c: + c.argument('resource_group', type=str, help='The resource group name.', id_part='resource_group') + c.argument('integration_service_environment_name', type=str, help='The integration service environment name.', + id_part='name') + c.argument('api_name', type=str, help='The api name.', id_part='child_name_1') + + with self.argument_context('logic integration-service-environment-managed-api-operation list') as c: + c.argument('resource_group', type=str, help='The resource group.') + c.argument('integration_service_environment_name', type=str, help='The integration service environment name.') + c.argument('api_name', type=str, help='The api name.') diff --git a/src/logic/azext_logic/generated/_validators.py b/src/logic/azext_logic/generated/_validators.py new file mode 100644 index 00000000000..b33a44c1ebf --- /dev/null +++ b/src/logic/azext_logic/generated/_validators.py @@ -0,0 +1,9 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- diff --git a/src/logic/azext_logic/generated/action.py b/src/logic/azext_logic/generated/action.py index 7cebd6c3391..87850d9442b 100644 --- a/src/logic/azext_logic/generated/action.py +++ b/src/logic/azext_logic/generated/action.py @@ -1,50 +1,217 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- # pylint: disable=protected-access import argparse +from collections import defaultdict from knack.util import CLIError -class AddIntegrationAccount(argparse.Action): +class AddResourceTags(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) - namespace.integration_account = action + namespace.tags = action def get_action(self, values, option_string): # pylint: disable=no-self-use try: - properties = dict(x.split('=', 1) for x in values) + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) except ValueError: - raise CLIError( - 'usage error: {} [KEY=VALUE ...]'.format(option_string)) + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + v = properties[k] + d[k] = v[0] + return d + + +class AddWorkflow(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.properties_endpoints_configuration_workflow = action + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: kl = k.lower() v = properties[k] - if kl == 'id': - d['id'] = v + if kl == 'outgoing-ip-addresses': + d['outgoing_ip_addresses'] = v + elif kl == 'access-endpoint-ip-addresses': + d['access_endpoint_ip_addresses'] = v + else: + raise CLIError('Unsupported Key {} is provided for parameter properties_endpoints_configuration_workflo' + 'w. All possible keys are: outgoing-ip-addresses, access-endpoint-ip-addresses'.format(k)) return d -class AddIntegrationServiceEnvironment(argparse.Action): +class AddSource(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) - namespace.integration_service_environment = action + namespace.source = action def get_action(self, values, option_string): # pylint: disable=no-self-use try: - properties = dict(x.split('=', 1) for x in values) + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) except ValueError: - raise CLIError( - 'usage error: {} [KEY=VALUE ...]'.format(option_string)) + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: kl = k.lower() v = properties[k] - if kl == 'id': - d['id'] = v + if kl == 'flow-name': + d['flow_name'] = v[0] + elif kl == 'trigger-name': + d['trigger_name'] = v[0] + elif kl == 'id': + d['id'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter source. All possible keys are: flow-name, ' + 'trigger-name, id'.format(k)) + return d + + +class AddSku(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.sku = action + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'name': + d['name'] = v[0] + elif kl == 'capacity': + d['capacity'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter sku. All possible keys are: name, ' + 'capacity'.format(k)) + return d + + +class AddProperties(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.properties = action + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'assembly-name': + d['assembly_name'] = v[0] + elif kl == 'assembly-version': + d['assembly_version'] = v[0] + elif kl == 'assembly-culture': + d['assembly_culture'] = v[0] + elif kl == 'assembly-public-key-token': + d['assembly_public_key_token'] = v[0] + elif kl == 'content': + d['content'] = v[0] + elif kl == 'content-type': + d['content_type'] = v[0] + elif kl == 'content-link': + d['content_link'] = v[0] + elif kl == 'created-time': + d['created_time'] = v[0] + elif kl == 'changed-time': + d['changed_time'] = v[0] + elif kl == 'metadata': + d['metadata'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter properties. All possible keys are: ' + 'assembly-name, assembly-version, assembly-culture, assembly-public-key-token, content, ' + 'content-type, content-link, created-time, changed-time, metadata'.format(k)) + return d + + +class AddMonthlyOccurrences(argparse._AppendAction): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + super(AddMonthlyOccurrences, self).__call__(parser, namespace, action, option_string) + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'day': + d['day'] = v[0] + elif kl == 'occurrence': + d['occurrence'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter monthly_occurrences. All possible keys ' + 'are: day, occurrence'.format(k)) + return d + + +class AddBusinessIdentities(argparse._AppendAction): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + super(AddBusinessIdentities, self).__call__(parser, namespace, action, option_string) + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'qualifier': + d['qualifier'] = v[0] + elif kl == 'value': + d['value'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter business_identities. All possible keys ' + 'are: qualifier, value'.format(k)) return d @@ -55,16 +222,19 @@ def __call__(self, parser, namespace, values, option_string=None): def get_action(self, values, option_string): # pylint: disable=no-self-use try: - properties = dict(x.split('=', 1) for x in values) + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) except ValueError: - raise CLIError( - 'usage error: {} [KEY=VALUE ...]'.format(option_string)) + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: kl = k.lower() v = properties[k] - if kl == 'name': - d['name'] = v - elif kl == 'id': - d['id'] = v + if kl == 'id': + d['id'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter key_vault. All possible keys are: id'. + format(k)) return d diff --git a/src/logic/azext_logic/generated/commands.py b/src/logic/azext_logic/generated/commands.py index e024f019c9a..08b8f042cc2 100644 --- a/src/logic/azext_logic/generated/commands.py +++ b/src/logic/azext_logic/generated/commands.py @@ -1,19 +1,23 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-statements +# pylint: disable=too-many-locals from azure.cli.core.commands import CliCommandType def load_command_table(self, _): - with self.command_group('logic', is_preview=True): - pass - from azext_logic.generated._client_factory import cf_workflow logic_workflow = CliCommandType( - operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_operations#WorkflowOperations.{}', + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflows_operations#WorkflowsOperations.{}', client_factory=cf_workflow) with self.command_group('logic workflow', logic_workflow, client_factory=cf_workflow) as g: g.custom_command('list', 'logic_workflow_list') @@ -21,11 +25,138 @@ def load_command_table(self, _): g.custom_command('create', 'logic_workflow_create') g.custom_command('update', 'logic_workflow_update') g.custom_command('delete', 'logic_workflow_delete', confirmation=True) + g.custom_command('disable', 'logic_workflow_disable') + g.custom_command('enable', 'logic_workflow_enable') + g.custom_command('generate-upgraded-definition', 'logic_workflow_generate_upgraded_definition') + g.custom_command('list-callback-url', 'logic_workflow_list_callback_url') + g.custom_command('list-swagger', 'logic_workflow_list_swagger') + g.custom_command('move', 'logic_workflow_move', supports_no_wait=True) + g.custom_command('regenerate-access-key', 'logic_workflow_regenerate_access_key') + g.custom_command('validate-by-location', 'logic_workflow_validate_by_location') + g.custom_command('validate-by-resource-group', 'logic_workflow_validate_by_resource_group') + g.custom_wait_command('wait', 'logic_workflow_show') + + from azext_logic.generated._client_factory import cf_workflow_version + logic_workflow_version = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_versions_operations#WorkflowVersionsOpera' + 'tions.{}', + client_factory=cf_workflow_version) + with self.command_group('logic workflow-version', logic_workflow_version, + client_factory=cf_workflow_version) as g: + g.custom_command('list', 'logic_workflow_version_list') + g.custom_show_command('show', 'logic_workflow_version_show') + + from azext_logic.generated._client_factory import cf_workflow_trigger + logic_workflow_trigger = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_triggers_operations#WorkflowTriggersOpera' + 'tions.{}', + client_factory=cf_workflow_trigger) + with self.command_group('logic workflow-trigger', logic_workflow_trigger, + client_factory=cf_workflow_trigger) as g: + g.custom_command('list', 'logic_workflow_trigger_list') + g.custom_show_command('show', 'logic_workflow_trigger_show') + g.custom_command('list-callback-url', 'logic_workflow_trigger_list_callback_url') + g.custom_command('reset', 'logic_workflow_trigger_reset') + g.custom_command('run', 'logic_workflow_trigger_run') + g.custom_command('set-state', 'logic_workflow_trigger_set_state') + g.custom_command('show-schema-json', 'logic_workflow_trigger_show_schema_json') + + from azext_logic.generated._client_factory import cf_workflow_version_trigger + logic_workflow_version_trigger = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_version_triggers_operations#WorkflowVersi' + 'onTriggersOperations.{}', + client_factory=cf_workflow_version_trigger) + with self.command_group('logic workflow-version-trigger', logic_workflow_version_trigger, + client_factory=cf_workflow_version_trigger) as g: + g.custom_command('list-callback-url', 'logic_workflow_version_trigger_list_callback_url') + + from azext_logic.generated._client_factory import cf_workflow_trigger_history + logic_workflow_trigger_history = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_trigger_histories_operations#WorkflowTrig' + 'gerHistoriesOperations.{}', + client_factory=cf_workflow_trigger_history) + with self.command_group('logic workflow-trigger-history', logic_workflow_trigger_history, + client_factory=cf_workflow_trigger_history) as g: + g.custom_command('list', 'logic_workflow_trigger_history_list') + g.custom_show_command('show', 'logic_workflow_trigger_history_show') + g.custom_command('resubmit', 'logic_workflow_trigger_history_resubmit') + + from azext_logic.generated._client_factory import cf_workflow_run + logic_workflow_run = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_runs_operations#WorkflowRunsOperations.{}' + '', + client_factory=cf_workflow_run) + with self.command_group('logic workflow-run', logic_workflow_run, client_factory=cf_workflow_run) as g: + g.custom_command('list', 'logic_workflow_run_list') + g.custom_show_command('show', 'logic_workflow_run_show') + g.custom_command('cancel', 'logic_workflow_run_cancel') + + from azext_logic.generated._client_factory import cf_workflow_run_action + logic_workflow_run_action = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_run_actions_operations#WorkflowRunActions' + 'Operations.{}', + client_factory=cf_workflow_run_action) + with self.command_group('logic workflow-run-action', logic_workflow_run_action, + client_factory=cf_workflow_run_action) as g: + g.custom_command('list', 'logic_workflow_run_action_list') + g.custom_show_command('show', 'logic_workflow_run_action_show') + g.custom_command('list-expression-trace', 'logic_workflow_run_action_list_expression_trace') + + from azext_logic.generated._client_factory import cf_workflow_run_action_repetition + logic_workflow_run_action_repetition = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_run_action_repetitions_operations#Workflo' + 'wRunActionRepetitionsOperations.{}', + client_factory=cf_workflow_run_action_repetition) + with self.command_group('logic workflow-run-action-repetition', logic_workflow_run_action_repetition, + client_factory=cf_workflow_run_action_repetition) as g: + g.custom_command('list', 'logic_workflow_run_action_repetition_list') + g.custom_show_command('show', 'logic_workflow_run_action_repetition_show') + g.custom_command('list-expression-trace', 'logic_workflow_run_action_repetition_list_expression_trace') + + from azext_logic.generated._client_factory import cf_workflow_run_action_repetition_request_history + logic_workflow_run_action_repetition_request_history = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_run_action_repetitions_request_histories_' + 'operations#WorkflowRunActionRepetitionsRequestHistoriesOperations.{}', + client_factory=cf_workflow_run_action_repetition_request_history) + with self.command_group('logic workflow-run-action-repetition-request-history', + logic_workflow_run_action_repetition_request_history, + client_factory=cf_workflow_run_action_repetition_request_history) as g: + g.custom_command('list', 'logic_workflow_run_action_repetition_request_history_list') + g.custom_show_command('show', 'logic_workflow_run_action_repetition_request_history_show') + + from azext_logic.generated._client_factory import cf_workflow_run_action_request_history + logic_workflow_run_action_request_history = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_run_action_request_histories_operations#W' + 'orkflowRunActionRequestHistoriesOperations.{}', + client_factory=cf_workflow_run_action_request_history) + with self.command_group('logic workflow-run-action-request-history', logic_workflow_run_action_request_history, + client_factory=cf_workflow_run_action_request_history) as g: + g.custom_command('list', 'logic_workflow_run_action_request_history_list') + g.custom_show_command('show', 'logic_workflow_run_action_request_history_show') + + from azext_logic.generated._client_factory import cf_workflow_run_action_scope_repetition + logic_workflow_run_action_scope_repetition = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_run_action_scope_repetitions_operations#W' + 'orkflowRunActionScopeRepetitionsOperations.{}', + client_factory=cf_workflow_run_action_scope_repetition) + with self.command_group('logic workflow-run-action-scope-repetition', logic_workflow_run_action_scope_repetition, + client_factory=cf_workflow_run_action_scope_repetition) as g: + g.custom_command('list', 'logic_workflow_run_action_scope_repetition_list') + g.custom_show_command('show', 'logic_workflow_run_action_scope_repetition_show') + + from azext_logic.generated._client_factory import cf_workflow_run_operation + logic_workflow_run_operation = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_run_operations_operations#WorkflowRunOper' + 'ationsOperations.{}', + client_factory=cf_workflow_run_operation) + with self.command_group('logic workflow-run-operation', logic_workflow_run_operation, + client_factory=cf_workflow_run_operation) as g: + g.custom_show_command('show', 'logic_workflow_run_operation_show') from azext_logic.generated._client_factory import cf_integration_account logic_integration_account = CliCommandType( - operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_operations#IntegrationAccountO' - 'perations.{}', + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_accounts_operations#IntegrationAccount' + 'sOperations.{}', client_factory=cf_integration_account) with self.command_group('logic integration-account', logic_integration_account, client_factory=cf_integration_account) as g: @@ -33,6 +164,187 @@ def load_command_table(self, _): g.custom_show_command('show', 'logic_integration_account_show') g.custom_command('create', 'logic_integration_account_create') g.custom_command('update', 'logic_integration_account_update') - g.custom_command( - 'delete', 'logic_integration_account_delete', confirmation=True) - g.custom_command('import', 'logic_integration_account_import') + g.custom_command('delete', 'logic_integration_account_delete', confirmation=True) + g.custom_command('list-callback-url', 'logic_integration_account_list_callback_url') + g.custom_command('list-key-vault-key', 'logic_integration_account_list_key_vault_key') + g.custom_command('log-tracking-event', 'logic_integration_account_log_tracking_event') + g.custom_command('regenerate-access-key', 'logic_integration_account_regenerate_access_key') + + from azext_logic.generated._client_factory import cf_integration_account_assembly + logic_integration_account_assembly = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_assemblies_operations#Integrat' + 'ionAccountAssembliesOperations.{}', + client_factory=cf_integration_account_assembly) + with self.command_group('logic integration-account-assembly', logic_integration_account_assembly, + client_factory=cf_integration_account_assembly) as g: + g.custom_command('list', 'logic_integration_account_assembly_list') + g.custom_show_command('show', 'logic_integration_account_assembly_show') + g.custom_command('create', 'logic_integration_account_assembly_create') + g.generic_update_command('update', setter_arg_name='assembly_artifact', + custom_func_name='logic_integration_account_assembly_update') + g.custom_command('delete', 'logic_integration_account_assembly_delete', confirmation=True) + g.custom_command('list-content-callback-url', 'logic_integration_account_assembly_list_content_callback_url') + + from azext_logic.generated._client_factory import cf_integration_account_batch_configuration + logic_integration_account_batch_configuration = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_batch_configurations_operation' + 's#IntegrationAccountBatchConfigurationsOperations.{}', + client_factory=cf_integration_account_batch_configuration) + with self.command_group('logic integration-account-batch-configuration', + logic_integration_account_batch_configuration, + client_factory=cf_integration_account_batch_configuration) as g: + g.custom_command('list', 'logic_integration_account_batch_configuration_list') + g.custom_show_command('show', 'logic_integration_account_batch_configuration_show') + g.custom_command('create', 'logic_integration_account_batch_configuration_create') + g.generic_update_command('update', setter_arg_name='batch_configuration', + custom_func_name='logic_integration_account_batch_configuration_update') + g.custom_command('delete', 'logic_integration_account_batch_configuration_delete', confirmation=True) + + from azext_logic.generated._client_factory import cf_integration_account_schema + logic_integration_account_schema = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_schemas_operations#Integration' + 'AccountSchemasOperations.{}', + client_factory=cf_integration_account_schema) + with self.command_group('logic integration-account-schema', logic_integration_account_schema, + client_factory=cf_integration_account_schema) as g: + g.custom_command('list', 'logic_integration_account_schema_list') + g.custom_show_command('show', 'logic_integration_account_schema_show') + g.custom_command('create', 'logic_integration_account_schema_create') + g.generic_update_command('update', setter_arg_name='schema', custom_func_name='logic_integration_account_schema' + '_update') + g.custom_command('delete', 'logic_integration_account_schema_delete', confirmation=True) + g.custom_command('list-content-callback-url', 'logic_integration_account_schema_list_content_callback_url') + + from azext_logic.generated._client_factory import cf_integration_account_map + logic_integration_account_map = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_maps_operations#IntegrationAcc' + 'ountMapsOperations.{}', + client_factory=cf_integration_account_map) + with self.command_group('logic integration-account-map', logic_integration_account_map, + client_factory=cf_integration_account_map) as g: + g.custom_command('list', 'logic_integration_account_map_list') + g.custom_show_command('show', 'logic_integration_account_map_show') + g.custom_command('create', 'logic_integration_account_map_create') + g.generic_update_command('update', setter_arg_name='map', custom_func_name='logic_integration_account_map_updat' + 'e') + g.custom_command('delete', 'logic_integration_account_map_delete', confirmation=True) + g.custom_command('list-content-callback-url', 'logic_integration_account_map_list_content_callback_url') + + from azext_logic.generated._client_factory import cf_integration_account_partner + logic_integration_account_partner = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_partners_operations#Integratio' + 'nAccountPartnersOperations.{}', + client_factory=cf_integration_account_partner) + with self.command_group('logic integration-account-partner', logic_integration_account_partner, + client_factory=cf_integration_account_partner) as g: + g.custom_command('list', 'logic_integration_account_partner_list') + g.custom_show_command('show', 'logic_integration_account_partner_show') + g.custom_command('create', 'logic_integration_account_partner_create') + g.generic_update_command('update', setter_arg_name='partner', custom_func_name='logic_integration_account_partn' + 'er_update') + g.custom_command('delete', 'logic_integration_account_partner_delete', confirmation=True) + g.custom_command('list-content-callback-url', 'logic_integration_account_partner_list_content_callback_url') + + from azext_logic.generated._client_factory import cf_integration_account_agreement + logic_integration_account_agreement = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_agreements_operations#Integrat' + 'ionAccountAgreementsOperations.{}', + client_factory=cf_integration_account_agreement) + with self.command_group('logic integration-account-agreement', logic_integration_account_agreement, + client_factory=cf_integration_account_agreement) as g: + g.custom_command('list', 'logic_integration_account_agreement_list') + g.custom_show_command('show', 'logic_integration_account_agreement_show') + g.custom_command('create', 'logic_integration_account_agreement_create') + g.custom_command('update', 'logic_integration_account_agreement_update') + g.custom_command('delete', 'logic_integration_account_agreement_delete', confirmation=True) + g.custom_command('list-content-callback-url', 'logic_integration_account_agreement_list_content_callback_url') + + from azext_logic.generated._client_factory import cf_integration_account_certificate + logic_integration_account_certificate = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_certificates_operations#Integr' + 'ationAccountCertificatesOperations.{}', + client_factory=cf_integration_account_certificate) + with self.command_group('logic integration-account-certificate', logic_integration_account_certificate, + client_factory=cf_integration_account_certificate) as g: + g.custom_command('list', 'logic_integration_account_certificate_list') + g.custom_show_command('show', 'logic_integration_account_certificate_show') + g.custom_command('create', 'logic_integration_account_certificate_create') + g.generic_update_command('update', setter_arg_name='certificate', + custom_func_name='logic_integration_account_certificate_update') + g.custom_command('delete', 'logic_integration_account_certificate_delete', confirmation=True) + + from azext_logic.generated._client_factory import cf_integration_account_session + logic_integration_account_session = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_sessions_operations#Integratio' + 'nAccountSessionsOperations.{}', + client_factory=cf_integration_account_session) + with self.command_group('logic integration-account-session', logic_integration_account_session, + client_factory=cf_integration_account_session) as g: + g.custom_command('list', 'logic_integration_account_session_list') + g.custom_show_command('show', 'logic_integration_account_session_show') + g.custom_command('create', 'logic_integration_account_session_create') + g.generic_update_command('update', setter_arg_name='session', custom_func_name='logic_integration_account_sessi' + 'on_update') + g.custom_command('delete', 'logic_integration_account_session_delete', confirmation=True) + + from azext_logic.generated._client_factory import cf_integration_service_environment + logic_integration_service_environment = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_service_environments_operations#Integr' + 'ationServiceEnvironmentsOperations.{}', + client_factory=cf_integration_service_environment) + with self.command_group('logic integration-service-environment', logic_integration_service_environment, + client_factory=cf_integration_service_environment) as g: + g.custom_command('list', 'logic_integration_service_environment_list') + g.custom_show_command('show', 'logic_integration_service_environment_show') + g.custom_command('create', 'logic_integration_service_environment_create', supports_no_wait=True) + g.custom_command('update', 'logic_integration_service_environment_update', supports_no_wait=True) + g.custom_command('delete', 'logic_integration_service_environment_delete', confirmation=True) + g.custom_command('restart', 'logic_integration_service_environment_restart') + g.custom_wait_command('wait', 'logic_integration_service_environment_show') + + from azext_logic.generated._client_factory import cf_integration_service_environment_sku + logic_integration_service_environment_sku = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_service_environment_skus_operations#In' + 'tegrationServiceEnvironmentSkusOperations.{}', + client_factory=cf_integration_service_environment_sku) + with self.command_group('logic integration-service-environment-sku', logic_integration_service_environment_sku, + client_factory=cf_integration_service_environment_sku) as g: + g.custom_command('list', 'logic_integration_service_environment_sku_list') + + from azext_logic.generated._client_factory import cf_integration_service_environment_network_health + logic_integration_service_environment_network_health = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_service_environment_network_health_ope' + 'rations#IntegrationServiceEnvironmentNetworkHealthOperations.{}', + client_factory=cf_integration_service_environment_network_health) + with self.command_group('logic integration-service-environment-network-health', + logic_integration_service_environment_network_health, + client_factory=cf_integration_service_environment_network_health) as g: + g.custom_show_command('show', 'logic_integration_service_environment_network_health_show') + + from azext_logic.generated._client_factory import cf_integration_service_environment_managed_api + logic_integration_service_environment_managed_api = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_service_environment_managed_apis_opera' + 'tions#IntegrationServiceEnvironmentManagedApisOperations.{}', + client_factory=cf_integration_service_environment_managed_api) + with self.command_group('logic integration-service-environment-managed-api', + logic_integration_service_environment_managed_api, + client_factory=cf_integration_service_environment_managed_api) as g: + g.custom_command('list', 'logic_integration_service_environment_managed_api_list') + g.custom_show_command('show', 'logic_integration_service_environment_managed_api_show') + g.custom_command('delete', 'logic_integration_service_environment_managed_api_delete', supports_no_wait=True, + confirmation=True) + g.custom_command('put', 'logic_integration_service_environment_managed_api_put', supports_no_wait=True) + g.custom_wait_command('wait', 'logic_integration_service_environment_managed_api_show') + + from azext_logic.generated._client_factory import cf_integration_service_environment_managed_api_operation + logic_integration_service_environment_managed_api_operation = CliCommandType( + operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_service_environment_managed_api_operat' + 'ions_operations#IntegrationServiceEnvironmentManagedApiOperationsOperations.{}', + client_factory=cf_integration_service_environment_managed_api_operation) + with self.command_group('logic integration-service-environment-managed-api-operation', + logic_integration_service_environment_managed_api_operation, + client_factory=cf_integration_service_environment_managed_api_operation) as g: + g.custom_command('list', 'logic_integration_service_environment_managed_api_operation_list') + + with self.command_group('logic', is_experimental=True): + pass diff --git a/src/logic/azext_logic/generated/custom.py b/src/logic/azext_logic/generated/custom.py index 3fbf50d7677..7a71b5ddc87 100644 --- a/src/logic/azext_logic/generated/custom.py +++ b/src/logic/azext_logic/generated/custom.py @@ -1,91 +1,569 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=line-too-long # pylint: disable=too-many-lines +# pylint: disable=unused-argument -import json -from knack.util import CLIError +from azure.cli.core.util import sdk_no_wait -def logic_workflow_list(cmd, client, +def logic_workflow_list(client, resource_group_name=None, top=None, - filter=None): + filter_=None): if resource_group_name: return client.list_by_resource_group(resource_group_name=resource_group_name, top=top, - filter=filter) + filter=filter_) return client.list_by_subscription(top=top, - filter=filter) + filter=filter_) -def logic_workflow_show(cmd, client, +def logic_workflow_show(client, resource_group_name, - name): + workflow_name): return client.get(resource_group_name=resource_group_name, - workflow_name=name) + workflow_name=workflow_name) -def logic_workflow_create(cmd, client, +def logic_workflow_create(client, resource_group_name, - name, - definition, - location, + workflow_name, + properties_endpoints_configuration_workflow, + location=None, tags=None, state=None, - endpoints_configuration=None, - access_control=None, - integration_account=None, - integration_service_environment=None): + definition=None, + parameters=None, + id_=None, + resource_reference_id=None, + triggers=None, + contents=None, + actions=None, + workflow_management=None, + connector=None): + workflow = {} + workflow['location'] = location + workflow['tags'] = tags + workflow['state'] = state + workflow['definition'] = definition + workflow['parameters'] = parameters + workflow['integration_service_environment'] = {} + workflow['integration_service_environment']['id'] = id_ + workflow['integration_account'] = {} + workflow['integration_account']['id'] = resource_reference_id + workflow['access_control'] = {} + workflow['access_control']['triggers'] = triggers + workflow['access_control']['contents'] = contents + workflow['access_control']['actions'] = actions + workflow['access_control']['workflow_management'] = workflow_management + workflow['endpoints_configuration'] = {} + workflow['endpoints_configuration']['workflow'] = properties_endpoints_configuration_workflow + workflow['endpoints_configuration']['connector'] = connector + return client.create_or_update(resource_group_name=resource_group_name, + workflow_name=workflow_name, + workflow=workflow) - if 'definition' not in definition: - raise CLIError(str(definition) + - " does not contain a 'definition' key") - return client.create_or_update(resource_group_name=resource_group_name, - workflow_name=name, - location=location, - tags=tags, - state=state, - endpoints_configuration=endpoints_configuration, - access_control=definition.get( - 'accessControl', access_control), - integration_account=integration_account, - integration_service_environment=integration_service_environment, - definition=definition['definition'], - parameters=definition.get('parameters', None)) - - -def logic_workflow_update(cmd, client, +def logic_workflow_update(client, resource_group_name, - name, - definition, - tags=None, - state=None): - - # check workflow exist before another update is done via a put - # per dicussion with the logic service team and to match powershells - # behavior - workflow = client.get(resource_group_name=resource_group_name, - workflow_name=name) - return logic_workflow_create(cmd, client, resource_group_name, name, - definition, workflow.location, - tags if tags else workflow.tags, - state if state else workflow.state, - workflow.endpoints_configuration, - workflow.integration_account, - workflow.integration_service_environment) - - -def logic_workflow_delete(cmd, client, + workflow_name): + return client.update(resource_group_name=resource_group_name, + workflow_name=workflow_name) + + +def logic_workflow_delete(client, resource_group_name, - name): + workflow_name): return client.delete(resource_group_name=resource_group_name, - workflow_name=name) + workflow_name=workflow_name) + + +def logic_workflow_disable(client, + resource_group_name, + workflow_name): + return client.disable(resource_group_name=resource_group_name, + workflow_name=workflow_name) + + +def logic_workflow_enable(client, + resource_group_name, + workflow_name): + return client.enable(resource_group_name=resource_group_name, + workflow_name=workflow_name) + + +def logic_workflow_generate_upgraded_definition(client, + resource_group_name, + workflow_name, + target_schema_version=None): + parameters = {} + parameters['target_schema_version'] = target_schema_version + return client.generate_upgraded_definition(resource_group_name=resource_group_name, + workflow_name=workflow_name, + parameters=parameters) + + +def logic_workflow_list_callback_url(client, + resource_group_name, + workflow_name, + not_after=None, + key_type=None): + list_callback_url = {} + list_callback_url['not_after'] = not_after + list_callback_url['key_type'] = key_type + return client.list_callback_url(resource_group_name=resource_group_name, + workflow_name=workflow_name, + list_callback_url=list_callback_url) + + +def logic_workflow_list_swagger(client, + resource_group_name, + workflow_name): + return client.list_swagger(resource_group_name=resource_group_name, + workflow_name=workflow_name) + + +def logic_workflow_move(client, + resource_group_name, + workflow_name, + id_=None, + no_wait=False): + move = {} + move['id'] = id_ + return sdk_no_wait(no_wait, + client.begin_move, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + move=move) + + +def logic_workflow_regenerate_access_key(client, + resource_group_name, + workflow_name, + key_type): + key_type = {} + key_type['key_type'] = key_type + return client.regenerate_access_key(resource_group_name=resource_group_name, + workflow_name=workflow_name, + key_type=key_type) + + +def logic_workflow_validate_by_location(client, + resource_group_name, + location, + workflow_name, + resource_location=None, + tags=None, + state=None, + definition=None, + parameters=None, + id_=None, + resource_reference_id=None, + triggers=None, + contents=None, + actions=None, + workflow_management=None, + workflow=None, + connector=None): + validate = {} + validate['location'] = resource_location + validate['tags'] = tags + validate['state'] = state + validate['definition'] = definition + validate['parameters'] = parameters + validate['integration_service_environment'] = {} + validate['integration_service_environment']['id'] = id_ + validate['integration_account'] = {} + validate['integration_account']['id'] = resource_reference_id + validate['access_control'] = {} + validate['access_control']['triggers'] = triggers + validate['access_control']['contents'] = contents + validate['access_control']['actions'] = actions + validate['access_control']['workflow_management'] = workflow_management + validate['endpoints_configuration'] = {} + validate['endpoints_configuration']['workflow'] = workflow + validate['endpoints_configuration']['connector'] = connector + return client.validate_by_location(resource_group_name=resource_group_name, + location=location, + workflow_name=workflow_name, + validate=validate) + + +def logic_workflow_validate_by_resource_group(client, + resource_group_name, + workflow_name, + location=None, + tags=None, + state=None, + definition=None, + parameters=None, + id_=None, + resource_reference_id=None, + triggers=None, + contents=None, + actions=None, + workflow_management=None, + workflow=None, + connector=None): + validate = {} + validate['location'] = location + validate['tags'] = tags + validate['state'] = state + validate['definition'] = definition + validate['parameters'] = parameters + validate['integration_service_environment'] = {} + validate['integration_service_environment']['id'] = id_ + validate['integration_account'] = {} + validate['integration_account']['id'] = resource_reference_id + validate['access_control'] = {} + validate['access_control']['triggers'] = triggers + validate['access_control']['contents'] = contents + validate['access_control']['actions'] = actions + validate['access_control']['workflow_management'] = workflow_management + validate['endpoints_configuration'] = {} + validate['endpoints_configuration']['workflow'] = workflow + validate['endpoints_configuration']['connector'] = connector + return client.validate_by_resource_group(resource_group_name=resource_group_name, + workflow_name=workflow_name, + validate=validate) + + +def logic_workflow_version_list(client, + resource_group_name, + workflow_name, + top=None): + return client.list(resource_group_name=resource_group_name, + workflow_name=workflow_name, + top=top) + + +def logic_workflow_version_show(client, + resource_group_name, + workflow_name, + version_id): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + version_id=version_id) + + +def logic_workflow_trigger_list(client, + resource_group_name, + workflow_name, + top=None, + filter_=None): + return client.list(resource_group_name=resource_group_name, + workflow_name=workflow_name, + top=top, + filter=filter_) + + +def logic_workflow_trigger_show(client, + resource_group_name, + workflow_name, + trigger_name): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name) + + +def logic_workflow_trigger_list_callback_url(client, + resource_group_name, + workflow_name, + trigger_name): + return client.list_callback_url(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name) + + +def logic_workflow_trigger_reset(client, + resource_group_name, + workflow_name, + trigger_name): + return client.reset(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name) + + +def logic_workflow_trigger_run(client, + resource_group_name, + workflow_name, + trigger_name): + return client.run(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name) + + +def logic_workflow_trigger_set_state(client, + resource_group_name, + workflow_name, + trigger_name, + source): + set_state = {} + set_state['source'] = source + return client.set_state(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + set_state=set_state) + + +def logic_workflow_trigger_show_schema_json(client, + resource_group_name, + workflow_name, + trigger_name): + return client.get_schema_json(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name) + + +def logic_workflow_version_trigger_list_callback_url(client, + resource_group_name, + workflow_name, + version_id, + trigger_name, + not_after=None, + key_type=None): + parameters = {} + parameters['not_after'] = not_after + parameters['key_type'] = key_type + return client.list_callback_url(resource_group_name=resource_group_name, + workflow_name=workflow_name, + version_id=version_id, + trigger_name=trigger_name, + parameters=parameters) + + +def logic_workflow_trigger_history_list(client, + resource_group_name, + workflow_name, + trigger_name, + top=None, + filter_=None): + return client.list(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + top=top, + filter=filter_) + + +def logic_workflow_trigger_history_show(client, + resource_group_name, + workflow_name, + trigger_name, + history_name): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + history_name=history_name) + + +def logic_workflow_trigger_history_resubmit(client, + resource_group_name, + workflow_name, + trigger_name, + history_name): + return client.resubmit(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + history_name=history_name) + + +def logic_workflow_run_list(client, + resource_group_name, + workflow_name, + top=None, + filter_=None): + return client.list(resource_group_name=resource_group_name, + workflow_name=workflow_name, + top=top, + filter=filter_) + + +def logic_workflow_run_show(client, + resource_group_name, + workflow_name, + run_name): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name) + + +def logic_workflow_run_cancel(client, + resource_group_name, + workflow_name, + run_name): + return client.cancel(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name) -def logic_integration_account_list(cmd, client, +def logic_workflow_run_action_list(client, + resource_group_name, + workflow_name, + run_name, + top=None, + filter_=None): + return client.list(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + top=top, + filter=filter_) + + +def logic_workflow_run_action_show(client, + resource_group_name, + workflow_name, + run_name, + action_name): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name) + + +def logic_workflow_run_action_list_expression_trace(client, + resource_group_name, + workflow_name, + run_name, + action_name): + return client.list_expression_traces(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name) + + +def logic_workflow_run_action_repetition_list(client, + resource_group_name, + workflow_name, + run_name, + action_name): + return client.list(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name) + + +def logic_workflow_run_action_repetition_show(client, + resource_group_name, + workflow_name, + run_name, + action_name, + repetition_name): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name) + + +def logic_workflow_run_action_repetition_list_expression_trace(client, + resource_group_name, + workflow_name, + run_name, + action_name, + repetition_name): + return client.list_expression_traces(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name) + + +def logic_workflow_run_action_repetition_request_history_list(client, + resource_group_name, + workflow_name, + run_name, + action_name, + repetition_name): + return client.list(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name) + + +def logic_workflow_run_action_repetition_request_history_show(client, + resource_group_name, + workflow_name, + run_name, + action_name, + repetition_name, + request_history_name): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + request_history_name=request_history_name) + + +def logic_workflow_run_action_request_history_list(client, + resource_group_name, + workflow_name, + run_name, + action_name): + return client.list(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name) + + +def logic_workflow_run_action_request_history_show(client, + resource_group_name, + workflow_name, + run_name, + action_name, + request_history_name): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + request_history_name=request_history_name) + + +def logic_workflow_run_action_scope_repetition_list(client, + resource_group_name, + workflow_name, + run_name, + action_name): + return client.list(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name) + + +def logic_workflow_run_action_scope_repetition_show(client, + resource_group_name, + workflow_name, + run_name, + action_name, + repetition_name): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name) + + +def logic_workflow_run_operation_show(client, + resource_group_name, + workflow_name, + run_name, + operation_id): + return client.get(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + operation_id=operation_id) + + +def logic_integration_account_list(client, resource_group_name=None, top=None): if resource_group_name: @@ -94,83 +572,996 @@ def logic_integration_account_list(cmd, client, return client.list_by_subscription(top=top) -def logic_integration_account_show(cmd, client, +def logic_integration_account_show(client, resource_group_name, - name): + integration_account_name): return client.get(resource_group_name=resource_group_name, - integration_account_name=name) + integration_account_name=integration_account_name) -def logic_integration_account_create(cmd, client, +def logic_integration_account_create(client, resource_group_name, - name, + integration_account_name, location=None, tags=None, + state=None, + resource_location=None, + resource_tags=None, sku=None, - integration_service_environment=None, - state=None): - if isinstance(integration_service_environment, str): - integration_service_environment = json.loads( - integration_service_environment) + provisioning_state=None, + workflow_state=None, + integration_service_environment_id=None, + endpoints_configuration=None, + network_configuration=None, + encryption_configuration=None, + name=None): + integration_account = {} + integration_account['location'] = location + integration_account['tags'] = tags + integration_account['state'] = state + integration_account = resource_location + integration_account = resource_tags + integration_account['integration_service_environment'] = {} + integration_account['integration_service_environment']['sku'] = sku + integration_account['integration_service_environment']['properties'] = {} + integration_account['integration_service_environment']['properties']['provisioning_state'] = provisioning_state + integration_account['integration_service_environment']['properties']['state'] = workflow_state + integration_account['integration_service_environment']['properties']['integration_service_environment_id'] = integration_service_environment_id + integration_account['integration_service_environment']['properties']['endpoints_configuration'] = endpoints_configuration + integration_account['integration_service_environment']['properties']['network_configuration'] = network_configuration + integration_account['integration_service_environment']['properties']['encryption_configuration'] = encryption_configuration + integration_account['sku'] = {} + integration_account['sku']['name'] = name return client.create_or_update(resource_group_name=resource_group_name, - integration_account_name=name, - location=location, - tags=tags, - sku={'name': sku}, - integration_service_environment=integration_service_environment, - state=state if state else 'Enabled') - # TODO: Work around for empty property serialization issue. - # Remove after LogicApp deploy the service fix. Contact: Rama Rayud" + integration_account_name=integration_account_name, + integration_account=integration_account) -def logic_integration_account_import(cmd, client, +def logic_integration_account_update(client, resource_group_name, - name, - input_path, + integration_account_name, location=None, tags=None, - sku=None,): + state=None, + resource_location=None, + resource_tags=None, + sku=None, + provisioning_state=None, + workflow_state=None, + integration_service_environment_id=None, + endpoints_configuration=None, + network_configuration=None, + encryption_configuration=None, + name=None): + integration_account = {} + integration_account['location'] = location + integration_account['tags'] = tags + integration_account['state'] = state + integration_account = resource_location + integration_account = resource_tags + integration_account['integration_service_environment'] = {} + integration_account['integration_service_environment']['sku'] = sku + integration_account['integration_service_environment']['properties'] = {} + integration_account['integration_service_environment']['properties']['provisioning_state'] = provisioning_state + integration_account['integration_service_environment']['properties']['state'] = workflow_state + integration_account['integration_service_environment']['properties']['integration_service_environment_id'] = integration_service_environment_id + integration_account['integration_service_environment']['properties']['endpoints_configuration'] = endpoints_configuration + integration_account['integration_service_environment']['properties']['network_configuration'] = network_configuration + integration_account['integration_service_environment']['properties']['encryption_configuration'] = encryption_configuration + integration_account['sku'] = {} + integration_account['sku']['name'] = name + return client.update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + integration_account=integration_account) - if 'properties' not in input_path: - raise CLIError(str(input_path) + - " does not contain a 'properties' key") - integration_service_environment = input_path['properties'].get( - 'integrationServiceEnvironment', None) - return client.create_or_update(resource_group_name=resource_group_name, - integration_account_name=name, - location=input_path.get( - 'location', location), - tags=input_path.get('tags', tags), - sku=input_path.get('sku', {'name': sku}), - integration_service_environment=integration_service_environment, - state=input_path['properties'].get('state', 'Enabled')) - # TODO: Work around for empty property serialization issue. - # Remove after LogicApp deploy the service fix. Contact: Rama Rayud" - - -def logic_integration_account_update(cmd, client, - name, +def logic_integration_account_delete(client, resource_group_name, - tags=None, - sku=None, - integration_service_environment=None, - state=None): + integration_account_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name) - if isinstance(integration_service_environment, str): - integration_service_environment = json.loads( - integration_service_environment) - return client.update(resource_group_name=resource_group_name, - integration_account_name=name, - location=None, - tags=tags, - sku={'name': sku}, - integration_service_environment=integration_service_environment, - state=state) +def logic_integration_account_list_callback_url(client, + resource_group_name, + integration_account_name, + not_after=None, + key_type=None): + parameters = {} + parameters['not_after'] = not_after + parameters['key_type'] = key_type + return client.list_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + parameters=parameters) -def logic_integration_account_delete(cmd, client, - resource_group_name, - name): + +def logic_integration_account_list_key_vault_key(client, + resource_group_name, + integration_account_name, + skip_token=None, + id_=None): + list_key_vault_keys = {} + list_key_vault_keys['skip_token'] = skip_token + list_key_vault_keys = id_ + return client.list_key_vault_keys(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + list_key_vault_keys=list_key_vault_keys) + + +def logic_integration_account_log_tracking_event(client, + resource_group_name, + integration_account_name, + source_type, + events, + track_events_options=None): + log_tracking_events = {} + log_tracking_events['source_type'] = source_type + log_tracking_events['track_events_options'] = track_events_options + log_tracking_events['events'] = events + return client.log_tracking_events(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + log_tracking_events=log_tracking_events) + + +def logic_integration_account_regenerate_access_key(client, + resource_group_name, + integration_account_name, + key_type=None): + regenerate_access_key = {} + regenerate_access_key['key_type'] = key_type + return client.regenerate_access_key(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + regenerate_access_key=regenerate_access_key) + + +def logic_integration_account_assembly_list(client, + resource_group_name, + integration_account_name): + return client.list(resource_group_name=resource_group_name, + integration_account_name=integration_account_name) + + +def logic_integration_account_assembly_show(client, + resource_group_name, + integration_account_name, + assembly_artifact_name): + return client.get(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name) + + +def logic_integration_account_assembly_create(client, + resource_group_name, + integration_account_name, + assembly_artifact_name, + properties, + location=None, + tags=None): + assembly_artifact = {} + assembly_artifact['location'] = location + assembly_artifact['tags'] = tags + assembly_artifact['properties'] = properties + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + assembly_artifact=assembly_artifact) + + +def logic_integration_account_assembly_update(instance, + resource_group_name, + integration_account_name, + assembly_artifact_name, + properties, + location=None, + tags=None): + if location is not None: + instance.location = location + if tags is not None: + instance.tags = tags + if properties is not None: + instance.properties = properties + return instance + + +def logic_integration_account_assembly_delete(client, + resource_group_name, + integration_account_name, + assembly_artifact_name): return client.delete(resource_group_name=resource_group_name, - integration_account_name=name) + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name) + + +def logic_integration_account_assembly_list_content_callback_url(client, + resource_group_name, + integration_account_name, + assembly_artifact_name): + return client.list_content_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name) + + +def logic_integration_account_batch_configuration_list(client, + resource_group_name, + integration_account_name): + return client.list(resource_group_name=resource_group_name, + integration_account_name=integration_account_name) + + +def logic_integration_account_batch_configuration_show(client, + resource_group_name, + integration_account_name, + batch_configuration_name): + return client.get(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name) + + +def logic_integration_account_batch_configuration_create(client, + resource_group_name, + integration_account_name, + batch_configuration_name, + batch_group_name, + location=None, + tags=None, + created_time=None, + changed_time=None, + metadata=None, + message_count=None, + batch_size=None, + frequency=None, + interval=None, + start_time=None, + end_time=None, + time_zone=None, + minutes=None, + hours=None, + week_days=None, + month_days=None, + monthly_occurrences=None): + batch_configuration = {} + batch_configuration['location'] = location + batch_configuration['tags'] = tags + batch_configuration = created_time + batch_configuration = changed_time + batch_configuration = metadata + batch_configuration['properties'] = {} + batch_configuration['properties']['batch_group_name'] = batch_group_name + batch_configuration['properties']['release_criteria'] = {} + batch_configuration['properties']['release_criteria']['message_count'] = message_count + batch_configuration['properties']['release_criteria']['batch_size'] = batch_size + batch_configuration = start_time + batch_configuration = end_time + batch_configuration = time_zone + batch_configuration = minutes + batch_configuration = hours + batch_configuration = week_days + batch_configuration = month_days + batch_configuration = monthly_occurrences + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name, + batch_configuration=batch_configuration) + + +def logic_integration_account_batch_configuration_update(instance, + resource_group_name, + integration_account_name, + batch_configuration_name, + batch_group_name, + location=None, + tags=None, + created_time=None, + changed_time=None, + metadata=None, + message_count=None, + batch_size=None, + frequency=None, + interval=None, + start_time=None, + end_time=None, + time_zone=None, + minutes=None, + hours=None, + week_days=None, + month_days=None, + monthly_occurrences=None): + if location is not None: + instance.location = location + if tags is not None: + instance.tags = tags + if created_time is not None: + instance.undefined = created_time + if changed_time is not None: + instance.undefined = changed_time + if metadata is not None: + instance.undefined = metadata + if batch_group_name is not None: + instance.properties.batch_group_name = batch_group_name + if message_count is not None: + instance.properties.release_criteria.message_count = message_count + if batch_size is not None: + instance.properties.release_criteria.batch_size = batch_size + if start_time is not None: + instance.undefined = start_time + if end_time is not None: + instance.undefined = end_time + if time_zone is not None: + instance.undefined = time_zone + if minutes is not None: + instance.undefined = minutes + if hours is not None: + instance.undefined = hours + if week_days is not None: + instance.undefined = week_days + if month_days is not None: + instance.undefined = month_days + if monthly_occurrences is not None: + instance.undefined = monthly_occurrences + return instance + + +def logic_integration_account_batch_configuration_delete(client, + resource_group_name, + integration_account_name, + batch_configuration_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name) + + +def logic_integration_account_schema_list(client, + resource_group_name, + integration_account_name, + top=None, + filter_=None): + return client.list(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter_) + + +def logic_integration_account_schema_show(client, + resource_group_name, + integration_account_name, + schema_name): + return client.get(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name) + + +def logic_integration_account_schema_create(client, + resource_group_name, + integration_account_name, + schema_name, + schema_type, + properties_content_type, + location=None, + tags=None, + target_namespace=None, + document_name=None, + file_name=None, + metadata=None, + content=None): + schema = {} + schema['location'] = location + schema['tags'] = tags + schema['schema_type'] = schema_type + schema['target_namespace'] = target_namespace + schema['document_name'] = document_name + schema['file_name'] = file_name + schema['metadata'] = metadata + schema['content'] = content + schema['content_type'] = properties_content_type + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + schema=schema) + + +def logic_integration_account_schema_update(instance, + resource_group_name, + integration_account_name, + schema_name, + schema_type, + properties_content_type, + location=None, + tags=None, + target_namespace=None, + document_name=None, + file_name=None, + metadata=None, + content=None): + if location is not None: + instance.location = location + if tags is not None: + instance.tags = tags + if schema_type is not None: + instance.schema_type = schema_type + if target_namespace is not None: + instance.target_namespace = target_namespace + if document_name is not None: + instance.document_name = document_name + if file_name is not None: + instance.file_name = file_name + if metadata is not None: + instance.metadata = metadata + if content is not None: + instance.content = content + if properties_content_type is not None: + instance.content_type = properties_content_type + return instance + + +def logic_integration_account_schema_delete(client, + resource_group_name, + integration_account_name, + schema_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name) + + +def logic_integration_account_schema_list_content_callback_url(client, + resource_group_name, + integration_account_name, + schema_name, + not_after=None, + key_type=None): + list_content_callback_url = {} + list_content_callback_url['not_after'] = not_after + list_content_callback_url['key_type'] = key_type + return client.list_content_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + list_content_callback_url=list_content_callback_url) + + +def logic_integration_account_map_list(client, + resource_group_name, + integration_account_name, + top=None, + filter_=None): + return client.list(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter_) + + +def logic_integration_account_map_show(client, + resource_group_name, + integration_account_name, + map_name): + return client.get(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name) + + +def logic_integration_account_map_create(client, + resource_group_name, + integration_account_name, + map_name, + map_type, + properties_content_type, + location=None, + tags=None, + content=None, + metadata=None, + ref=None): + map = {} + map['location'] = location + map['tags'] = tags + map['map_type'] = map_type + map['content'] = content + map['content_type'] = properties_content_type + map['metadata'] = metadata + map['parameters_schema'] = {} + map['parameters_schema']['ref'] = ref + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + map=map) + + +def logic_integration_account_map_update(instance, + resource_group_name, + integration_account_name, + map_name, + map_type, + properties_content_type, + location=None, + tags=None, + content=None, + metadata=None, + ref=None): + if location is not None: + instance.location = location + if tags is not None: + instance.tags = tags + if map_type is not None: + instance.map_type = map_type + if content is not None: + instance.content = content + if properties_content_type is not None: + instance.content_type = properties_content_type + if metadata is not None: + instance.metadata = metadata + if ref is not None: + instance.parameters_schema.ref = ref + return instance + + +def logic_integration_account_map_delete(client, + resource_group_name, + integration_account_name, + map_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name) + + +def logic_integration_account_map_list_content_callback_url(client, + resource_group_name, + integration_account_name, + map_name, + not_after=None, + key_type=None): + list_content_callback_url = {} + list_content_callback_url['not_after'] = not_after + list_content_callback_url['key_type'] = key_type + return client.list_content_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + list_content_callback_url=list_content_callback_url) + + +def logic_integration_account_partner_list(client, + resource_group_name, + integration_account_name, + top=None, + filter_=None): + return client.list(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter_) + + +def logic_integration_account_partner_show(client, + resource_group_name, + integration_account_name, + partner_name): + return client.get(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name) + + +def logic_integration_account_partner_create(client, + resource_group_name, + integration_account_name, + partner_name, + partner_type, + location=None, + tags=None, + metadata=None, + business_identities=None): + partner = {} + partner['location'] = location + partner['tags'] = tags + partner['partner_type'] = partner_type + partner['metadata'] = metadata + partner['b2_b'] = {} + partner['b2_b']['business_identities'] = business_identities + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + partner=partner) + + +def logic_integration_account_partner_update(instance, + resource_group_name, + integration_account_name, + partner_name, + partner_type, + location=None, + tags=None, + metadata=None, + business_identities=None): + if location is not None: + instance.location = location + if tags is not None: + instance.tags = tags + if partner_type is not None: + instance.partner_type = partner_type + if metadata is not None: + instance.metadata = metadata + if business_identities is not None: + instance.b2_b.business_identities = business_identities + return instance + + +def logic_integration_account_partner_delete(client, + resource_group_name, + integration_account_name, + partner_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name) + + +def logic_integration_account_partner_list_content_callback_url(client, + resource_group_name, + integration_account_name, + partner_name, + not_after=None, + key_type=None): + list_content_callback_url = {} + list_content_callback_url['not_after'] = not_after + list_content_callback_url['key_type'] = key_type + return client.list_content_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + list_content_callback_url=list_content_callback_url) + + +def logic_integration_account_agreement_list(client, + resource_group_name, + integration_account_name, + top=None, + filter_=None): + return client.list(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter_) + + +def logic_integration_account_agreement_show(client, + resource_group_name, + integration_account_name, + agreement_name): + return client.get(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name) + + +def logic_integration_account_agreement_create(client, + resource_group_name, + integration_account_name, + agreement_name, + agreement): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + agreement=agreement) + + +def logic_integration_account_agreement_update(client, + resource_group_name, + integration_account_name, + agreement_name, + agreement): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + agreement=agreement) + + +def logic_integration_account_agreement_delete(client, + resource_group_name, + integration_account_name, + agreement_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name) + + +def logic_integration_account_agreement_list_content_callback_url(client, + resource_group_name, + integration_account_name, + agreement_name, + not_after=None, + key_type=None): + list_content_callback_url = {} + list_content_callback_url['not_after'] = not_after + list_content_callback_url['key_type'] = key_type + return client.list_content_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + list_content_callback_url=list_content_callback_url) + + +def logic_integration_account_certificate_list(client, + resource_group_name, + integration_account_name, + top=None): + return client.list(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top) + + +def logic_integration_account_certificate_show(client, + resource_group_name, + integration_account_name, + certificate_name): + return client.get(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name) + + +def logic_integration_account_certificate_create(client, + resource_group_name, + integration_account_name, + certificate_name, + location=None, + tags=None, + metadata=None, + public_certificate=None, + key_vault=None, + key_name=None, + key_version=None): + certificate = {} + certificate['location'] = location + certificate['tags'] = tags + certificate['metadata'] = metadata + certificate['public_certificate'] = public_certificate + certificate['key'] = {} + certificate['key']['key_vault'] = key_vault + certificate['key']['key_name'] = key_name + certificate['key']['key_version'] = key_version + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name, + certificate=certificate) + + +def logic_integration_account_certificate_update(instance, + resource_group_name, + integration_account_name, + certificate_name, + location=None, + tags=None, + metadata=None, + public_certificate=None, + key_vault=None, + key_name=None, + key_version=None): + if location is not None: + instance.location = location + if tags is not None: + instance.tags = tags + if metadata is not None: + instance.metadata = metadata + if public_certificate is not None: + instance.public_certificate = public_certificate + if key_vault is not None: + instance.key.key_vault = key_vault + if key_name is not None: + instance.key.key_name = key_name + if key_version is not None: + instance.key.key_version = key_version + return instance + + +def logic_integration_account_certificate_delete(client, + resource_group_name, + integration_account_name, + certificate_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name) + + +def logic_integration_account_session_list(client, + resource_group_name, + integration_account_name, + top=None, + filter_=None): + return client.list(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter_) + + +def logic_integration_account_session_show(client, + resource_group_name, + integration_account_name, + session_name): + return client.get(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name) + + +def logic_integration_account_session_create(client, + resource_group_name, + integration_account_name, + session_name, + location=None, + tags=None, + content=None): + session = {} + session['location'] = location + session['tags'] = tags + session['content'] = content + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name, + session=session) + + +def logic_integration_account_session_update(instance, + resource_group_name, + integration_account_name, + session_name, + location=None, + tags=None, + content=None): + if location is not None: + instance.location = location + if tags is not None: + instance.tags = tags + if content is not None: + instance.content = content + return instance + + +def logic_integration_account_session_delete(client, + resource_group_name, + integration_account_name, + session_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name) + + +def logic_integration_service_environment_list(client, + resource_group=None, + top=None): + if resource_group is not None: + return client.list_by_resource_group(resource_group=resource_group, + top=top) + return client.list_by_subscription(top=top) + + +def logic_integration_service_environment_show(client, + resource_group, + integration_service_environment_name): + return client.get(resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name) + + +def logic_integration_service_environment_create(client, + resource_group, + integration_service_environment_name, + location=None, + tags=None, + sku=None, + provisioning_state=None, + state=None, + integration_service_environment_id=None, + endpoints_configuration=None, + network_configuration=None, + encryption_configuration=None, + no_wait=False): + integration_service_environment = {} + integration_service_environment['location'] = location + integration_service_environment['tags'] = tags + integration_service_environment['sku'] = sku + integration_service_environment['properties'] = {} + integration_service_environment['properties']['provisioning_state'] = provisioning_state + integration_service_environment['properties']['state'] = state + integration_service_environment['properties']['integration_service_environment_id'] = integration_service_environment_id + integration_service_environment['properties']['endpoints_configuration'] = endpoints_configuration + integration_service_environment['properties']['network_configuration'] = network_configuration + integration_service_environment['properties']['encryption_configuration'] = encryption_configuration + return sdk_no_wait(no_wait, + client.begin_create_or_update, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment) + + +def logic_integration_service_environment_update(client, + resource_group, + integration_service_environment_name, + location=None, + tags=None, + sku=None, + provisioning_state=None, + state=None, + integration_service_environment_id=None, + endpoints_configuration=None, + network_configuration=None, + encryption_configuration=None, + no_wait=False): + integration_service_environment = {} + integration_service_environment['location'] = location + integration_service_environment['tags'] = tags + integration_service_environment['sku'] = sku + integration_service_environment['properties'] = {} + integration_service_environment['properties']['provisioning_state'] = provisioning_state + integration_service_environment['properties']['state'] = state + integration_service_environment['properties']['integration_service_environment_id'] = integration_service_environment_id + integration_service_environment['properties']['endpoints_configuration'] = endpoints_configuration + integration_service_environment['properties']['network_configuration'] = network_configuration + integration_service_environment['properties']['encryption_configuration'] = encryption_configuration + return sdk_no_wait(no_wait, + client.begin_update, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment) + + +def logic_integration_service_environment_delete(client, + resource_group, + integration_service_environment_name): + return client.delete(resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name) + + +def logic_integration_service_environment_restart(client, + resource_group, + integration_service_environment_name): + return client.restart(resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name) + + +def logic_integration_service_environment_sku_list(client, + resource_group, + integration_service_environment_name): + return client.list(resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name) + + +def logic_integration_service_environment_network_health_show(client, + resource_group, + integration_service_environment_name): + return client.get(resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name) + + +def logic_integration_service_environment_managed_api_list(client, + resource_group, + integration_service_environment_name): + return client.list(resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name) + + +def logic_integration_service_environment_managed_api_show(client, + resource_group, + integration_service_environment_name, + api_name): + return client.get(resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name) + + +def logic_integration_service_environment_managed_api_delete(client, + resource_group, + integration_service_environment_name, + api_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name) + + +def logic_integration_service_environment_managed_api_put(client, + resource_group, + integration_service_environment_name, + api_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_put, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name) + + +def logic_integration_service_environment_managed_api_operation_list(client, + resource_group, + integration_service_environment_name, + api_name): + return client.list(resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name) diff --git a/src/logic/azext_logic/tests/__init__.py b/src/logic/azext_logic/tests/__init__.py index c9cfdc73e77..70488e93851 100644 --- a/src/logic/azext_logic/tests/__init__.py +++ b/src/logic/azext_logic/tests/__init__.py @@ -8,5 +8,109 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- +import inspect +import logging +import os +import sys +import traceback +import datetime as dt +from azure.core.exceptions import AzureError +from azure.cli.testsdk.exceptions import CliTestError, CliExecutionError, JMESPathCheckAssertionError + + +logger = logging.getLogger('azure.cli.testsdk') +logger.addHandler(logging.StreamHandler()) __path__ = __import__('pkgutil').extend_path(__path__, __name__) +exceptions = [] +test_map = dict() +SUCCESSED = "successed" +FAILED = "failed" + + +def try_manual(func): + def import_manual_function(origin_func): + from importlib import import_module + decorated_path = inspect.getfile(origin_func).lower() + module_path = __path__[0].lower() + if not decorated_path.startswith(module_path): + raise Exception("Decorator can only be used in submodules!") + manual_path = os.path.join( + decorated_path[module_path.rfind(os.path.sep) + 1:]) + manual_file_path, manual_file_name = os.path.split(manual_path) + module_name, _ = os.path.splitext(manual_file_name) + manual_module = "..manual." + \ + ".".join(manual_file_path.split(os.path.sep) + [module_name, ]) + return getattr(import_module(manual_module, package=__name__), origin_func.__name__) + + def get_func_to_call(): + func_to_call = func + try: + func_to_call = import_manual_function(func) + logger.info("Found manual override for %s(...)", func.__name__) + except (ImportError, AttributeError): + pass + return func_to_call + + def wrapper(*args, **kwargs): + func_to_call = get_func_to_call() + logger.info("running %s()...", func.__name__) + try: + test_map[func.__name__] = dict() + test_map[func.__name__]["result"] = SUCCESSED + test_map[func.__name__]["error_message"] = "" + test_map[func.__name__]["error_stack"] = "" + test_map[func.__name__]["error_normalized"] = "" + test_map[func.__name__]["start_dt"] = dt.datetime.utcnow() + ret = func_to_call(*args, **kwargs) + except (AssertionError, AzureError, CliTestError, CliExecutionError, SystemExit, + JMESPathCheckAssertionError) as e: + use_exception_cache = os.getenv("TEST_EXCEPTION_CACHE") + if use_exception_cache is None or use_exception_cache.lower() != "true": + raise + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + test_map[func.__name__]["result"] = FAILED + test_map[func.__name__]["error_message"] = str(e).replace("\r\n", " ").replace("\n", " ")[:500] + test_map[func.__name__]["error_stack"] = traceback.format_exc().replace( + "\r\n", " ").replace("\n", " ")[:500] + logger.info("--------------------------------------") + logger.info("step exception: %s", e) + logger.error("--------------------------------------") + logger.error("step exception in %s: %s", func.__name__, e) + logger.info(traceback.format_exc()) + exceptions.append((func.__name__, sys.exc_info())) + else: + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + return ret + + if inspect.isclass(func): + return get_func_to_call() + return wrapper + + +def calc_coverage(filename): + filename = filename.split(".")[0] + coverage_name = filename + "_coverage.md" + with open(coverage_name, "w") as f: + f.write("|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt|\n") + total = len(test_map) + covered = 0 + for k, v in test_map.items(): + if not k.startswith("step_"): + total -= 1 + continue + if v["result"] == SUCCESSED: + covered += 1 + f.write("|{step_name}|{result}|{error_message}|{error_stack}|{error_normalized}|{start_dt}|" + "{end_dt}|\n".format(step_name=k, **v)) + f.write("Coverage: {}/{}\n".format(covered, total)) + print("Create coverage\n", file=sys.stderr) + + +def raise_if(): + if exceptions: + if len(exceptions) <= 1: + raise exceptions[0][1][1] + message = "{}\nFollowed with exceptions in other steps:\n".format(str(exceptions[0][1][1])) + message += "\n".join(["{}: {}".format(h[0], h[1][1]) for h in exceptions[1:]]) + raise exceptions[0][1][0](message).with_traceback(exceptions[0][1][2]) diff --git a/src/logic/azext_logic/tests/latest/example_steps.py b/src/logic/azext_logic/tests/latest/example_steps.py new file mode 100644 index 00000000000..169aed64c91 --- /dev/null +++ b/src/logic/azext_logic/tests/latest/example_steps.py @@ -0,0 +1,1496 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +from .. import try_manual + + +# EXAMPLE: /IntegrationAccounts/put/Create or update an integration account +@try_manual +def step_integration_account_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account create ' + '--location "westus" ' + '--sku name="Standard" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccounts/get/Get integration account by name +@try_manual +def step_integration_account_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account show ' + '--name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccounts/get/List integration accounts by resource group name +@try_manual +def step_integration_account_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account list ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccounts/get/List integration accounts by subscription +@try_manual +def step_integration_account_list2(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /IntegrationAccounts/patch/Patch an integration account +@try_manual +def step_integration_account_update(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account update ' + '--location "westus" ' + '--sku name="Standard" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccounts/post/Get Integration Account callback URL +@try_manual +def step_integration_account_list_key_vault_key(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account list-key-vault-key ' + '--name "{myIntegrationAccount2}" ' + '--id "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testResourceGroup/providers/Micro' + 'soft.KeyVault/vaults/testKeyVault" ' + '--skip-token "testSkipToken" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccounts/post/List IntegrationAccount callback URL +@try_manual +def step_integration_account_list_callback_url(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account list-callback-url ' + '--name "{myIntegrationAccount2}" ' + '--key-type "Primary" ' + '--not-after "2017-03-05T08:00:00Z" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccounts/post/Log a tracked event +@try_manual +def step_integration_account_log_tracking_event(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account log-tracking-event ' + '--name "{myIntegrationAccount2}" ' + '--events "[{{\\"error\\":{{\\"code\\":\\"NotFound\\",\\"message\\":\\"Some error ' + 'occurred\\"}},\\"eventLevel\\":\\"Informational\\",\\"eventTime\\":\\"2016-08-05T01:54:49.505567Z\\",\\"r' + 'ecord\\":{{\\"agreementProperties\\":{{\\"agreementName\\":\\"testAgreement\\",\\"as2From\\":\\"testas2fr' + 'om\\",\\"as2To\\":\\"testas2to\\",\\"receiverPartnerName\\":\\"testPartner2\\",\\"senderPartnerName\\":\\' + '"testPartner1\\"}},\\"messageProperties\\":{{\\"IsMessageEncrypted\\":false,\\"IsMessageSigned\\":false,' + '\\"correlationMessageId\\":\\"Unique message identifier\\",\\"direction\\":\\"Receive\\",\\"dispositionTy' + 'pe\\":\\"received-success\\",\\"fileName\\":\\"test\\",\\"isMdnExpected\\":true,\\"isMessageCompressed\\"' + ':false,\\"isMessageFailed\\":false,\\"isNrrEnabled\\":true,\\"mdnType\\":\\"Async\\",\\"messageId\\":\\"1' + '2345\\"}}}},\\"recordType\\":\\"AS2Message\\"}}]" ' + '--source-type "Microsoft.Logic/workflows" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccounts/post/Regenerate access key +@try_manual +def step_integration_account_regenerate_access_key(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account regenerate-access-key ' + '--name "{myIntegrationAccount2}" ' + '--key-type "Primary" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAgreements/put/Create or update an agreement +@try_manual +def step_integration_account_agreement_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-agreement create ' + '--agreement "{{\\"location\\":\\"westus\\",\\"tags\\":{{\\"IntegrationAccountAgreement\\":\\"\\"}},\\"metadata\\":{{}},\\"agreementType\\":\\"AS2\\",\\"hostPartner\\":\\"HostPar' + 'tner\\",\\"guestPartner\\":\\"GuestPartner\\",\\"hostIdentity\\":{{\\"qualifier\\":\\"ZZ\\",\\"value\\":' + '\\"ZZ\\"}},\\"guestIdentity\\":{{\\"qualifier\\":\\"AA\\",\\"value\\":\\"AA\\"}},\\"content\\":{{\\"aS2\\' + '":{{\\"receiveAgreement\\":{{\\"protocolSettings\\":{{\\"acknowledgementConnectionSettings\\":{{\\"ignore' + 'CertificateNameMismatch\\":true,\\"keepHttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":tr' + 'ue,\\"unfoldHttpHeaders\\":true}},\\"envelopeSettings\\":{{\\"autogenerateFileName\\":true,\\"fileNameTem' + 'plate\\":\\"Test\\",\\"messageContentType\\":\\"text/plain\\",\\"suspendMessageOnFileNameGenerationError' + '\\":true,\\"transmitFileNameInMimeHeader\\":true}},\\"errorSettings\\":{{\\"resendIfMDNNotReceived\\":tru' + 'e,\\"suspendDuplicateMessage\\":true}},\\"mdnSettings\\":{{\\"dispositionNotificationTo\\":\\"http://temp' + 'uri.org\\",\\"mdnText\\":\\"Sample\\",\\"micHashingAlgorithm\\":\\"SHA1\\",\\"needMDN\\":true,\\"receiptD' + 'eliveryUrl\\":\\"http://tempuri.org\\",\\"sendInboundMDNToMessageBox\\":true,\\"sendMDNAsynchronously\\":' + 'true,\\"signMDN\\":true,\\"signOutboundMDNIfOptional\\":true}},\\"messageConnectionSettings\\":{{\\"ignor' + 'eCertificateNameMismatch\\":true,\\"keepHttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":t' + 'rue,\\"unfoldHttpHeaders\\":true}},\\"securitySettings\\":{{\\"enableNRRForInboundDecodedMessages\\":true' + ',\\"enableNRRForInboundEncodedMessages\\":true,\\"enableNRRForInboundMDN\\":true,\\"enableNRRForOutboundD' + 'ecodedMessages\\":true,\\"enableNRRForOutboundEncodedMessages\\":true,\\"enableNRRForOutboundMDN\\":true,' + '\\"overrideGroupSigningCertificate\\":false}},\\"validationSettings\\":{{\\"checkCertificateRevocationLis' + 'tOnReceive\\":true,\\"checkCertificateRevocationListOnSend\\":true,\\"checkDuplicateMessage\\":true,\\"co' + 'mpressMessage\\":true,\\"encryptMessage\\":false,\\"encryptionAlgorithm\\":\\"AES128\\",\\"interchangeDup' + 'licatesValidityDays\\":100,\\"overrideMessageProperties\\":true,\\"signMessage\\":false}}}},\\"receiverBu' + 'sinessIdentity\\":{{\\"qualifier\\":\\"ZZ\\",\\"value\\":\\"ZZ\\"}},\\"senderBusinessIdentity\\":{{\\"qua' + 'lifier\\":\\"AA\\",\\"value\\":\\"AA\\"}}}},\\"sendAgreement\\":{{\\"protocolSettings\\":{{\\"acknowledge' + 'mentConnectionSettings\\":{{\\"ignoreCertificateNameMismatch\\":true,\\"keepHttpConnectionAlive\\":true,' + '\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true}},\\"envelopeSettings\\":{{\\"autog' + 'enerateFileName\\":true,\\"fileNameTemplate\\":\\"Test\\",\\"messageContentType\\":\\"text/plain\\",\\"su' + 'spendMessageOnFileNameGenerationError\\":true,\\"transmitFileNameInMimeHeader\\":true}},\\"errorSettings' + '\\":{{\\"resendIfMDNNotReceived\\":true,\\"suspendDuplicateMessage\\":true}},\\"mdnSettings\\":{{\\"dispo' + 'sitionNotificationTo\\":\\"http://tempuri.org\\",\\"mdnText\\":\\"Sample\\",\\"micHashingAlgorithm\\":\\"' + 'SHA1\\",\\"needMDN\\":true,\\"receiptDeliveryUrl\\":\\"http://tempuri.org\\",\\"sendInboundMDNToMessageBo' + 'x\\":true,\\"sendMDNAsynchronously\\":true,\\"signMDN\\":true,\\"signOutboundMDNIfOptional\\":true}},\\"m' + 'essageConnectionSettings\\":{{\\"ignoreCertificateNameMismatch\\":true,\\"keepHttpConnectionAlive\\":true' + ',\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true}},\\"securitySettings\\":{{\\"enab' + 'leNRRForInboundDecodedMessages\\":true,\\"enableNRRForInboundEncodedMessages\\":true,\\"enableNRRForInbou' + 'ndMDN\\":true,\\"enableNRRForOutboundDecodedMessages\\":true,\\"enableNRRForOutboundEncodedMessages\\":tr' + 'ue,\\"enableNRRForOutboundMDN\\":true,\\"overrideGroupSigningCertificate\\":false}},\\"validationSettings' + '\\":{{\\"checkCertificateRevocationListOnReceive\\":true,\\"checkCertificateRevocationListOnSend\\":true,' + '\\"checkDuplicateMessage\\":true,\\"compressMessage\\":true,\\"encryptMessage\\":false,\\"encryptionAlgor' + 'ithm\\":\\"AES128\\",\\"interchangeDuplicatesValidityDays\\":100,\\"overrideMessageProperties\\":true,\\"' + 'signMessage\\":false}}}},\\"receiverBusinessIdentity\\":{{\\"qualifier\\":\\"AA\\",\\"value\\":\\"AA\\"}}' + ',\\"senderBusinessIdentity\\":{{\\"qualifier\\":\\"ZZ\\",\\"value\\":\\"ZZ\\"}}}}}}}}}}" ' + '--agreement-name "testAgreement" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAgreements/get/Get agreement by name +@try_manual +def step_integration_account_agreement_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-agreement show ' + '--agreement-name "testAgreement" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAgreements/get/Get agreements by integration account name +@try_manual +def step_integration_account_agreement_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-agreement list ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAgreements/post/Get the content callback url +@try_manual +def step_integration_account_agreement(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-agreement list-content-callback-url ' + '--agreement-name "testAgreement" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--key-type "Primary" ' + '--not-after "2018-04-19T16:00:00Z" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAgreements/delete/Delete an agreement +@try_manual +def step_integration_account_agreement_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-agreement delete -y ' + '--agreement-name "testAgreement" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAssemblies/put/Create or update an account assembly +@try_manual +def step_integration_account_assembly_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-assembly create ' + '--location "westus" ' + '--properties assembly-name="System.IdentityModel.Tokens.Jwt" content="Base64 encoded Assembly Content" ' + 'metadata={{}} ' + '--assembly-artifact-name "testAssembly" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAssemblies/get/Get an integration account assembly +@try_manual +def step_integration_account_assembly_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-assembly show ' + '--assembly-artifact-name "testAssembly" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAssemblies/get/List integration account assemblies +@try_manual +def step_integration_account_assembly_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-assembly list ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAssemblies/post/Get the callback url for an integration account assembly +@try_manual +def step_integration_account_assembly(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-assembly list-content-callback-url ' + '--assembly-artifact-name "testAssembly" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountAssemblies/delete/Delete an integration account assembly +@try_manual +def step_integration_account_assembly_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-assembly delete -y ' + '--assembly-artifact-name "testAssembly" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountBatchConfigurations/put/Create or update a batch configuration +@try_manual +def step_integration_account_batch(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-batch-configuration create ' + '--location "westus" ' + '--batch-group-name "DEFAULT" ' + '--batch-size 234567 ' + '--message-count 10 ' + '--frequency "Minute" ' + '--interval 1 ' + '--start-time "2017-03-24T11:43:00" ' + '--time-zone "India Standard Time" ' + '--batch-configuration-name "testBatchConfiguration" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountBatchConfigurations/get/Get a batch configuration +@try_manual +def step_integration_account_batch_configuration_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-batch-configuration show ' + '--batch-configuration-name "testBatchConfiguration" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountBatchConfigurations/get/List batch configurations +@try_manual +def step_integration_account_batch_configuration_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-batch-configuration list ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountBatchConfigurations/delete/Delete a batch configuration +@try_manual +def step_integration_account_batch2(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-batch-configuration delete -y ' + '--batch-configuration-name "testBatchConfiguration" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountCertificates/put/Create or update a certificate +@try_manual +def step_integration_account_certificate_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-certificate create ' + '--location "brazilsouth" ' + '--key-name "" ' + '--key-vault id="/subscriptions/{subscription_id}/resourcegroups/{rg_2}/providers/microsoft.keyvault/vault' + 's/" ' + '--key-version "87d9764197604449b9b8eb7bd8710868" ' + '--public-certificate "" ' + '--certificate-name "testCertificate" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountCertificates/get/Get certificate by name +@try_manual +def step_integration_account_certificate_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-certificate show ' + '--certificate-name "testCertificate" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountCertificates/get/Get certificates by integration account name +@try_manual +def step_integration_account_certificate_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-certificate list ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountCertificates/delete/Delete a certificate +@try_manual +def step_integration_account_certificate_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-certificate delete -y ' + '--certificate-name "testCertificate" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountMaps/put/Create or update a map +@try_manual +def step_integration_account_map_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-map create ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--location "westus" ' + '--content "\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n \\r\\n ' + '\\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + '\\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n \\r\\' + 'n \\r\\n \\r\\n ' + '\\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n" ' + '--properties-content-type "application/xml" ' + '--map-type "Xslt" ' + '--metadata "{{}}" ' + '--map-name "testMap" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountMaps/get/Get map by name +@try_manual +def step_integration_account_map_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-map show ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--map-name "testMap" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountMaps/get/Get maps by integration account name +@try_manual +def step_integration_account_map_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-map list ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountMaps/post/Get the content callback url +@try_manual +def step_integration_account_map(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-map list-content-callback-url ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--key-type "Primary" ' + '--not-after "2018-04-19T16:00:00Z" ' + '--map-name "testMap" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountMaps/delete/Delete a map +@try_manual +def step_integration_account_map_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-map delete -y ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--map-name "testMap" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountPartners/put/Create or update a partner +@try_manual +def step_integration_account_partner_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-partner create ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--location "westus" ' + '--business-identities qualifier="AA" value="ZZ" ' + '--metadata "{{}}" ' + '--partner-type "B2B" ' + '--partner-name "testPartner" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountPartners/get/Get partner by name +@try_manual +def step_integration_account_partner_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-partner show ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--partner-name "testPartner" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountPartners/get/Get partners by integration account name +@try_manual +def step_integration_account_partner_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-partner list ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountPartners/post/Get the content callback url +@try_manual +def step_integration_account_partner(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-partner list-content-callback-url ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--key-type "Primary" ' + '--not-after "2018-04-19T16:00:00Z" ' + '--partner-name "testPartner" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountPartners/delete/Delete a partner +@try_manual +def step_integration_account_partner_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-partner delete -y ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--partner-name "testPartner" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountSchemas/put/Create or update schema +@try_manual +def step_integration_account_schema_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-schema create ' + '--location "westus" ' + '--content "\\r\\n\\r\\n' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + '\\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + '\\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + ' \\r\\n ' + '\\r\\n \\r\\n \\r\\n ' + ' \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n ' + '\\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + ' \\r\\n \\r\\n \\r\\n ' + '\\r\\n \\r\\n" ' + '--properties-content-type "application/xml" ' + '--metadata "{{}}" ' + '--schema-type "Xml" ' + '--tags integrationAccountSchemaName="IntegrationAccountSchema8120" ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}" ' + '--schema-name "testSchema"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountSchemas/get/Get schema by name +@try_manual +def step_integration_account_schema_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-schema show ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}" ' + '--schema-name "testSchema"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountSchemas/get/Get schemas by integration account name +@try_manual +def step_integration_account_schema_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-schema list ' + '--integration-account-name "{myIntegrationAccount3}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountSchemas/post/Get the content callback url +@try_manual +def step_integration_account_schema(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-schema list-content-callback-url ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--key-type "Primary" ' + '--not-after "2018-04-19T16:00:00Z" ' + '--resource-group "{rg_2}" ' + '--schema-name "testSchema"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountSchemas/delete/Delete a schema by name +@try_manual +def step_integration_account_schema_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-schema delete -y ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}" ' + '--schema-name "testSchema"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountSessions/put/Create or update an integration account session +@try_manual +def step_integration_account_session_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-session create ' + '--integration-account-name "{myIntegrationAccount4}" ' + '--resource-group "{rg_3}" ' + '--content "{{\\"controlNumber\\":\\"1234\\",\\"controlNumberChangedTime\\":\\"2017-02-21T22:30:11.9923759' + 'Z\\"}}" ' + '--session-name "testsession123-ICN"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountSessions/get/Get a list of integration account sessions +@try_manual +def step_integration_account_session_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-session list ' + '--integration-account-name "{myIntegrationAccount4}" ' + '--resource-group "{rg_3}"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountSessions/get/Get an integration account session +@try_manual +def step_integration_account_session_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-session show ' + '--integration-account-name "{myIntegrationAccount4}" ' + '--resource-group "{rg_3}" ' + '--session-name "testsession123-ICN"', + checks=checks) + + +# EXAMPLE: /IntegrationAccountSessions/delete/Delete an integration account session +@try_manual +def step_integration_account_session_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account-session delete -y ' + '--integration-account-name "{myIntegrationAccount4}" ' + '--resource-group "{rg_3}" ' + '--session-name "testsession123-ICN"', + checks=checks) + + +# EXAMPLE: /IntegrationAccounts/delete/Delete an integration account +@try_manual +def step_integration_account_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-account delete -y ' + '--name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironments/put/Create or update an integration service environment +@try_manual +def step_integration_service_environment_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment create ' + '--location "brazilsouth" ' + '--encryption-configuration "{{\\"encryptionKeyReference\\":{{\\"keyName\\":\\"testKeyName\\",\\"keyVault' + '\\":{{\\"id\\":\\"/subscriptions/{subscription_id}/resourceGroups/{rg_2}/providers/Microsoft.KeyVault/vau' + 'lts/testKeyVault\\"}},\\"keyVersion\\":\\"13b261d30b984753869902d7f47f4d55\\"}}}}" ' + '--network-configuration "{{\\"accessEndpoint\\":{{\\"type\\":\\"Internal\\"}},\\"subnets\\":[{{\\"id\\":' + '\\"/subscriptions/{subscription_id}/resourceGroups/{rg_2}/providers/Microsoft.Network/virtualNetworks/{vn' + '}/subnets/default\\"}},{{\\"id\\":\\"/subscriptions/{subscription_id}/resourceGroups/{rg_2}/providers/Mic' + 'rosoft.Network/virtualNetworks/{vn}/subnets/default\\"}},{{\\"id\\":\\"/subscriptions/{subscription_id}/r' + 'esourceGroups/{rg_2}/providers/Microsoft.Network/virtualNetworks/{vn}/subnets/default\\"}},{{\\"id\\":\\"' + '/subscriptions/{subscription_id}/resourceGroups/{rg_2}/providers/Microsoft.Network/virtualNetworks/{vn}/s' + 'ubnets/default\\"}}]}}" ' + '--sku name="Premium" capacity=2 ' + '--name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + test.cmd('az logic integration-service-environment wait --created ' + '--name "{myIntegrationServiceEnvironment}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironments/get/Get integration service environment by name +@try_manual +def step_integration_service_environment_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment show ' + '--name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironments/get/List integration service environments by resource group name +@try_manual +def step_integration_service_environment_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment list ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironments/get/List integration service environments by subscription +@try_manual +def step_integration_service_environment_list2(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment list', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironments/patch/Patch an integration service environment +@try_manual +def step_integration_service_environment_update(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment update ' + '--sku name="Developer" capacity=0 ' + '--tags tag1="value1" ' + '--name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironments/post/Restarts an integration service environment +@try_manual +def step_integration_service_environment_restart(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment restart ' + '--name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironmentManagedApiOperations/get/Gets the integration service environment managed Apis +@try_manual +def step_integration_service_environment(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment-managed-api-operation list ' + '--api-name "servicebus" ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironmentManagedApis/put/Gets the integration service environment managed Apis +@try_manual +def step_integration_service_environment2(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment-managed-api put ' + '--api-name "servicebus" ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironmentManagedApis/get/Gets the integration service environment managed Apis +@try_manual +def step_integration_service_environment3(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment-managed-api list ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironmentManagedApis/delete/Deletes the integration service environment managed Apis +@try_manual +def step_integration_service_environment4(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment-managed-api delete -y ' + '--api-name "servicebus" ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironmentNetworkHealth/get/Gets the integration service environment network health +@try_manual +def step_integration_service_environment5(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment-network-health show ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironmentSkus/get/List integration service environment skus +@try_manual +def step_integration_service_environment_sku_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment-sku list ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /IntegrationServiceEnvironments/delete/Delete an integration account +@try_manual +def step_integration_service_environment_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic integration-service-environment delete -y ' + '--name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /Workflows/put/Create or update a workflow +@try_manual +def step_workflow_create(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow create ' + '--resource-group "{rg}" ' + '--location "brazilsouth" ' + '--definition "{{\\"$schema\\":\\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/20' + '16-06-01/workflowdefinition.json#\\",\\"actions\\":{{\\"Find_pet_by_ID\\":{{\\"type\\":\\"ApiConnection\\' + '",\\"inputs\\":{{\\"path\\":\\"/pet/@{{{{encodeURIComponent(\'1\')}}}}\\",\\"method\\":\\"get\\",\\"host' + '\\":{{\\"connection\\":{{\\"name\\":\\"@parameters(\'$connections\')[\'test-custom-connector\'][\'connect' + 'ionId\']\\"}}}}}},\\"runAfter\\":{{}}}}}},\\"contentVersion\\":\\"1.0.0.0\\",\\"outputs\\":{{}},\\"parame' + 'ters\\":{{\\"$connections\\":{{\\"type\\":\\"Object\\",\\"defaultValue\\":{{}}}}}},\\"triggers\\":{{\\"ma' + 'nual\\":{{\\"type\\":\\"Request\\",\\"inputs\\":{{\\"schema\\":{{}}}},\\"kind\\":\\"Http\\"}}}}}}" ' + '--resource-reference-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Logic/i' + 'ntegrationAccounts/{myIntegrationAccount}" ' + '--parameters "{{\\"$connections\\":{{\\"value\\":{{\\"test-custom-connector\\":{{\\"connectionId\\":\\"/s' + 'ubscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Web/connections/test-custom-connec' + 'tor\\",\\"connectionName\\":\\"test-custom-connector\\",\\"id\\":\\"/subscriptions/{subscription_id}/prov' + 'iders/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-connector\\"}}}}}}}}" ' + '--name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /Workflows/get/Get a workflow +@try_manual +def step_workflow_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow show ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /Workflows/get/List all workflows in a resource group +@try_manual +def step_workflow_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow list ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Workflows/get/List all workflows in a subscription +@try_manual +def step_workflow_list2(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /Workflows/patch/Patch a workflow +@try_manual +def step_workflow_update(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow update ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /Workflows/post/Disable a workflow +@try_manual +def step_workflow_disable(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow disable ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /Workflows/post/Enable a workflow +@try_manual +def step_workflow_enable(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow enable ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /Workflows/post/Generate an upgraded definition +@try_manual +def step_workflow_generate_upgraded_definition(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow generate-upgraded-definition ' + '--target-schema-version "2016-06-01" ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /Workflows/post/Get callback url +@try_manual +def step_workflow_list_callback_url(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow list-callback-url ' + '--key-type "Primary" ' + '--not-after "2018-04-19T16:00:00Z" ' + '--resource-group "{rg_2}" ' + '--name "{myWorkflow2}"', + checks=checks) + + +# EXAMPLE: /Workflows/post/Get the swagger for a workflow +@try_manual +def step_workflow_list_swagger(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow list-swagger ' + '--resource-group "{rg_2}" ' + '--name "{myWorkflow3}"', + checks=checks) + + +# EXAMPLE: /Workflows/post/Move a workflow +@try_manual +def step_workflow_move(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow move ' + '--id "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/newResourceGroup/providers/Micros' + 'oft.Logic/workflows/newWorkflowName" ' + '--resource-group "{rg_2}" ' + '--name "{myWorkflow2}"', + checks=checks) + + +# EXAMPLE: /Workflows/post/Regenerate the callback URL access key for request triggers +@try_manual +def step_workflow_regenerate_access_key(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow regenerate-access-key ' + '--key-type "Primary" ' + '--resource-group "{rg_2}" ' + '--name "{myWorkflow3}"', + checks=checks) + + +# EXAMPLE: /Workflows/post/Validate a workflow +@try_manual +def step_workflow_validate_by_location(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow validate-by-location ' + '--location "brazilsouth" ' + '--resource-group "{rg}" ' + '--resource-location "brazilsouth" ' + '--definition "{{\\"$schema\\":\\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/20' + '16-06-01/workflowdefinition.json#\\",\\"actions\\":{{}},\\"contentVersion\\":\\"1.0.0.0\\",\\"outputs\\":' + '{{}},\\"parameters\\":{{}},\\"triggers\\":{{}}}}" ' + '--resource-reference-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Logic/i' + 'ntegrationAccounts/{myIntegrationAccount}" ' + '--name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActionRepetitions/get/Get a repetition +@try_manual +def step_workflow_run_action_repetition_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action-repetition show ' + '--action-name "testAction" ' + '--repetition-name "000001" ' + '--resource-group "{rg_2}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow4}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActionRepetitions/get/List repetitions +@try_manual +def step_workflow_run_action_repetition_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action-repetition list ' + '--action-name "testAction" ' + '--resource-group "{rg_2}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow4}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActionRepetitions/post/List expression traces for a repetition +@try_manual +def step_workflow_run_action(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action-repetition list-expression-trace ' + '--action-name "testAction" ' + '--repetition-name "000001" ' + '--resource-group "{rg_2}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow4}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActionRepetitionsRequestHistories/get/Get a repetition request history +@try_manual +def step_workflow_run_action2(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action-repetition-request-history show ' + '--action-name "HTTP_Webhook" ' + '--repetition-name "000001" ' + '--request-history-name "08586611142732800686" ' + '--resource-group "{rg}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActionRepetitionsRequestHistories/get/List repetition request history +@try_manual +def step_workflow_run_action3(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action-repetition-request-history list ' + '--action-name "HTTP_Webhook" ' + '--repetition-name "000001" ' + '--resource-group "{rg}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActionRequestHistories/get/Get a request history +@try_manual +def step_workflow_run_action_request_history_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action-request-history show ' + '--action-name "HTTP_Webhook" ' + '--request-history-name "08586611142732800686" ' + '--resource-group "{rg}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActionRequestHistories/get/List a request history +@try_manual +def step_workflow_run_action_request_history_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action-request-history list ' + '--action-name "HTTP_Webhook" ' + '--resource-group "{rg}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActions/get/Get a workflow run action +@try_manual +def step_workflow_run_action_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action show ' + '--action-name "HTTP" ' + '--resource-group "{rg}" ' + '--run-name "08586676746934337772206998657CU22" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActions/get/List a workflow run actions +@try_manual +def step_workflow_run_action_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action list ' + '--resource-group "{rg}" ' + '--run-name "08586676746934337772206998657CU22" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActions/post/List expression traces +@try_manual +def step_workflow_run_action_list_expression_trace(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action list-expression-trace ' + '--action-name "testAction" ' + '--resource-group "{rg_2}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow4}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActionScopeRepetitions/get/Get a scoped repetition +@try_manual +def step_workflow_run_action_scope_repetition_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action-scope-repetition show ' + '--action-name "for_each" ' + '--repetition-name "000000" ' + '--resource-group "{rg_2}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow4}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunActionScopeRepetitions/get/List the scoped repetitions +@try_manual +def step_workflow_run_action_scope_repetition_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-action-scope-repetition list ' + '--action-name "for_each" ' + '--resource-group "{rg_2}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow4}"', + checks=checks) + + +# EXAMPLE: /WorkflowRunOperations/get/Get a run operation +@try_manual +def step_workflow_run_operation_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run-operation show ' + '--operation-id "ebdcbbde-c4db-43ec-987c-fd0f7726f43b" ' + '--resource-group "{rg_2}" ' + '--run-name "08586774142730039209110422528" ' + '--workflow-name "{myWorkflow4}"', + checks=checks) + + +# EXAMPLE: /WorkflowRuns/get/Get a run for a workflow +@try_manual +def step_workflow_run_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run show ' + '--resource-group "{rg}" ' + '--run-name "08586676746934337772206998657CU22" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowRuns/get/List workflow runs +@try_manual +def step_workflow_run_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run list ' + '--resource-group "{rg}" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowRuns/post/Cancel a workflow run +@try_manual +def step_workflow_run_cancel(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-run cancel ' + '--resource-group "{rg}" ' + '--run-name "08586676746934337772206998657CU22" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggerHistories/get/Get a workflow trigger history +@try_manual +def step_workflow_trigger_history_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger-history show ' + '--history-name "08586676746934337772206998657CU22" ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTriggerName" ' + '--workflow-name "{myWorkflow3}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggerHistories/get/List a workflow trigger history +@try_manual +def step_workflow_trigger_history_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger-history list ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTriggerName" ' + '--workflow-name "{myWorkflow3}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggerHistories/post/Resubmit a workflow run based on the trigger history +@try_manual +def step_workflow_trigger_history_resubmit(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger-history resubmit ' + '--history-name "testHistoryName" ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTriggerName" ' + '--workflow-name "{myWorkflow3}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggers/get/Get a workflow trigger +@try_manual +def step_workflow_trigger_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger show ' + '--resource-group "{rg}" ' + '--trigger-name "manual" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggers/get/Get trigger schema +@try_manual +def step_workflow_trigger_show_schema_json(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger show-schema-json ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTrigger" ' + '--workflow-name "{myWorkflow2}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggers/get/List workflow triggers +@try_manual +def step_workflow_trigger_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger list ' + '--resource-group "{rg}" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggers/post/Get the callback URL for a trigger +@try_manual +def step_workflow_trigger_list_callback_url(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger list-callback-url ' + '--resource-group "{rg}" ' + '--trigger-name "manual" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggers/post/Reset trigger +@try_manual +def step_workflow_trigger_reset(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger reset ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTrigger" ' + '--workflow-name "{myWorkflow2}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggers/post/Run a workflow trigger +@try_manual +def step_workflow_trigger_run(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger run ' + '--resource-group "{rg}" ' + '--trigger-name "manual" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowTriggers/post/Set trigger state +@try_manual +def step_workflow_trigger_set_state(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-trigger set-state ' + '--resource-group "{rg_2}" ' + '--source id="subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/sourceResGroup/providers/M' + 'icrosoft.Logic/workflows/sourceWorkflow/triggers/sourceTrigger" ' + '--trigger-name "testTrigger" ' + '--workflow-name "{myWorkflow2}"', + checks=checks) + + +# EXAMPLE: /WorkflowVersions/get/Get a workflow version +@try_manual +def step_workflow_version_show(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-version show ' + '--resource-group "{rg}" ' + '--version-id "08586676824806722526" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowVersions/get/List a workflows versions +@try_manual +def step_workflow_version_list(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-version list ' + '--resource-group "{rg}" ' + '--workflow-name "{myWorkflow}"', + checks=checks) + + +# EXAMPLE: /WorkflowVersionTriggers/post/Get the callback url for a trigger of a workflow version +@try_manual +def step_workflow_version_trigger_list_callback_url(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow-version-trigger list-callback-url ' + '--key-type "Primary" ' + '--not-after "2017-03-05T08:00:00Z" ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTriggerName" ' + '--version-id "testWorkflowVersionId" ' + '--workflow-name "{myWorkflow3}"', + checks=checks) + + +# EXAMPLE: /Workflows/delete/Delete a workflow +@try_manual +def step_workflow_delete(test, rg, rg_2, rg_3, checks=None): + if checks is None: + checks = [] + test.cmd('az logic workflow delete -y ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=checks) + diff --git a/src/logic/azext_logic/tests/latest/integration.json b/src/logic/azext_logic/tests/latest/integration.json deleted file mode 100644 index d8d7945ffb6..00000000000 --- a/src/logic/azext_logic/tests/latest/integration.json +++ /dev/null @@ -1,6 +0,0 @@ -{"properties": {}, - "sku": { - "name": "Standard" - }, - "location": "centralus" -} \ No newline at end of file diff --git a/src/logic/azext_logic/tests/latest/preparers.py b/src/logic/azext_logic/tests/latest/preparers.py new file mode 100644 index 00000000000..0879e51945a --- /dev/null +++ b/src/logic/azext_logic/tests/latest/preparers.py @@ -0,0 +1,159 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from datetime import datetime +from azure_devtools.scenario_tests import SingleValueReplacer +from azure.cli.testsdk.preparers import NoTrafficRecordingPreparer +from azure.cli.testsdk.exceptions import CliTestError +from azure.cli.testsdk.reverse_dependency import get_dummy_cli + + +KEY_RESOURCE_GROUP = 'rg' +KEY_VIRTUAL_NETWORK = 'vnet' +KEY_VNET_SUBNET = 'subnet' +KEY_VNET_NIC = 'nic' + + +class VirtualNetworkPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.vn', + parameter_name='virtual_network', + resource_group_name=None, + resource_group_key=KEY_RESOURCE_GROUP, + dev_setting_name='AZURE_CLI_TEST_DEV_VIRTUAL_NETWORK_NAME', + random_name_length=24, key=KEY_VIRTUAL_NETWORK): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VirtualNetworkPreparer, self).__init__( + name_prefix, random_name_length) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group_name = resource_group_name + self.resource_group_key = resource_group_key + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group_name: + self.resource_group_name = self.test_class_instance.kwargs.get( + self.resource_group_key) + if not self.resource_group_name: + raise CliTestError("Error: No resource group configured!") + + tags = {'product': 'azurecli', 'cause': 'automation', + 'date': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')} + if 'ENV_JOB_NAME' in os.environ: + tags['job'] = os.environ['ENV_JOB_NAME'] + tags = ' '.join(['{}={}'.format(key, value) + for key, value in tags.items()]) + template = 'az network vnet create --resource-group {} --name {} --subnet-name default --tag ' + tags + self.live_only_execute(self.cli_ctx, template.format( + self.resource_group_name, name)) + + self.test_class_instance.kwargs[self.key] = name + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + # delete vnet if test is being recorded and if the vnet is not a dev rg + if not self.dev_setting_name: + self.live_only_execute( + self.cli_ctx, + 'az network vnet delete --name {} --resource-group {}'.format(name, self.resource_group_name)) + + +class VnetSubnetPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.vn', + parameter_name='subnet', + resource_group_key=KEY_RESOURCE_GROUP, + vnet_key=KEY_VIRTUAL_NETWORK, + address_prefixes="11.0.0.0/24", + dev_setting_name='AZURE_CLI_TEST_DEV_VNET_SUBNET_NAME', + key=KEY_VNET_SUBNET): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VnetSubnetPreparer, self).__init__(name_prefix, 15) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group = [resource_group_key, None] + self.vnet = [vnet_key, None] + self.address_prefixes = address_prefixes + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group[1]: + self.resource_group[1] = self.test_class_instance.kwargs.get( + self.resource_group[0]) + if not self.resource_group[1]: + raise CliTestError("Error: No resource group configured!") + if not self.vnet[1]: + self.vnet[1] = self.test_class_instance.kwargs.get(self.vnet[0]) + if not self.vnet[1]: + raise CliTestError("Error: No vnet configured!") + + self.test_class_instance.kwargs[self.key] = 'default' + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + pass + + +class VnetNicPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.nic', + parameter_name='subnet', + resource_group_key=KEY_RESOURCE_GROUP, + vnet_key=KEY_VIRTUAL_NETWORK, + dev_setting_name='AZURE_CLI_TEST_DEV_VNET_NIC_NAME', + key=KEY_VNET_NIC): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VnetNicPreparer, self).__init__(name_prefix, 15) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group = [resource_group_key, None] + self.vnet = [vnet_key, None] + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group[1]: + self.resource_group[1] = self.test_class_instance.kwargs.get( + self.resource_group[0]) + if not self.resource_group[1]: + raise CliTestError("Error: No resource group configured!") + if not self.vnet[1]: + self.vnet[1] = self.test_class_instance.kwargs.get(self.vnet[0]) + if not self.vnet[1]: + raise CliTestError("Error: No vnet configured!") + + template = 'az network nic create --resource-group {} --name {} --vnet-name {} --subnet default ' + self.live_only_execute(self.cli_ctx, template.format( + self.resource_group[1], name, self.vnet[1])) + + self.test_class_instance.kwargs[self.key] = name + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + if not self.dev_setting_name: + self.live_only_execute( + self.cli_ctx, + 'az network nic delete --name {} --resource-group {}'.format(name, self.resource_group[1])) diff --git a/src/logic/azext_logic/tests/latest/test_logic_scenario.py b/src/logic/azext_logic/tests/latest/test_logic_scenario.py index 8703d513a29..f19f411d8a6 100644 --- a/src/logic/azext_logic/tests/latest/test_logic_scenario.py +++ b/src/logic/azext_logic/tests/latest/test_logic_scenario.py @@ -1,116 +1,335 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- import os -import unittest - -from azure.cli.testsdk import JMESPathCheck -from azure_devtools.scenario_tests import AllowLargeResponse from azure.cli.testsdk import ScenarioTest from azure.cli.testsdk import ResourceGroupPreparer +from .preparers import VirtualNetworkPreparer +from .example_steps import step_integration_account_create +from .example_steps import step_integration_account_show +from .example_steps import step_integration_account_list +from .example_steps import step_integration_account_list2 +from .example_steps import step_integration_account_update +from .example_steps import step_integration_account_list_key_vault_key +from .example_steps import step_integration_account_list_callback_url +from .example_steps import step_integration_account_log_tracking_event +from .example_steps import step_integration_account_regenerate_access_key +from .example_steps import step_integration_account_agreement_create +from .example_steps import step_integration_account_agreement_show +from .example_steps import step_integration_account_agreement_list +from .example_steps import step_integration_account_agreement +from .example_steps import step_integration_account_agreement_delete +from .example_steps import step_integration_account_assembly_create +from .example_steps import step_integration_account_assembly_show +from .example_steps import step_integration_account_assembly_list +from .example_steps import step_integration_account_assembly +from .example_steps import step_integration_account_assembly_delete +from .example_steps import step_integration_account_batch +from .example_steps import step_integration_account_batch_configuration_show +from .example_steps import step_integration_account_batch_configuration_list +from .example_steps import step_integration_account_batch2 +from .example_steps import step_integration_account_certificate_create +from .example_steps import step_integration_account_certificate_show +from .example_steps import step_integration_account_certificate_list +from .example_steps import step_integration_account_certificate_delete +from .example_steps import step_integration_account_map_create +from .example_steps import step_integration_account_map_show +from .example_steps import step_integration_account_map_list +from .example_steps import step_integration_account_map +from .example_steps import step_integration_account_map_delete +from .example_steps import step_integration_account_partner_create +from .example_steps import step_integration_account_partner_show +from .example_steps import step_integration_account_partner_list +from .example_steps import step_integration_account_partner +from .example_steps import step_integration_account_partner_delete +from .example_steps import step_integration_account_schema_create +from .example_steps import step_integration_account_schema_show +from .example_steps import step_integration_account_schema_list +from .example_steps import step_integration_account_schema +from .example_steps import step_integration_account_schema_delete +from .example_steps import step_integration_account_session_create +from .example_steps import step_integration_account_session_list +from .example_steps import step_integration_account_session_show +from .example_steps import step_integration_account_session_delete +from .example_steps import step_integration_account_delete +from .example_steps import step_integration_service_environment_create +from .example_steps import step_integration_service_environment_show +from .example_steps import step_integration_service_environment_list +from .example_steps import step_integration_service_environment_list2 +from .example_steps import step_integration_service_environment_update +from .example_steps import step_integration_service_environment_restart +from .example_steps import step_integration_service_environment +from .example_steps import step_integration_service_environment2 +from .example_steps import step_integration_service_environment3 +from .example_steps import step_integration_service_environment4 +from .example_steps import step_integration_service_environment5 +from .example_steps import step_integration_service_environment_sku_list +from .example_steps import step_integration_service_environment_delete +from .example_steps import step_workflow_create +from .example_steps import step_workflow_show +from .example_steps import step_workflow_list +from .example_steps import step_workflow_list2 +from .example_steps import step_workflow_update +from .example_steps import step_workflow_disable +from .example_steps import step_workflow_enable +from .example_steps import step_workflow_generate_upgraded_definition +from .example_steps import step_workflow_list_callback_url +from .example_steps import step_workflow_list_swagger +from .example_steps import step_workflow_move +from .example_steps import step_workflow_regenerate_access_key +from .example_steps import step_workflow_validate_by_location +from .example_steps import step_workflow_run_action_repetition_show +from .example_steps import step_workflow_run_action_repetition_list +from .example_steps import step_workflow_run_action +from .example_steps import step_workflow_run_action2 +from .example_steps import step_workflow_run_action3 +from .example_steps import step_workflow_run_action_request_history_show +from .example_steps import step_workflow_run_action_request_history_list +from .example_steps import step_workflow_run_action_show +from .example_steps import step_workflow_run_action_list +from .example_steps import step_workflow_run_action_list_expression_trace +from .example_steps import step_workflow_run_action_scope_repetition_show +from .example_steps import step_workflow_run_action_scope_repetition_list +from .example_steps import step_workflow_run_operation_show +from .example_steps import step_workflow_run_show +from .example_steps import step_workflow_run_list +from .example_steps import step_workflow_run_cancel +from .example_steps import step_workflow_trigger_history_show +from .example_steps import step_workflow_trigger_history_list +from .example_steps import step_workflow_trigger_history_resubmit +from .example_steps import step_workflow_trigger_show +from .example_steps import step_workflow_trigger_show_schema_json +from .example_steps import step_workflow_trigger_list +from .example_steps import step_workflow_trigger_list_callback_url +from .example_steps import step_workflow_trigger_reset +from .example_steps import step_workflow_trigger_run +from .example_steps import step_workflow_trigger_set_state +from .example_steps import step_workflow_version_show +from .example_steps import step_workflow_version_list +from .example_steps import step_workflow_version_trigger_list_callback_url +from .example_steps import step_workflow_delete +from .. import ( + try_manual, + raise_if, + calc_coverage +) TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) -class LogicManagementClientScenarioTest(ScenarioTest): +# Env setup_scenario +@try_manual +def setup_scenario(test, rg, rg_2, rg_3): + pass + + +# Env cleanup_scenario +@try_manual +def cleanup_scenario(test, rg, rg_2, rg_3): + pass + - def current_subscription(self): - subs = self.cmd('az account show').get_output_in_json() - return subs['id'] +# Testcase: Scenario +@try_manual +def call_scenario(test, rg, rg_2, rg_3): + setup_scenario(test, rg, rg_2, rg_3) + step_integration_account_create(test, rg, rg_2, rg_3, checks=[ + test.check("location", "westus", case_sensitive=False), + test.check("sku.name", "Standard", case_sensitive=False), + test.check("name", "{myIntegrationAccount2}", case_sensitive=False), + ]) + step_integration_account_show(test, rg, rg_2, rg_3, checks=[ + test.check("location", "westus", case_sensitive=False), + test.check("sku.name", "Standard", case_sensitive=False), + ]) + step_integration_account_list(test, rg, rg_2, rg_3, checks=[ + test.check('length(@)', 1), + ]) + step_integration_account_list2(test, rg, rg_2, rg_3, checks=[ + test.check('length(@)', 1), + ]) + step_integration_account_update(test, rg, rg_2, rg_3, checks=[ + test.check("location", "westus", case_sensitive=False), + test.check("sku.name", "Standard", case_sensitive=False), + test.check("name", "{myIntegrationAccount2}", case_sensitive=False), + ]) + step_integration_account_list_key_vault_key(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_list_callback_url(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_log_tracking_event(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_regenerate_access_key(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_agreement_create(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_agreement_show(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_agreement_list(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_agreement(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_agreement_delete(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_assembly_create(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_assembly_show(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_assembly_list(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_assembly(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_assembly_delete(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_batch(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_batch_configuration_show(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_batch_configuration_list(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_batch2(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_certificate_create(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_certificate_show(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_certificate_list(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_certificate_delete(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_map_create(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_map_show(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_map_list(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_map(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_map_delete(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_partner_create(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_partner_show(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_partner_list(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_partner(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_partner_delete(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_schema_create(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_schema_show(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_schema_list(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_schema(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_schema_delete(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_session_create(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_session_list(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_session_show(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_session_delete(test, rg, rg_2, rg_3, checks=[]) + step_integration_account_delete(test, rg, rg_2, rg_3, checks=[]) + step_integration_service_environment_create(test, rg, rg_2, rg_3, checks=[ + test.check("name", "{myIntegrationServiceEnvironment}", case_sensitive=False), + ]) + step_integration_service_environment_show(test, rg, rg_2, rg_3, checks=[ + test.check("encryptionConfiguration.encryptionKeyReference.keyName", "testKeyName", case_sensitive=False), + test.check("encryptionConfiguration.encryptionKeyReference.keyVault.id", "/subscriptions/{subscription_id}/reso" + "urceGroups/{rg_2}/providers/Microsoft.KeyVault/vaults/testKeyVault", case_sensitive=False), + test.check("encryptionConfiguration.encryptionKeyReference.keyVersion", "13b261d30b984753869902d7f47f4d55", + case_sensitive=False), + test.check("name", "{myIntegrationServiceEnvironment}", case_sensitive=False), + ]) + step_integration_service_environment_list(test, rg, rg_2, rg_3, checks=[ + test.check('length(@)', 1), + ]) + step_integration_service_environment_list2(test, rg, rg_2, rg_3, checks=[ + test.check('length(@)', 1), + ]) + step_integration_service_environment_update(test, rg, rg_2, rg_3, checks=[ + test.check("encryptionConfiguration.encryptionKeyReference.keyName", "testKeyName", case_sensitive=False), + test.check("encryptionConfiguration.encryptionKeyReference.keyVault.id", "/subscriptions/{subscription_id}/reso" + "urceGroups/{rg_2}/providers/Microsoft.KeyVault/vaults/testKeyVault", case_sensitive=False), + test.check("encryptionConfiguration.encryptionKeyReference.keyVersion", "13b261d30b984753869902d7f47f4d55", + case_sensitive=False), + test.check("sku.name", "Developer", case_sensitive=False), + test.check("sku.capacity", 0), + test.check("name", "{myIntegrationServiceEnvironment}", case_sensitive=False), + ]) + step_integration_service_environment_restart(test, rg, rg_2, rg_3, checks=[]) + step_integration_service_environment(test, rg, rg_2, rg_3, checks=[]) + step_integration_service_environment2(test, rg, rg_2, rg_3, checks=[]) + step_integration_service_environment3(test, rg, rg_2, rg_3, checks=[]) + step_integration_service_environment3(test, rg, rg_2, rg_3, checks=[]) + step_integration_service_environment4(test, rg, rg_2, rg_3, checks=[]) + step_integration_service_environment5(test, rg, rg_2, rg_3, checks=[]) + step_integration_service_environment_sku_list(test, rg, rg_2, rg_3, checks=[]) + step_integration_service_environment_delete(test, rg, rg_2, rg_3, checks=[]) + step_workflow_create(test, rg, rg_2, rg_3, checks=[ + test.check("integrationAccount.id", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.L" + "ogic/integrationAccounts/{myIntegrationAccount}", case_sensitive=False), + ]) + step_workflow_show(test, rg, rg_2, rg_3, checks=[ + test.check("location", "brazilsouth", case_sensitive=False), + test.check("integrationAccount.id", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.L" + "ogic/integrationAccounts/{myIntegrationAccount}", case_sensitive=False), + test.check("name", "{myWorkflow}", case_sensitive=False), + ]) + step_workflow_list(test, rg, rg_2, rg_3, checks=[ + test.check('length(@)', 1), + ]) + step_workflow_list2(test, rg, rg_2, rg_3, checks=[ + test.check('length(@)', 3), + ]) + step_workflow_update(test, rg, rg_2, rg_3, checks=[ + test.check("integrationAccount.id", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.L" + "ogic/integrationAccounts/{myIntegrationAccount}", case_sensitive=False), + ]) + step_workflow_disable(test, rg, rg_2, rg_3, checks=[]) + step_workflow_enable(test, rg, rg_2, rg_3, checks=[]) + step_workflow_generate_upgraded_definition(test, rg, rg_2, rg_3, checks=[]) + step_workflow_list_callback_url(test, rg, rg_2, rg_3, checks=[]) + step_workflow_list_swagger(test, rg, rg_2, rg_3, checks=[]) + step_workflow_move(test, rg, rg_2, rg_3, checks=[]) + step_workflow_regenerate_access_key(test, rg, rg_2, rg_3, checks=[]) + step_workflow_validate_by_location(test, rg, rg_2, rg_3, checks=[]) + step_workflow_validate_by_location(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action_repetition_show(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action_repetition_list(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action2(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action3(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action_request_history_show(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action_request_history_list(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action_show(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action_list(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action_list_expression_trace(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action_scope_repetition_show(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_action_scope_repetition_list(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_operation_show(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_show(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_list(test, rg, rg_2, rg_3, checks=[]) + step_workflow_run_cancel(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_history_show(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_history_list(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_history_resubmit(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_show(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_show_schema_json(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_list(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_list_callback_url(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_reset(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_run(test, rg, rg_2, rg_3, checks=[]) + step_workflow_trigger_set_state(test, rg, rg_2, rg_3, checks=[]) + step_workflow_version_show(test, rg, rg_2, rg_3, checks=[]) + step_workflow_version_list(test, rg, rg_2, rg_3, checks=[]) + step_workflow_version_trigger_list_callback_url(test, rg, rg_2, rg_3, checks=[]) + step_workflow_delete(test, rg, rg_2, rg_3, checks=[]) + cleanup_scenario(test, rg, rg_2, rg_3) - @ResourceGroupPreparer(name_prefix='cli_test_logic_test-resource-group'[:9], key='rg') - @ResourceGroupPreparer(name_prefix='cli_test_logic_testResourceGroup'[:9], key='rg_2') - def test_logic(self, resource_group): +# Test class for Scenario +@try_manual +class LogicScenarioTest(ScenarioTest): + + def __init__(self, *args, **kwargs): + super(LogicScenarioTest, self).__init__(*args, **kwargs) self.kwargs.update({ - 'subscription_id': self.current_subscription() + 'subscription_id': self.get_subscription_id() }) self.kwargs.update({ - 'testIntegrationAccount': self.create_random_name(prefix='cli_test_integration_accounts'[:9], length=24), - 'IntegrationAccounts_2': self.create_random_name(prefix='cli_test_integration_accounts'[:9], length=24), - 'testWorkflow': self.create_random_name(prefix='cli_test_workflows'[:9], length=24), - 'Workflows_2': self.create_random_name(prefix='cli_test_workflows'[:9], length=24), - 'Workflows_3': self.create_random_name(prefix='cli_test_workflows'[:9], length=24), + 'myIntegrationAccount': 'test-integration-account', + 'myIntegrationAccount2': 'testIntegrationAccount', + 'myIntegrationAccount3': '', + 'myIntegrationAccount4': 'testia123', + 'myIntegrationServiceEnvironment': 'testIntegrationServiceEnvironment', + 'myWorkflow': 'test-workflow', + 'myWorkflow2': 'testWorkflow', + 'myWorkflow3': 'testWorkflowName', + 'myWorkflow4': 'testFlow', }) - self.cmd('az logic integration-account create ' - '--location "centralus" ' - '--sku Standard ' - '--name "{IntegrationAccounts_2}" ' - '--resource-group "{rg_2}" ', - checks=[JMESPathCheck('name', self.kwargs.get('IntegrationAccounts_2', ''))]) - - self.cmd('az logic integration-account import ' - '--location "centralus" ' - '--input-path "src/logic/azext_logic/tests/latest/integration.json" ' - '--name "{IntegrationAccounts_2}" ' - '--resource-group "{rg_2}" ', - checks=[JMESPathCheck('name', self.kwargs.get('IntegrationAccounts_2', ''))]) - - self.cmd('az logic workflow create ' - '--resource-group "{rg}" ' - '--location "centralus" ' - '--definition "src/logic/azext_logic/tests/latest/workflow.json" ' - '--name "{testWorkflow}"', - checks=[JMESPathCheck('name', self.kwargs.get('testWorkflow', ''))]) - - self.cmd('az logic integration-account show ' - '--name "{IntegrationAccounts_2}" ' - '--resource-group "{rg_2}"', - checks=[JMESPathCheck('name', self.kwargs.get('IntegrationAccounts_2', ''))]) - - self.cmd('az logic workflow show ' - '--resource-group "{rg}" ' - '--name "{testWorkflow}"', - checks=[JMESPathCheck('name', self.kwargs.get('testWorkflow', ''))]) - - self.cmd('az logic integration-account list ' - '--resource-group "{rg_2}"', - checks=[JMESPathCheck('[0].name', self.kwargs.get('IntegrationAccounts_2', ''))]) - - self.cmd('az logic workflow list ' - '--resource-group "{rg}"', - checks=[JMESPathCheck('[0].name', self.kwargs.get('testWorkflow', ''))]) - - self.cmd('az logic integration-account list', - checks=[JMESPathCheck('[0].name', self.kwargs.get('IntegrationAccounts_2', ''))]) - - self.cmd('az logic workflow list', - checks=[JMESPathCheck('[0].name', self.kwargs.get('testWorkflow', ''))]) - - self.cmd('az logic integration-account update ' - '--sku Basic ' - '--name "{IntegrationAccounts_2}" ' - '--resource-group "{rg_2}"', - checks=[JMESPathCheck('sku.name', 'Basic')]) - - self.cmd('az logic workflow update ' - '--resource-group "{rg}" ' - '--tag atag=123 ' - '--definition "src/logic/azext_logic/tests/latest/workflowupdate.json" ' - '--name "{testWorkflow}"', - checks=[JMESPathCheck('tags.atag', 123), - JMESPathCheck('definition.triggers.When_a_feed_item_is_published.recurrence.interval', 2)]) - - self.cmd('az logic workflow update ' - '--resource-group "{rg}" ' - '--tag atag=foo ' - '--name "{testWorkflow}"', - checks=[JMESPathCheck('tags.atag', 'foo'), - JMESPathCheck('definition.triggers.When_a_feed_item_is_published.recurrence.interval', 2)]) - - self.cmd('az logic workflow delete ' - '--resource-group "{rg}" ' - '--name "{testWorkflow}" ' - '-y', - checks=[]) - - self.cmd('az logic integration-account delete ' - '--name "{IntegrationAccounts_2}" ' - '--resource-group "{rg_2}" ' - '-y', - checks=[]) + + @ResourceGroupPreparer(name_prefix='clitestlogic_test-resource-group'[:7], key='rg', parameter_name='rg') + @ResourceGroupPreparer(name_prefix='clitestlogic_testResourceGroup'[:7], key='rg_2', parameter_name='rg_2') + @ResourceGroupPreparer(name_prefix='clitestlogic_testrg123'[:7], key='rg_3', parameter_name='rg_3') + @VirtualNetworkPreparer(name_prefix='clitestlogic_testVNET'[:7], key='vn', resource_group_key='rg_2') + def test_logic_Scenario(self, rg, rg_2, rg_3): + call_scenario(self, rg, rg_2, rg_3) + calc_coverage(__file__) + raise_if() + diff --git a/src/logic/azext_logic/tests/latest/workflow.json b/src/logic/azext_logic/tests/latest/workflow.json deleted file mode 100644 index b4b4b4b8534..00000000000 --- a/src/logic/azext_logic/tests/latest/workflow.json +++ /dev/null @@ -1,35 +0,0 @@ -{ "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "actions": {}, - "contentVersion": "1.0.0.0", - "outputs": {}, - "parameters": { - "$connections": { - "defaultValue": {}, - "type": "Object" - } - }, - "triggers": { - "When_a_feed_item_is_published": { - "inputs": { - "host": { - "connection": { - "name": "@parameters('$connections')['rss']['connectionId']" - } - }, - "method": "get", - "path": "/OnNewFeed", - "queries": { - "feedUrl": "http://feeds.reuters.com/reuters/topNews" - } - }, - "recurrence": { - "frequency": "Minute", - "interval": 1 - }, - "splitOn": "@triggerBody()?['value']", - "type": "ApiConnection" - } - } - } - } \ No newline at end of file diff --git a/src/logic/azext_logic/tests/latest/workflowupdate.json b/src/logic/azext_logic/tests/latest/workflowupdate.json deleted file mode 100644 index 4d1b9830e84..00000000000 --- a/src/logic/azext_logic/tests/latest/workflowupdate.json +++ /dev/null @@ -1,35 +0,0 @@ -{ "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "actions": {}, - "contentVersion": "1.0.0.0", - "outputs": {}, - "parameters": { - "$connections": { - "defaultValue": {}, - "type": "Object" - } - }, - "triggers": { - "When_a_feed_item_is_published": { - "inputs": { - "host": { - "connection": { - "name": "@parameters('$connections')['rss']['connectionId']" - } - }, - "method": "get", - "path": "/OnNewFeed", - "queries": { - "feedUrl": "http://feeds.reuters.com/reuters/topNews" - } - }, - "recurrence": { - "frequency": "Minute", - "interval": 2 - }, - "splitOn": "@triggerBody()?['value']", - "type": "ApiConnection" - } - } - } - } \ No newline at end of file diff --git a/src/logic/azext_logic/vendored_sdks/__init__.py b/src/logic/azext_logic/vendored_sdks/__init__.py index be1a152630c..c9cfdc73e77 100644 --- a/src/logic/azext_logic/vendored_sdks/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/__init__.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/logic/azext_logic/vendored_sdks/logic/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/__init__.py index 6763259b4b0..5431c78cc3e 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/logic/__init__.py @@ -8,3 +8,9 @@ from ._logic_management_client import LogicManagementClient __all__ = ['LogicManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/logic/azext_logic/vendored_sdks/logic/_configuration.py b/src/logic/azext_logic/vendored_sdks/logic/_configuration.py index 7c60bd09ba3..09d3fee87ba 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/_configuration.py +++ b/src/logic/azext_logic/vendored_sdks/logic/_configuration.py @@ -6,10 +6,17 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential VERSION = "unknown" @@ -20,7 +27,7 @@ class LogicManagementClientConfiguration(Configuration): attributes. :param credential: Credential needed for the client to connect to Azure. - :type credential: azure.core.credentials.TokenCredential + :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription id. :type subscription_id: str """ @@ -41,6 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2019-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'logicmanagementclient/{}'.format(VERSION)) self._configure(**kwargs) @@ -53,9 +61,10 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) self.authentication_policy = kwargs.get('authentication_policy') if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/logic/azext_logic/vendored_sdks/logic/_logic_management_client.py b/src/logic/azext_logic/vendored_sdks/logic/_logic_management_client.py index 0d8dfe51233..eec48f3dfa4 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/_logic_management_client.py +++ b/src/logic/azext_logic/vendored_sdks/logic/_logic_management_client.py @@ -6,104 +6,111 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Optional +from typing import TYPE_CHECKING -from azure.core import PipelineClient +from azure.mgmt.core import ARMPipelineClient from msrest import Deserializer, Serializer +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from ._configuration import LogicManagementClientConfiguration -from .operations import WorkflowOperations -from .operations import WorkflowVersionOperations -from .operations import WorkflowTriggerOperations -from .operations import WorkflowVersionTriggerOperations -from .operations import WorkflowTriggerHistoryOperations -from .operations import WorkflowRunOperations -from .operations import WorkflowRunActionOperations -from .operations import WorkflowRunActionRepetitionOperations -from .operations import WorkflowRunActionRepetitionRequestHistoryOperations -from .operations import WorkflowRunActionRequestHistoryOperations -from .operations import WorkflowRunActionScopeRepetitionOperations -from .operations import WorkflowRunOperationOperations -from .operations import IntegrationAccountOperations -from .operations import IntegrationAccountAssemblyOperations -from .operations import IntegrationAccountBatchConfigurationOperations -from .operations import IntegrationAccountSchemaOperations -from .operations import IntegrationAccountMapOperations -from .operations import IntegrationAccountPartnerOperations -from .operations import IntegrationAccountAgreementOperations -from .operations import IntegrationAccountCertificateOperations -from .operations import IntegrationAccountSessionOperations -from .operations import IntegrationServiceEnvironmentOperations -from .operations import IntegrationServiceEnvironmentSkuOperations +from .operations import WorkflowsOperations +from .operations import WorkflowVersionsOperations +from .operations import WorkflowTriggersOperations +from .operations import WorkflowVersionTriggersOperations +from .operations import WorkflowTriggerHistoriesOperations +from .operations import WorkflowRunsOperations +from .operations import WorkflowRunActionsOperations +from .operations import WorkflowRunActionRepetitionsOperations +from .operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from .operations import WorkflowRunActionRequestHistoriesOperations +from .operations import WorkflowRunActionScopeRepetitionsOperations +from .operations import WorkflowRunOperationsOperations +from .operations import IntegrationAccountsOperations +from .operations import IntegrationAccountAssembliesOperations +from .operations import IntegrationAccountBatchConfigurationsOperations +from .operations import IntegrationAccountSchemasOperations +from .operations import IntegrationAccountMapsOperations +from .operations import IntegrationAccountPartnersOperations +from .operations import IntegrationAccountAgreementsOperations +from .operations import IntegrationAccountCertificatesOperations +from .operations import IntegrationAccountSessionsOperations +from .operations import IntegrationServiceEnvironmentsOperations +from .operations import IntegrationServiceEnvironmentSkusOperations from .operations import IntegrationServiceEnvironmentNetworkHealthOperations -from .operations import IntegrationServiceEnvironmentManagedApiOperations -from .operations import IntegrationServiceEnvironmentManagedApiOperationOperations -from .operations import OperationOperations +from .operations import IntegrationServiceEnvironmentManagedApisOperations +from .operations import IntegrationServiceEnvironmentManagedApiOperationsOperations +from .operations import Operations from . import models class LogicManagementClient(object): """REST API for Azure Logic Apps. - :ivar workflow: WorkflowOperations operations - :vartype workflow: logic_management_client.operations.WorkflowOperations - :ivar workflow_version: WorkflowVersionOperations operations - :vartype workflow_version: logic_management_client.operations.WorkflowVersionOperations - :ivar workflow_trigger: WorkflowTriggerOperations operations - :vartype workflow_trigger: logic_management_client.operations.WorkflowTriggerOperations - :ivar workflow_version_trigger: WorkflowVersionTriggerOperations operations - :vartype workflow_version_trigger: logic_management_client.operations.WorkflowVersionTriggerOperations - :ivar workflow_trigger_history: WorkflowTriggerHistoryOperations operations - :vartype workflow_trigger_history: logic_management_client.operations.WorkflowTriggerHistoryOperations - :ivar workflow_run: WorkflowRunOperations operations - :vartype workflow_run: logic_management_client.operations.WorkflowRunOperations - :ivar workflow_run_action: WorkflowRunActionOperations operations - :vartype workflow_run_action: logic_management_client.operations.WorkflowRunActionOperations - :ivar workflow_run_action_repetition: WorkflowRunActionRepetitionOperations operations - :vartype workflow_run_action_repetition: logic_management_client.operations.WorkflowRunActionRepetitionOperations - :ivar workflow_run_action_repetition_request_history: WorkflowRunActionRepetitionRequestHistoryOperations operations - :vartype workflow_run_action_repetition_request_history: logic_management_client.operations.WorkflowRunActionRepetitionRequestHistoryOperations - :ivar workflow_run_action_request_history: WorkflowRunActionRequestHistoryOperations operations - :vartype workflow_run_action_request_history: logic_management_client.operations.WorkflowRunActionRequestHistoryOperations - :ivar workflow_run_action_scope_repetition: WorkflowRunActionScopeRepetitionOperations operations - :vartype workflow_run_action_scope_repetition: logic_management_client.operations.WorkflowRunActionScopeRepetitionOperations - :ivar workflow_run_operation: WorkflowRunOperationOperations operations - :vartype workflow_run_operation: logic_management_client.operations.WorkflowRunOperationOperations - :ivar integration_account: IntegrationAccountOperations operations - :vartype integration_account: logic_management_client.operations.IntegrationAccountOperations - :ivar integration_account_assembly: IntegrationAccountAssemblyOperations operations - :vartype integration_account_assembly: logic_management_client.operations.IntegrationAccountAssemblyOperations - :ivar integration_account_batch_configuration: IntegrationAccountBatchConfigurationOperations operations - :vartype integration_account_batch_configuration: logic_management_client.operations.IntegrationAccountBatchConfigurationOperations - :ivar integration_account_schema: IntegrationAccountSchemaOperations operations - :vartype integration_account_schema: logic_management_client.operations.IntegrationAccountSchemaOperations - :ivar integration_account_map: IntegrationAccountMapOperations operations - :vartype integration_account_map: logic_management_client.operations.IntegrationAccountMapOperations - :ivar integration_account_partner: IntegrationAccountPartnerOperations operations - :vartype integration_account_partner: logic_management_client.operations.IntegrationAccountPartnerOperations - :ivar integration_account_agreement: IntegrationAccountAgreementOperations operations - :vartype integration_account_agreement: logic_management_client.operations.IntegrationAccountAgreementOperations - :ivar integration_account_certificate: IntegrationAccountCertificateOperations operations - :vartype integration_account_certificate: logic_management_client.operations.IntegrationAccountCertificateOperations - :ivar integration_account_session: IntegrationAccountSessionOperations operations - :vartype integration_account_session: logic_management_client.operations.IntegrationAccountSessionOperations - :ivar integration_service_environment: IntegrationServiceEnvironmentOperations operations - :vartype integration_service_environment: logic_management_client.operations.IntegrationServiceEnvironmentOperations - :ivar integration_service_environment_sku: IntegrationServiceEnvironmentSkuOperations operations - :vartype integration_service_environment_sku: logic_management_client.operations.IntegrationServiceEnvironmentSkuOperations + :ivar workflows: WorkflowsOperations operations + :vartype workflows: logic_management_client.operations.WorkflowsOperations + :ivar workflow_versions: WorkflowVersionsOperations operations + :vartype workflow_versions: logic_management_client.operations.WorkflowVersionsOperations + :ivar workflow_triggers: WorkflowTriggersOperations operations + :vartype workflow_triggers: logic_management_client.operations.WorkflowTriggersOperations + :ivar workflow_version_triggers: WorkflowVersionTriggersOperations operations + :vartype workflow_version_triggers: logic_management_client.operations.WorkflowVersionTriggersOperations + :ivar workflow_trigger_histories: WorkflowTriggerHistoriesOperations operations + :vartype workflow_trigger_histories: logic_management_client.operations.WorkflowTriggerHistoriesOperations + :ivar workflow_runs: WorkflowRunsOperations operations + :vartype workflow_runs: logic_management_client.operations.WorkflowRunsOperations + :ivar workflow_run_actions: WorkflowRunActionsOperations operations + :vartype workflow_run_actions: logic_management_client.operations.WorkflowRunActionsOperations + :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitionsOperations operations + :vartype workflow_run_action_repetitions: logic_management_client.operations.WorkflowRunActionRepetitionsOperations + :ivar workflow_run_action_repetitions_request_histories: WorkflowRunActionRepetitionsRequestHistoriesOperations operations + :vartype workflow_run_action_repetitions_request_histories: logic_management_client.operations.WorkflowRunActionRepetitionsRequestHistoriesOperations + :ivar workflow_run_action_request_histories: WorkflowRunActionRequestHistoriesOperations operations + :vartype workflow_run_action_request_histories: logic_management_client.operations.WorkflowRunActionRequestHistoriesOperations + :ivar workflow_run_action_scope_repetitions: WorkflowRunActionScopeRepetitionsOperations operations + :vartype workflow_run_action_scope_repetitions: logic_management_client.operations.WorkflowRunActionScopeRepetitionsOperations + :ivar workflow_run_operations: WorkflowRunOperationsOperations operations + :vartype workflow_run_operations: logic_management_client.operations.WorkflowRunOperationsOperations + :ivar integration_accounts: IntegrationAccountsOperations operations + :vartype integration_accounts: logic_management_client.operations.IntegrationAccountsOperations + :ivar integration_account_assemblies: IntegrationAccountAssembliesOperations operations + :vartype integration_account_assemblies: logic_management_client.operations.IntegrationAccountAssembliesOperations + :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurationsOperations operations + :vartype integration_account_batch_configurations: logic_management_client.operations.IntegrationAccountBatchConfigurationsOperations + :ivar integration_account_schemas: IntegrationAccountSchemasOperations operations + :vartype integration_account_schemas: logic_management_client.operations.IntegrationAccountSchemasOperations + :ivar integration_account_maps: IntegrationAccountMapsOperations operations + :vartype integration_account_maps: logic_management_client.operations.IntegrationAccountMapsOperations + :ivar integration_account_partners: IntegrationAccountPartnersOperations operations + :vartype integration_account_partners: logic_management_client.operations.IntegrationAccountPartnersOperations + :ivar integration_account_agreements: IntegrationAccountAgreementsOperations operations + :vartype integration_account_agreements: logic_management_client.operations.IntegrationAccountAgreementsOperations + :ivar integration_account_certificates: IntegrationAccountCertificatesOperations operations + :vartype integration_account_certificates: logic_management_client.operations.IntegrationAccountCertificatesOperations + :ivar integration_account_sessions: IntegrationAccountSessionsOperations operations + :vartype integration_account_sessions: logic_management_client.operations.IntegrationAccountSessionsOperations + :ivar integration_service_environments: IntegrationServiceEnvironmentsOperations operations + :vartype integration_service_environments: logic_management_client.operations.IntegrationServiceEnvironmentsOperations + :ivar integration_service_environment_skus: IntegrationServiceEnvironmentSkusOperations operations + :vartype integration_service_environment_skus: logic_management_client.operations.IntegrationServiceEnvironmentSkusOperations :ivar integration_service_environment_network_health: IntegrationServiceEnvironmentNetworkHealthOperations operations :vartype integration_service_environment_network_health: logic_management_client.operations.IntegrationServiceEnvironmentNetworkHealthOperations - :ivar integration_service_environment_managed_api: IntegrationServiceEnvironmentManagedApiOperations operations - :vartype integration_service_environment_managed_api: logic_management_client.operations.IntegrationServiceEnvironmentManagedApiOperations - :ivar integration_service_environment_managed_api_operation: IntegrationServiceEnvironmentManagedApiOperationOperations operations - :vartype integration_service_environment_managed_api_operation: logic_management_client.operations.IntegrationServiceEnvironmentManagedApiOperationOperations - :ivar operation: OperationOperations operations - :vartype operation: logic_management_client.operations.OperationOperations + :ivar integration_service_environment_managed_apis: IntegrationServiceEnvironmentManagedApisOperations operations + :vartype integration_service_environment_managed_apis: logic_management_client.operations.IntegrationServiceEnvironmentManagedApisOperations + :ivar integration_service_environment_managed_api_operations: IntegrationServiceEnvironmentManagedApiOperationsOperations operations + :vartype integration_service_environment_managed_api_operations: logic_management_client.operations.IntegrationServiceEnvironmentManagedApiOperationsOperations + :ivar operations: Operations operations + :vartype operations: logic_management_client.operations.Operations :param credential: Credential needed for the client to connect to Azure. - :type credential: azure.core.credentials.TokenCredential + :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription id. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( @@ -117,65 +124,65 @@ def __init__( if not base_url: base_url = 'https://management.azure.com' self._config = LogicManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.workflow = WorkflowOperations( + self.workflows = WorkflowsOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_version = WorkflowVersionOperations( + self.workflow_versions = WorkflowVersionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger = WorkflowTriggerOperations( + self.workflow_triggers = WorkflowTriggersOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_version_trigger = WorkflowVersionTriggerOperations( + self.workflow_version_triggers = WorkflowVersionTriggersOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger_history = WorkflowTriggerHistoryOperations( + self.workflow_trigger_histories = WorkflowTriggerHistoriesOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_run = WorkflowRunOperations( + self.workflow_runs = WorkflowRunsOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action = WorkflowRunActionOperations( + self.workflow_run_actions = WorkflowRunActionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetition = WorkflowRunActionRepetitionOperations( + self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetition_request_history = WorkflowRunActionRepetitionRequestHistoryOperations( + self.workflow_run_action_repetitions_request_histories = WorkflowRunActionRepetitionsRequestHistoriesOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_request_history = WorkflowRunActionRequestHistoryOperations( + self.workflow_run_action_request_histories = WorkflowRunActionRequestHistoriesOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_scope_repetition = WorkflowRunActionScopeRepetitionOperations( + self.workflow_run_action_scope_repetitions = WorkflowRunActionScopeRepetitionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_operation = WorkflowRunOperationOperations( + self.workflow_run_operations = WorkflowRunOperationsOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_account = IntegrationAccountOperations( + self.integration_accounts = IntegrationAccountsOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_account_assembly = IntegrationAccountAssemblyOperations( + self.integration_account_assemblies = IntegrationAccountAssembliesOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_account_batch_configuration = IntegrationAccountBatchConfigurationOperations( + self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_account_schema = IntegrationAccountSchemaOperations( + self.integration_account_schemas = IntegrationAccountSchemasOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_account_map = IntegrationAccountMapOperations( + self.integration_account_maps = IntegrationAccountMapsOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_account_partner = IntegrationAccountPartnerOperations( + self.integration_account_partners = IntegrationAccountPartnersOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_account_agreement = IntegrationAccountAgreementOperations( + self.integration_account_agreements = IntegrationAccountAgreementsOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_account_certificate = IntegrationAccountCertificateOperations( + self.integration_account_certificates = IntegrationAccountCertificatesOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_account_session = IntegrationAccountSessionOperations( + self.integration_account_sessions = IntegrationAccountSessionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment = IntegrationServiceEnvironmentOperations( + self.integration_service_environments = IntegrationServiceEnvironmentsOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_sku = IntegrationServiceEnvironmentSkuOperations( + self.integration_service_environment_skus = IntegrationServiceEnvironmentSkusOperations( self._client, self._config, self._serialize, self._deserialize) self.integration_service_environment_network_health = IntegrationServiceEnvironmentNetworkHealthOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api = IntegrationServiceEnvironmentManagedApiOperations( + self.integration_service_environment_managed_apis = IntegrationServiceEnvironmentManagedApisOperations( self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api_operation = IntegrationServiceEnvironmentManagedApiOperationOperations( + self.integration_service_environment_managed_api_operations = IntegrationServiceEnvironmentManagedApiOperationsOperations( self._client, self._config, self._serialize, self._deserialize) - self.operation = OperationOperations( + self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) def close(self): diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py index d1722987ad7..6763259b4b0 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._logic_management_client_async import LogicManagementClient +from ._logic_management_client import LogicManagementClient __all__ = ['LogicManagementClient'] diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py similarity index 80% rename from src/logic/azext_logic/vendored_sdks/logic/aio/_configuration_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py index 1f3e4885bbf..4dc7376e6de 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py @@ -6,10 +6,15 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" @@ -20,14 +25,14 @@ class LogicManagementClientConfiguration(Configuration): attributes. :param credential: Credential needed for the client to connect to Azure. - :type credential: azure.core.credentials.TokenCredential + :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription id. :type subscription_id: str """ def __init__( self, - credential: "TokenCredential", + credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any ) -> None: @@ -40,6 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2019-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'logicmanagementclient/{}'.format(VERSION)) self._configure(**kwargs) @@ -51,9 +57,10 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) self.authentication_policy = kwargs.get('authentication_policy') if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py new file mode 100644 index 00000000000..37966545c50 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py @@ -0,0 +1,193 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import LogicManagementClientConfiguration +from .operations import WorkflowsOperations +from .operations import WorkflowVersionsOperations +from .operations import WorkflowTriggersOperations +from .operations import WorkflowVersionTriggersOperations +from .operations import WorkflowTriggerHistoriesOperations +from .operations import WorkflowRunsOperations +from .operations import WorkflowRunActionsOperations +from .operations import WorkflowRunActionRepetitionsOperations +from .operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from .operations import WorkflowRunActionRequestHistoriesOperations +from .operations import WorkflowRunActionScopeRepetitionsOperations +from .operations import WorkflowRunOperationsOperations +from .operations import IntegrationAccountsOperations +from .operations import IntegrationAccountAssembliesOperations +from .operations import IntegrationAccountBatchConfigurationsOperations +from .operations import IntegrationAccountSchemasOperations +from .operations import IntegrationAccountMapsOperations +from .operations import IntegrationAccountPartnersOperations +from .operations import IntegrationAccountAgreementsOperations +from .operations import IntegrationAccountCertificatesOperations +from .operations import IntegrationAccountSessionsOperations +from .operations import IntegrationServiceEnvironmentsOperations +from .operations import IntegrationServiceEnvironmentSkusOperations +from .operations import IntegrationServiceEnvironmentNetworkHealthOperations +from .operations import IntegrationServiceEnvironmentManagedApisOperations +from .operations import IntegrationServiceEnvironmentManagedApiOperationsOperations +from .operations import Operations +from .. import models + + +class LogicManagementClient(object): + """REST API for Azure Logic Apps. + + :ivar workflows: WorkflowsOperations operations + :vartype workflows: logic_management_client.aio.operations.WorkflowsOperations + :ivar workflow_versions: WorkflowVersionsOperations operations + :vartype workflow_versions: logic_management_client.aio.operations.WorkflowVersionsOperations + :ivar workflow_triggers: WorkflowTriggersOperations operations + :vartype workflow_triggers: logic_management_client.aio.operations.WorkflowTriggersOperations + :ivar workflow_version_triggers: WorkflowVersionTriggersOperations operations + :vartype workflow_version_triggers: logic_management_client.aio.operations.WorkflowVersionTriggersOperations + :ivar workflow_trigger_histories: WorkflowTriggerHistoriesOperations operations + :vartype workflow_trigger_histories: logic_management_client.aio.operations.WorkflowTriggerHistoriesOperations + :ivar workflow_runs: WorkflowRunsOperations operations + :vartype workflow_runs: logic_management_client.aio.operations.WorkflowRunsOperations + :ivar workflow_run_actions: WorkflowRunActionsOperations operations + :vartype workflow_run_actions: logic_management_client.aio.operations.WorkflowRunActionsOperations + :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitionsOperations operations + :vartype workflow_run_action_repetitions: logic_management_client.aio.operations.WorkflowRunActionRepetitionsOperations + :ivar workflow_run_action_repetitions_request_histories: WorkflowRunActionRepetitionsRequestHistoriesOperations operations + :vartype workflow_run_action_repetitions_request_histories: logic_management_client.aio.operations.WorkflowRunActionRepetitionsRequestHistoriesOperations + :ivar workflow_run_action_request_histories: WorkflowRunActionRequestHistoriesOperations operations + :vartype workflow_run_action_request_histories: logic_management_client.aio.operations.WorkflowRunActionRequestHistoriesOperations + :ivar workflow_run_action_scope_repetitions: WorkflowRunActionScopeRepetitionsOperations operations + :vartype workflow_run_action_scope_repetitions: logic_management_client.aio.operations.WorkflowRunActionScopeRepetitionsOperations + :ivar workflow_run_operations: WorkflowRunOperationsOperations operations + :vartype workflow_run_operations: logic_management_client.aio.operations.WorkflowRunOperationsOperations + :ivar integration_accounts: IntegrationAccountsOperations operations + :vartype integration_accounts: logic_management_client.aio.operations.IntegrationAccountsOperations + :ivar integration_account_assemblies: IntegrationAccountAssembliesOperations operations + :vartype integration_account_assemblies: logic_management_client.aio.operations.IntegrationAccountAssembliesOperations + :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurationsOperations operations + :vartype integration_account_batch_configurations: logic_management_client.aio.operations.IntegrationAccountBatchConfigurationsOperations + :ivar integration_account_schemas: IntegrationAccountSchemasOperations operations + :vartype integration_account_schemas: logic_management_client.aio.operations.IntegrationAccountSchemasOperations + :ivar integration_account_maps: IntegrationAccountMapsOperations operations + :vartype integration_account_maps: logic_management_client.aio.operations.IntegrationAccountMapsOperations + :ivar integration_account_partners: IntegrationAccountPartnersOperations operations + :vartype integration_account_partners: logic_management_client.aio.operations.IntegrationAccountPartnersOperations + :ivar integration_account_agreements: IntegrationAccountAgreementsOperations operations + :vartype integration_account_agreements: logic_management_client.aio.operations.IntegrationAccountAgreementsOperations + :ivar integration_account_certificates: IntegrationAccountCertificatesOperations operations + :vartype integration_account_certificates: logic_management_client.aio.operations.IntegrationAccountCertificatesOperations + :ivar integration_account_sessions: IntegrationAccountSessionsOperations operations + :vartype integration_account_sessions: logic_management_client.aio.operations.IntegrationAccountSessionsOperations + :ivar integration_service_environments: IntegrationServiceEnvironmentsOperations operations + :vartype integration_service_environments: logic_management_client.aio.operations.IntegrationServiceEnvironmentsOperations + :ivar integration_service_environment_skus: IntegrationServiceEnvironmentSkusOperations operations + :vartype integration_service_environment_skus: logic_management_client.aio.operations.IntegrationServiceEnvironmentSkusOperations + :ivar integration_service_environment_network_health: IntegrationServiceEnvironmentNetworkHealthOperations operations + :vartype integration_service_environment_network_health: logic_management_client.aio.operations.IntegrationServiceEnvironmentNetworkHealthOperations + :ivar integration_service_environment_managed_apis: IntegrationServiceEnvironmentManagedApisOperations operations + :vartype integration_service_environment_managed_apis: logic_management_client.aio.operations.IntegrationServiceEnvironmentManagedApisOperations + :ivar integration_service_environment_managed_api_operations: IntegrationServiceEnvironmentManagedApiOperationsOperations operations + :vartype integration_service_environment_managed_api_operations: logic_management_client.aio.operations.IntegrationServiceEnvironmentManagedApiOperationsOperations + :ivar operations: Operations operations + :vartype operations: logic_management_client.aio.operations.Operations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = LogicManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.workflows = WorkflowsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_versions = WorkflowVersionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_triggers = WorkflowTriggersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_version_triggers = WorkflowVersionTriggersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_trigger_histories = WorkflowTriggerHistoriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_runs = WorkflowRunsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_actions = WorkflowRunActionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions_request_histories = WorkflowRunActionRepetitionsRequestHistoriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_request_histories = WorkflowRunActionRequestHistoriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_scope_repetitions = WorkflowRunActionScopeRepetitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_operations = WorkflowRunOperationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_accounts = IntegrationAccountsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_account_assemblies = IntegrationAccountAssembliesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_account_schemas = IntegrationAccountSchemasOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_account_maps = IntegrationAccountMapsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_account_partners = IntegrationAccountPartnersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_account_agreements = IntegrationAccountAgreementsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_account_certificates = IntegrationAccountCertificatesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_account_sessions = IntegrationAccountSessionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environments = IntegrationServiceEnvironmentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_skus = IntegrationServiceEnvironmentSkusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_network_health = IntegrationServiceEnvironmentNetworkHealthOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_managed_apis = IntegrationServiceEnvironmentManagedApisOperations( + self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_managed_api_operations = IntegrationServiceEnvironmentManagedApiOperationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "LogicManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client_async.py deleted file mode 100644 index 31b6bf138b3..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client_async.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional - -from azure.core import AsyncPipelineClient -from msrest import Deserializer, Serializer - -from ._configuration_async import LogicManagementClientConfiguration -from .operations_async import WorkflowOperations -from .operations_async import WorkflowVersionOperations -from .operations_async import WorkflowTriggerOperations -from .operations_async import WorkflowVersionTriggerOperations -from .operations_async import WorkflowTriggerHistoryOperations -from .operations_async import WorkflowRunOperations -from .operations_async import WorkflowRunActionOperations -from .operations_async import WorkflowRunActionRepetitionOperations -from .operations_async import WorkflowRunActionRepetitionRequestHistoryOperations -from .operations_async import WorkflowRunActionRequestHistoryOperations -from .operations_async import WorkflowRunActionScopeRepetitionOperations -from .operations_async import WorkflowRunOperationOperations -from .operations_async import IntegrationAccountOperations -from .operations_async import IntegrationAccountAssemblyOperations -from .operations_async import IntegrationAccountBatchConfigurationOperations -from .operations_async import IntegrationAccountSchemaOperations -from .operations_async import IntegrationAccountMapOperations -from .operations_async import IntegrationAccountPartnerOperations -from .operations_async import IntegrationAccountAgreementOperations -from .operations_async import IntegrationAccountCertificateOperations -from .operations_async import IntegrationAccountSessionOperations -from .operations_async import IntegrationServiceEnvironmentOperations -from .operations_async import IntegrationServiceEnvironmentSkuOperations -from .operations_async import IntegrationServiceEnvironmentNetworkHealthOperations -from .operations_async import IntegrationServiceEnvironmentManagedApiOperations -from .operations_async import IntegrationServiceEnvironmentManagedApiOperationOperations -from .operations_async import OperationOperations -from .. import models - - -class LogicManagementClient(object): - """REST API for Azure Logic Apps. - - :ivar workflow: WorkflowOperations operations - :vartype workflow: logic_management_client.aio.operations_async.WorkflowOperations - :ivar workflow_version: WorkflowVersionOperations operations - :vartype workflow_version: logic_management_client.aio.operations_async.WorkflowVersionOperations - :ivar workflow_trigger: WorkflowTriggerOperations operations - :vartype workflow_trigger: logic_management_client.aio.operations_async.WorkflowTriggerOperations - :ivar workflow_version_trigger: WorkflowVersionTriggerOperations operations - :vartype workflow_version_trigger: logic_management_client.aio.operations_async.WorkflowVersionTriggerOperations - :ivar workflow_trigger_history: WorkflowTriggerHistoryOperations operations - :vartype workflow_trigger_history: logic_management_client.aio.operations_async.WorkflowTriggerHistoryOperations - :ivar workflow_run: WorkflowRunOperations operations - :vartype workflow_run: logic_management_client.aio.operations_async.WorkflowRunOperations - :ivar workflow_run_action: WorkflowRunActionOperations operations - :vartype workflow_run_action: logic_management_client.aio.operations_async.WorkflowRunActionOperations - :ivar workflow_run_action_repetition: WorkflowRunActionRepetitionOperations operations - :vartype workflow_run_action_repetition: logic_management_client.aio.operations_async.WorkflowRunActionRepetitionOperations - :ivar workflow_run_action_repetition_request_history: WorkflowRunActionRepetitionRequestHistoryOperations operations - :vartype workflow_run_action_repetition_request_history: logic_management_client.aio.operations_async.WorkflowRunActionRepetitionRequestHistoryOperations - :ivar workflow_run_action_request_history: WorkflowRunActionRequestHistoryOperations operations - :vartype workflow_run_action_request_history: logic_management_client.aio.operations_async.WorkflowRunActionRequestHistoryOperations - :ivar workflow_run_action_scope_repetition: WorkflowRunActionScopeRepetitionOperations operations - :vartype workflow_run_action_scope_repetition: logic_management_client.aio.operations_async.WorkflowRunActionScopeRepetitionOperations - :ivar workflow_run_operation: WorkflowRunOperationOperations operations - :vartype workflow_run_operation: logic_management_client.aio.operations_async.WorkflowRunOperationOperations - :ivar integration_account: IntegrationAccountOperations operations - :vartype integration_account: logic_management_client.aio.operations_async.IntegrationAccountOperations - :ivar integration_account_assembly: IntegrationAccountAssemblyOperations operations - :vartype integration_account_assembly: logic_management_client.aio.operations_async.IntegrationAccountAssemblyOperations - :ivar integration_account_batch_configuration: IntegrationAccountBatchConfigurationOperations operations - :vartype integration_account_batch_configuration: logic_management_client.aio.operations_async.IntegrationAccountBatchConfigurationOperations - :ivar integration_account_schema: IntegrationAccountSchemaOperations operations - :vartype integration_account_schema: logic_management_client.aio.operations_async.IntegrationAccountSchemaOperations - :ivar integration_account_map: IntegrationAccountMapOperations operations - :vartype integration_account_map: logic_management_client.aio.operations_async.IntegrationAccountMapOperations - :ivar integration_account_partner: IntegrationAccountPartnerOperations operations - :vartype integration_account_partner: logic_management_client.aio.operations_async.IntegrationAccountPartnerOperations - :ivar integration_account_agreement: IntegrationAccountAgreementOperations operations - :vartype integration_account_agreement: logic_management_client.aio.operations_async.IntegrationAccountAgreementOperations - :ivar integration_account_certificate: IntegrationAccountCertificateOperations operations - :vartype integration_account_certificate: logic_management_client.aio.operations_async.IntegrationAccountCertificateOperations - :ivar integration_account_session: IntegrationAccountSessionOperations operations - :vartype integration_account_session: logic_management_client.aio.operations_async.IntegrationAccountSessionOperations - :ivar integration_service_environment: IntegrationServiceEnvironmentOperations operations - :vartype integration_service_environment: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentOperations - :ivar integration_service_environment_sku: IntegrationServiceEnvironmentSkuOperations operations - :vartype integration_service_environment_sku: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentSkuOperations - :ivar integration_service_environment_network_health: IntegrationServiceEnvironmentNetworkHealthOperations operations - :vartype integration_service_environment_network_health: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentNetworkHealthOperations - :ivar integration_service_environment_managed_api: IntegrationServiceEnvironmentManagedApiOperations operations - :vartype integration_service_environment_managed_api: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentManagedApiOperations - :ivar integration_service_environment_managed_api_operation: IntegrationServiceEnvironmentManagedApiOperationOperations operations - :vartype integration_service_environment_managed_api_operation: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentManagedApiOperationOperations - :ivar operation: OperationOperations operations - :vartype operation: logic_management_client.aio.operations_async.OperationOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: azure.core.credentials.TokenCredential - :param subscription_id: The subscription id. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = LogicManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.workflow = WorkflowOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_version = WorkflowVersionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger = WorkflowTriggerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_version_trigger = WorkflowVersionTriggerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger_history = WorkflowTriggerHistoryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run = WorkflowRunOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action = WorkflowRunActionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetition = WorkflowRunActionRepetitionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetition_request_history = WorkflowRunActionRepetitionRequestHistoryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_request_history = WorkflowRunActionRequestHistoryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_scope_repetition = WorkflowRunActionScopeRepetitionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_operation = WorkflowRunOperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account = IntegrationAccountOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_assembly = IntegrationAccountAssemblyOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_batch_configuration = IntegrationAccountBatchConfigurationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_schema = IntegrationAccountSchemaOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_map = IntegrationAccountMapOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_partner = IntegrationAccountPartnerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_agreement = IntegrationAccountAgreementOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_certificate = IntegrationAccountCertificateOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_session = IntegrationAccountSessionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment = IntegrationServiceEnvironmentOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_sku = IntegrationServiceEnvironmentSkuOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_network_health = IntegrationServiceEnvironmentNetworkHealthOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api = IntegrationServiceEnvironmentManagedApiOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api_operation = IntegrationServiceEnvironmentManagedApiOperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operation = OperationOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "LogicManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py new file mode 100644 index 00000000000..5c557560db0 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._workflows_operations import WorkflowsOperations +from ._workflow_versions_operations import WorkflowVersionsOperations +from ._workflow_triggers_operations import WorkflowTriggersOperations +from ._workflow_version_triggers_operations import WorkflowVersionTriggersOperations +from ._workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations +from ._workflow_runs_operations import WorkflowRunsOperations +from ._workflow_run_actions_operations import WorkflowRunActionsOperations +from ._workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from ._workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from ._workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations +from ._workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations +from ._workflow_run_operations_operations import WorkflowRunOperationsOperations +from ._integration_accounts_operations import IntegrationAccountsOperations +from ._integration_account_assemblies_operations import IntegrationAccountAssembliesOperations +from ._integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations +from ._integration_account_schemas_operations import IntegrationAccountSchemasOperations +from ._integration_account_maps_operations import IntegrationAccountMapsOperations +from ._integration_account_partners_operations import IntegrationAccountPartnersOperations +from ._integration_account_agreements_operations import IntegrationAccountAgreementsOperations +from ._integration_account_certificates_operations import IntegrationAccountCertificatesOperations +from ._integration_account_sessions_operations import IntegrationAccountSessionsOperations +from ._integration_service_environments_operations import IntegrationServiceEnvironmentsOperations +from ._integration_service_environment_skus_operations import IntegrationServiceEnvironmentSkusOperations +from ._integration_service_environment_network_health_operations import IntegrationServiceEnvironmentNetworkHealthOperations +from ._integration_service_environment_managed_apis_operations import IntegrationServiceEnvironmentManagedApisOperations +from ._integration_service_environment_managed_api_operations_operations import IntegrationServiceEnvironmentManagedApiOperationsOperations +from ._operations import Operations + +__all__ = [ + 'WorkflowsOperations', + 'WorkflowVersionsOperations', + 'WorkflowTriggersOperations', + 'WorkflowVersionTriggersOperations', + 'WorkflowTriggerHistoriesOperations', + 'WorkflowRunsOperations', + 'WorkflowRunActionsOperations', + 'WorkflowRunActionRepetitionsOperations', + 'WorkflowRunActionRepetitionsRequestHistoriesOperations', + 'WorkflowRunActionRequestHistoriesOperations', + 'WorkflowRunActionScopeRepetitionsOperations', + 'WorkflowRunOperationsOperations', + 'IntegrationAccountsOperations', + 'IntegrationAccountAssembliesOperations', + 'IntegrationAccountBatchConfigurationsOperations', + 'IntegrationAccountSchemasOperations', + 'IntegrationAccountMapsOperations', + 'IntegrationAccountPartnersOperations', + 'IntegrationAccountAgreementsOperations', + 'IntegrationAccountCertificatesOperations', + 'IntegrationAccountSessionsOperations', + 'IntegrationServiceEnvironmentsOperations', + 'IntegrationServiceEnvironmentSkusOperations', + 'IntegrationServiceEnvironmentNetworkHealthOperations', + 'IntegrationServiceEnvironmentManagedApisOperations', + 'IntegrationServiceEnvironmentManagedApiOperationsOperations', + 'Operations', +] diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_agreement_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py similarity index 74% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_agreement_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py index 36e5a6d3e64..b224e56dfdc 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_agreement_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py @@ -5,22 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationAccountAgreementOperations: - """IntegrationAccountAgreementOperations async operations. +class IntegrationAccountAgreementsOperations: + """IntegrationAccountAgreementsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +48,7 @@ def list( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.IntegrationAccountAgreementListResult": + ) -> AsyncIterable["models.IntegrationAccountAgreementListResult"]: """Gets a list of integration account agreements. :param resource_group_name: The resource group name. @@ -58,44 +58,48 @@ def list( :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: - AgreementType. + AgreementType. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreementListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreementListResult + :return: An iterator like instance of either IntegrationAccountAgreementListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationAccountAgreementListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreementListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -114,14 +118,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} # type: ignore async def get( self, @@ -139,16 +143,20 @@ async def get( :param agreement_name: The integration account agreement name. :type agreement_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreement or the result of cls(response) + :return: IntegrationAccountAgreement, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountAgreement :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -163,9 +171,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -173,30 +180,22 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} # type: ignore async def create_or_update( self, resource_group_name: str, integration_account_name: str, agreement_name: str, - agreement_type: Union[str, "models.AgreementType"], - host_partner: str, - guest_partner: str, - host_identity: "models.BusinessIdentity", - guest_identity: "models.BusinessIdentity", - content: "models.AgreementContent", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - metadata: Optional[object] = None, + agreement: "models.IntegrationAccountAgreement", **kwargs ) -> "models.IntegrationAccountAgreement": """Creates or updates an integration account agreement. @@ -207,40 +206,24 @@ async def create_or_update( :type integration_account_name: str :param agreement_name: The integration account agreement name. :type agreement_name: str - :param agreement_type: The agreement type. - :type agreement_type: str or ~logic_management_client.models.AgreementType - :param host_partner: The integration account partner that is set as host partner for this - agreement. - :type host_partner: str - :param guest_partner: The integration account partner that is set as guest partner for this - agreement. - :type guest_partner: str - :param host_identity: The business identity of the host partner. - :type host_identity: ~logic_management_client.models.BusinessIdentity - :param guest_identity: The business identity of the guest partner. - :type guest_identity: ~logic_management_client.models.BusinessIdentity - :param content: The agreement content. - :type content: ~logic_management_client.models.AgreementContent - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object + :param agreement: The integration account agreement. + :type agreement: ~logic_management_client.models.IntegrationAccountAgreement :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreement or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreement or ~logic_management_client.models.IntegrationAccountAgreement + :return: IntegrationAccountAgreement, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountAgreement :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _agreement = models.IntegrationAccountAgreement(location=location, tags=tags, metadata=metadata, agreement_type=agreement_type, host_partner=host_partner, guest_partner=guest_partner, host_identity=host_identity, guest_identity=guest_identity, content=content) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -256,23 +239,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_agreement, 'IntegrationAccountAgreement') + body_content = self._serialize.body(agreement, 'IntegrationAccountAgreement') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) @@ -280,10 +260,10 @@ async def create_or_update( deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} # type: ignore async def delete( self, @@ -301,16 +281,20 @@ async def delete( :param agreement_name: The integration account agreement name. :type agreement_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -325,8 +309,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -334,20 +318,19 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} # type: ignore async def list_content_callback_url( self, resource_group_name: str, integration_account_name: str, agreement_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, + list_content_callback_url: "models.GetCallbackUrlParameters", **kwargs ) -> "models.WorkflowTriggerCallbackUrl": """Get the content callback url. @@ -358,24 +341,24 @@ async def list_content_callback_url( :type integration_account_name: str :param agreement_name: The integration account agreement name. :type agreement_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_content_callback_url: + :type list_content_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -391,26 +374,24 @@ async def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_assembly_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assemblies_operations.py similarity index 78% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_assembly_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assemblies_operations.py index 3861a78c869..a2b3e14d2ce 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_assembly_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assemblies_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationAccountAssemblyOperations: - """IntegrationAccountAssemblyOperations async operations. +class IntegrationAccountAssembliesOperations: + """IntegrationAccountAssembliesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -45,7 +46,7 @@ def list( resource_group_name: str, integration_account_name: str, **kwargs - ) -> "models.AssemblyCollection": + ) -> AsyncIterable["models.AssemblyCollection"]: """List the assemblies for an integration account. :param resource_group_name: The resource group name. @@ -53,37 +54,41 @@ def list( :param integration_account_name: The integration account name. :type integration_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyCollection or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyCollection + :return: An iterator like instance of either AssemblyCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.AssemblyCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -102,14 +107,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} # type: ignore async def get( self, @@ -127,16 +132,20 @@ async def get( :param assembly_artifact_name: The assembly artifact name. :type assembly_artifact_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition or the result of cls(response) + :return: AssemblyDefinition, or the result of cls(response) :rtype: ~logic_management_client.models.AssemblyDefinition :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -151,9 +160,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -161,24 +169,22 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AssemblyDefinition', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} # type: ignore async def create_or_update( self, resource_group_name: str, integration_account_name: str, assembly_artifact_name: str, - properties: "models.AssemblyProperties", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, + assembly_artifact: "models.AssemblyDefinition", **kwargs ) -> "models.AssemblyDefinition": """Create or update an assembly for an integration account. @@ -189,26 +195,24 @@ async def create_or_update( :type integration_account_name: str :param assembly_artifact_name: The assembly artifact name. :type assembly_artifact_name: str - :param properties: The assembly properties. - :type properties: ~logic_management_client.models.AssemblyProperties - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] + :param assembly_artifact: The assembly artifact. + :type assembly_artifact: ~logic_management_client.models.AssemblyDefinition :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyDefinition or ~logic_management_client.models.AssemblyDefinition + :return: AssemblyDefinition, or the result of cls(response) + :rtype: ~logic_management_client.models.AssemblyDefinition :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _assembly_artifact = models.AssemblyDefinition(location=location, tags=tags, properties=properties) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -224,23 +228,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_assembly_artifact, 'AssemblyDefinition') + body_content = self._serialize.body(assembly_artifact, 'AssemblyDefinition') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('AssemblyDefinition', pipeline_response) @@ -248,10 +249,10 @@ async def create_or_update( deserialized = self._deserialize('AssemblyDefinition', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} # type: ignore async def delete( self, @@ -269,16 +270,20 @@ async def delete( :param assembly_artifact_name: The assembly artifact name. :type assembly_artifact_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -293,8 +298,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -302,12 +307,12 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} # type: ignore async def list_content_callback_url( self, @@ -325,16 +330,20 @@ async def list_content_callback_url( :param assembly_artifact_name: The assembly artifact name. :type assembly_artifact_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -349,9 +358,8 @@ async def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -359,12 +367,12 @@ async def list_content_callback_url( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_batch_configuration_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configurations_operations.py similarity index 77% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_batch_configuration_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configurations_operations.py index 62e25f4a415..18ebda2e169 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_batch_configuration_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configurations_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationAccountBatchConfigurationOperations: - """IntegrationAccountBatchConfigurationOperations async operations. +class IntegrationAccountBatchConfigurationsOperations: + """IntegrationAccountBatchConfigurationsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -45,7 +46,7 @@ def list( resource_group_name: str, integration_account_name: str, **kwargs - ) -> "models.BatchConfigurationCollection": + ) -> AsyncIterable["models.BatchConfigurationCollection"]: """List the batch configurations for an integration account. :param resource_group_name: The resource group name. @@ -53,37 +54,41 @@ def list( :param integration_account_name: The integration account name. :type integration_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfigurationCollection or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfigurationCollection + :return: An iterator like instance of either BatchConfigurationCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.BatchConfigurationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfigurationCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -102,14 +107,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} # type: ignore async def get( self, @@ -127,16 +132,20 @@ async def get( :param batch_configuration_name: The batch configuration name. :type batch_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration or the result of cls(response) + :return: BatchConfiguration, or the result of cls(response) :rtype: ~logic_management_client.models.BatchConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -151,9 +160,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -161,24 +169,22 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BatchConfiguration', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} # type: ignore async def create_or_update( self, resource_group_name: str, integration_account_name: str, batch_configuration_name: str, - properties: "models.BatchConfigurationProperties", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, + batch_configuration: "models.BatchConfiguration", **kwargs ) -> "models.BatchConfiguration": """Create or update a batch configuration for an integration account. @@ -189,26 +195,24 @@ async def create_or_update( :type integration_account_name: str :param batch_configuration_name: The batch configuration name. :type batch_configuration_name: str - :param properties: The batch configuration properties. - :type properties: ~logic_management_client.models.BatchConfigurationProperties - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] + :param batch_configuration: The batch configuration. + :type batch_configuration: ~logic_management_client.models.BatchConfiguration :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfiguration or ~logic_management_client.models.BatchConfiguration + :return: BatchConfiguration, or the result of cls(response) + :rtype: ~logic_management_client.models.BatchConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _batch_configuration = models.BatchConfiguration(location=location, tags=tags, properties=properties) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -224,23 +228,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_batch_configuration, 'BatchConfiguration') + body_content = self._serialize.body(batch_configuration, 'BatchConfiguration') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('BatchConfiguration', pipeline_response) @@ -248,10 +249,10 @@ async def create_or_update( deserialized = self._deserialize('BatchConfiguration', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} # type: ignore async def delete( self, @@ -269,16 +270,20 @@ async def delete( :param batch_configuration_name: The batch configuration name. :type batch_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -293,8 +298,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -302,9 +307,9 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_certificate_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificates_operations.py similarity index 76% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_certificate_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificates_operations.py index 01c482936d5..cf4860f7c22 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_certificate_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificates_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationAccountCertificateOperations: - """IntegrationAccountCertificateOperations async operations. +class IntegrationAccountCertificatesOperations: + """IntegrationAccountCertificatesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,7 +47,7 @@ def list( integration_account_name: str, top: Optional[int] = None, **kwargs - ) -> "models.IntegrationAccountCertificateListResult": + ) -> AsyncIterable["models.IntegrationAccountCertificateListResult"]: """Gets a list of integration account certificates. :param resource_group_name: The resource group name. @@ -56,39 +57,43 @@ def list( :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificateListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificateListResult + :return: An iterator like instance of either IntegrationAccountCertificateListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationAccountCertificateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificateListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -107,14 +112,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} # type: ignore async def get( self, @@ -132,16 +137,20 @@ async def get( :param certificate_name: The integration account certificate name. :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate or the result of cls(response) + :return: IntegrationAccountCertificate, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountCertificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -156,9 +165,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -166,26 +174,22 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} # type: ignore async def create_or_update( self, resource_group_name: str, integration_account_name: str, certificate_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - metadata: Optional[object] = None, - key: Optional["models.KeyVaultKeyReference"] = None, - public_certificate: Optional[str] = None, + certificate: "models.IntegrationAccountCertificate", **kwargs ) -> "models.IntegrationAccountCertificate": """Creates or updates an integration account certificate. @@ -196,30 +200,24 @@ async def create_or_update( :type integration_account_name: str :param certificate_name: The integration account certificate name. :type certificate_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object - :param key: The key details in the key vault. - :type key: ~logic_management_client.models.KeyVaultKeyReference - :param public_certificate: The public certificate. - :type public_certificate: str + :param certificate: The integration account certificate. + :type certificate: ~logic_management_client.models.IntegrationAccountCertificate :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificate or ~logic_management_client.models.IntegrationAccountCertificate + :return: IntegrationAccountCertificate, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountCertificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _certificate = models.IntegrationAccountCertificate(location=location, tags=tags, metadata=metadata, key=key, public_certificate=public_certificate) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -235,23 +233,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_certificate, 'IntegrationAccountCertificate') + body_content = self._serialize.body(certificate, 'IntegrationAccountCertificate') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) @@ -259,10 +254,10 @@ async def create_or_update( deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} # type: ignore async def delete( self, @@ -280,16 +275,20 @@ async def delete( :param certificate_name: The integration account certificate name. :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -304,8 +303,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -313,9 +312,9 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_map_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_maps_operations.py similarity index 75% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_map_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_maps_operations.py index 20cdf27623e..c0b4fe2890d 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_map_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_maps_operations.py @@ -5,22 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationAccountMapOperations: - """IntegrationAccountMapOperations async operations. +class IntegrationAccountMapsOperations: + """IntegrationAccountMapsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +48,7 @@ def list( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.IntegrationAccountMapListResult": + ) -> AsyncIterable["models.IntegrationAccountMapListResult"]: """Gets a list of integration account maps. :param resource_group_name: The resource group name. @@ -60,41 +60,45 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: MapType. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMapListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMapListResult + :return: An iterator like instance of either IntegrationAccountMapListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationAccountMapListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMapListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -113,14 +117,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} # type: ignore async def get( self, @@ -138,16 +142,20 @@ async def get( :param map_name: The integration account map name. :type map_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap or the result of cls(response) + :return: IntegrationAccountMap, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -162,9 +170,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -172,28 +179,22 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} # type: ignore async def create_or_update( self, resource_group_name: str, integration_account_name: str, map_name: str, - map_type: Union[str, "models.MapType"], - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - parameters_schema: Optional["models.IntegrationAccountMapPropertiesParametersSchema"] = None, - content: Optional[str] = None, - content_type_parameter: Optional[str] = None, - metadata: Optional[object] = None, + map: "models.IntegrationAccountMap", **kwargs ) -> "models.IntegrationAccountMap": """Creates or updates an integration account map. @@ -204,34 +205,24 @@ async def create_or_update( :type integration_account_name: str :param map_name: The integration account map name. :type map_name: str - :param map_type: The map type. - :type map_type: str or ~logic_management_client.models.MapType - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param parameters_schema: The parameters schema of integration account map. - :type parameters_schema: ~logic_management_client.models.IntegrationAccountMapPropertiesParametersSchema - :param content: The content. - :type content: str - :param content_type_parameter: The content type. - :type content_type_parameter: str - :param metadata: The metadata. - :type metadata: object + :param map: The integration account map. + :type map: ~logic_management_client.models.IntegrationAccountMap :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMap or ~logic_management_client.models.IntegrationAccountMap + :return: IntegrationAccountMap, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _map = models.IntegrationAccountMap(location=location, tags=tags, map_type=map_type, parameters_schema=parameters_schema, content=content, content_type=content_type_parameter, metadata=metadata) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -247,23 +238,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_map, 'IntegrationAccountMap') + body_content = self._serialize.body(map, 'IntegrationAccountMap') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) @@ -271,10 +259,10 @@ async def create_or_update( deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} # type: ignore async def delete( self, @@ -292,16 +280,20 @@ async def delete( :param map_name: The integration account map name. :type map_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -316,8 +308,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -325,20 +317,19 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} # type: ignore async def list_content_callback_url( self, resource_group_name: str, integration_account_name: str, map_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, + list_content_callback_url: "models.GetCallbackUrlParameters", **kwargs ) -> "models.WorkflowTriggerCallbackUrl": """Get the content callback url. @@ -349,24 +340,24 @@ async def list_content_callback_url( :type integration_account_name: str :param map_name: The integration account map name. :type map_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_content_callback_url: + :type list_content_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -382,26 +373,24 @@ async def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_partner_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partners_operations.py similarity index 76% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_partner_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partners_operations.py index a7b3459dfd3..37845d08ed5 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_partner_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partners_operations.py @@ -5,22 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationAccountPartnerOperations: - """IntegrationAccountPartnerOperations async operations. +class IntegrationAccountPartnersOperations: + """IntegrationAccountPartnersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +48,7 @@ def list( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.IntegrationAccountPartnerListResult": + ) -> AsyncIterable["models.IntegrationAccountPartnerListResult"]: """Gets a list of integration account partners. :param resource_group_name: The resource group name. @@ -60,41 +60,45 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: PartnerType. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartnerListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartnerListResult + :return: An iterator like instance of either IntegrationAccountPartnerListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationAccountPartnerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartnerListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -113,14 +117,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} # type: ignore async def get( self, @@ -138,16 +142,20 @@ async def get( :param partner_name: The integration account partner name. :type partner_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner or the result of cls(response) + :return: IntegrationAccountPartner, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountPartner :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -162,9 +170,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -172,26 +179,22 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} # type: ignore async def create_or_update( self, resource_group_name: str, integration_account_name: str, partner_name: str, - partner_type: Union[str, "models.PartnerType"], - content: "models.PartnerContent", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - metadata: Optional[object] = None, + partner: "models.IntegrationAccountPartner", **kwargs ) -> "models.IntegrationAccountPartner": """Creates or updates an integration account partner. @@ -202,30 +205,24 @@ async def create_or_update( :type integration_account_name: str :param partner_name: The integration account partner name. :type partner_name: str - :param partner_type: The partner type. - :type partner_type: str or ~logic_management_client.models.PartnerType - :param content: The partner content. - :type content: ~logic_management_client.models.PartnerContent - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object + :param partner: The integration account partner. + :type partner: ~logic_management_client.models.IntegrationAccountPartner :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartner or ~logic_management_client.models.IntegrationAccountPartner + :return: IntegrationAccountPartner, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountPartner :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _partner = models.IntegrationAccountPartner(location=location, tags=tags, partner_type=partner_type, metadata=metadata, content=content) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -241,23 +238,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_partner, 'IntegrationAccountPartner') + body_content = self._serialize.body(partner, 'IntegrationAccountPartner') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) @@ -265,10 +259,10 @@ async def create_or_update( deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} # type: ignore async def delete( self, @@ -286,16 +280,20 @@ async def delete( :param partner_name: The integration account partner name. :type partner_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -310,8 +308,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -319,20 +317,19 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} # type: ignore async def list_content_callback_url( self, resource_group_name: str, integration_account_name: str, partner_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, + list_content_callback_url: "models.GetCallbackUrlParameters", **kwargs ) -> "models.WorkflowTriggerCallbackUrl": """Get the content callback url. @@ -343,24 +340,24 @@ async def list_content_callback_url( :type integration_account_name: str :param partner_name: The integration account partner name. :type partner_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_content_callback_url: + :type list_content_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -376,26 +373,24 @@ async def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_schema_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schemas_operations.py similarity index 74% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_schema_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schemas_operations.py index da1ff6336bd..19f998ff132 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_schema_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schemas_operations.py @@ -5,22 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationAccountSchemaOperations: - """IntegrationAccountSchemaOperations async operations. +class IntegrationAccountSchemasOperations: + """IntegrationAccountSchemasOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +48,7 @@ def list( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.IntegrationAccountSchemaListResult": + ) -> AsyncIterable["models.IntegrationAccountSchemaListResult"]: """Gets a list of integration account schemas. :param resource_group_name: The resource group name. @@ -60,41 +60,45 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: SchemaType. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchemaListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchemaListResult + :return: An iterator like instance of either IntegrationAccountSchemaListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationAccountSchemaListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchemaListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -113,14 +117,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} # type: ignore async def get( self, @@ -138,16 +142,20 @@ async def get( :param schema_name: The integration account schema name. :type schema_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema or the result of cls(response) + :return: IntegrationAccountSchema, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountSchema :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -162,9 +170,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -172,30 +179,22 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} # type: ignore async def create_or_update( self, resource_group_name: str, integration_account_name: str, schema_name: str, - schema_type: Union[str, "models.SchemaType"], - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - target_namespace: Optional[str] = None, - document_name: Optional[str] = None, - file_name: Optional[str] = None, - metadata: Optional[object] = None, - content: Optional[str] = None, - content_type_parameter: Optional[str] = None, + schema: "models.IntegrationAccountSchema", **kwargs ) -> "models.IntegrationAccountSchema": """Creates or updates an integration account schema. @@ -206,38 +205,24 @@ async def create_or_update( :type integration_account_name: str :param schema_name: The integration account schema name. :type schema_name: str - :param schema_type: The schema type. - :type schema_type: str or ~logic_management_client.models.SchemaType - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param target_namespace: The target namespace of the schema. - :type target_namespace: str - :param document_name: The document name. - :type document_name: str - :param file_name: The file name. - :type file_name: str - :param metadata: The metadata. - :type metadata: object - :param content: The content. - :type content: str - :param content_type_parameter: The content type. - :type content_type_parameter: str + :param schema: The integration account schema. + :type schema: ~logic_management_client.models.IntegrationAccountSchema :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchema or ~logic_management_client.models.IntegrationAccountSchema + :return: IntegrationAccountSchema, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountSchema :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _schema = models.IntegrationAccountSchema(location=location, tags=tags, schema_type=schema_type, target_namespace=target_namespace, document_name=document_name, file_name=file_name, metadata=metadata, content=content, content_type=content_type_parameter) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -253,23 +238,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_schema, 'IntegrationAccountSchema') + body_content = self._serialize.body(schema, 'IntegrationAccountSchema') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) @@ -277,10 +259,10 @@ async def create_or_update( deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} # type: ignore async def delete( self, @@ -298,16 +280,20 @@ async def delete( :param schema_name: The integration account schema name. :type schema_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -322,8 +308,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -331,20 +317,19 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} # type: ignore async def list_content_callback_url( self, resource_group_name: str, integration_account_name: str, schema_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, + list_content_callback_url: "models.GetCallbackUrlParameters", **kwargs ) -> "models.WorkflowTriggerCallbackUrl": """Get the content callback url. @@ -355,24 +340,24 @@ async def list_content_callback_url( :type integration_account_name: str :param schema_name: The integration account schema name. :type schema_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_content_callback_url: + :type list_content_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -388,26 +373,24 @@ async def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_session_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_sessions_operations.py similarity index 76% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_session_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_sessions_operations.py index 2ed274d71bf..1f6f53a81fb 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_session_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_sessions_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationAccountSessionOperations: - """IntegrationAccountSessionOperations async operations. +class IntegrationAccountSessionsOperations: + """IntegrationAccountSessionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +48,7 @@ def list( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.IntegrationAccountSessionListResult": + ) -> AsyncIterable["models.IntegrationAccountSessionListResult"]: """Gets a list of integration account sessions. :param resource_group_name: The resource group name. @@ -59,41 +60,45 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: ChangedTime. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSessionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSessionListResult + :return: An iterator like instance of either IntegrationAccountSessionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationAccountSessionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSessionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -112,14 +117,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} # type: ignore async def get( self, @@ -137,16 +142,20 @@ async def get( :param session_name: The integration account session name. :type session_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession or the result of cls(response) + :return: IntegrationAccountSession, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountSession :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -161,9 +170,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -171,24 +179,22 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} # type: ignore async def create_or_update( self, resource_group_name: str, integration_account_name: str, session_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - content: Optional[object] = None, + session: "models.IntegrationAccountSession", **kwargs ) -> "models.IntegrationAccountSession": """Creates or updates an integration account session. @@ -199,26 +205,24 @@ async def create_or_update( :type integration_account_name: str :param session_name: The integration account session name. :type session_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param content: The session content. - :type content: object + :param session: The integration account session. + :type session: ~logic_management_client.models.IntegrationAccountSession :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSession or ~logic_management_client.models.IntegrationAccountSession + :return: IntegrationAccountSession, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountSession :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _session = models.IntegrationAccountSession(location=location, tags=tags, content=content) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -234,23 +238,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_session, 'IntegrationAccountSession') + body_content = self._serialize.body(session, 'IntegrationAccountSession') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) @@ -258,10 +259,10 @@ async def create_or_update( deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} # type: ignore async def delete( self, @@ -279,16 +280,20 @@ async def delete( :param session_name: The integration account session name. :type session_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -303,8 +308,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -312,9 +317,9 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_accounts_operations.py similarity index 70% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_accounts_operations.py index 4453a7d2b63..5f0a156434d 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_accounts_operations.py @@ -5,22 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationAccountOperations: - """IntegrationAccountOperations async operations. +class IntegrationAccountsOperations: + """IntegrationAccountsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -45,43 +45,47 @@ def list_by_subscription( self, top: Optional[int] = None, **kwargs - ) -> "models.IntegrationAccountListResult": + ) -> AsyncIterable["models.IntegrationAccountListResult"]: """Gets a list of integration accounts by subscription. :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountListResult + :return: An iterator like instance of either IntegrationAccountListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationAccountListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -100,21 +104,21 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} # type: ignore def list_by_resource_group( self, resource_group_name: str, top: Optional[int] = None, **kwargs - ) -> "models.IntegrationAccountListResult": + ) -> AsyncIterable["models.IntegrationAccountListResult"]: """Gets a list of integration accounts by resource group. :param resource_group_name: The resource group name. @@ -122,38 +126,42 @@ def list_by_resource_group( :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountListResult + :return: An iterator like instance of either IntegrationAccountListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationAccountListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -172,14 +180,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} # type: ignore async def get( self, @@ -194,16 +202,20 @@ async def get( :param integration_account_name: The integration account name. :type integration_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) + :return: IntegrationAccount, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccount :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -217,9 +229,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -227,25 +238,21 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore async def create_or_update( self, resource_group_name: str, integration_account_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["models.IntegrationAccountSku"] = None, - integration_service_environment: Optional["models.IntegrationServiceEnvironment"] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, + integration_account: "models.IntegrationAccount", **kwargs ) -> "models.IntegrationAccount": """Creates or updates an integration account. @@ -254,30 +261,24 @@ async def create_or_update( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment - :param state: The workflow state. - :type state: str or ~logic_management_client.models.WorkflowState + :param integration_account: The integration account. + :type integration_account: ~logic_management_client.models.IntegrationAccount :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount or ~logic_management_client.models.IntegrationAccount + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccount :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -292,23 +293,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_account, 'IntegrationAccount') + body_content = self._serialize.body(integration_account, 'IntegrationAccount') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccount', pipeline_response) @@ -316,20 +314,16 @@ async def create_or_update( deserialized = self._deserialize('IntegrationAccount', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore async def update( self, resource_group_name: str, integration_account_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["models.IntegrationAccountSku"] = None, - integration_service_environment: Optional["models.IntegrationServiceEnvironment"] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, + integration_account: "models.IntegrationAccount", **kwargs ) -> "models.IntegrationAccount": """Updates an integration account. @@ -338,30 +332,24 @@ async def update( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment - :param state: The workflow state. - :type state: str or ~logic_management_client.models.WorkflowState + :param integration_account: The integration account. + :type integration_account: ~logic_management_client.models.IntegrationAccount :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) + :return: IntegrationAccount, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccount :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update.metadata['url'] + url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -376,29 +364,27 @@ async def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_account, 'IntegrationAccount') + body_content = self._serialize.body(integration_account, 'IntegrationAccount') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore async def delete( self, @@ -413,16 +399,20 @@ async def delete( :param integration_account_name: The integration account name. :type integration_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -436,8 +426,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -445,19 +435,18 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore async def list_callback_url( self, resource_group_name: str, integration_account_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, + parameters: "models.GetCallbackUrlParameters", **kwargs ) -> "models.CallbackUrl": """Gets the integration account callback URL. @@ -466,24 +455,24 @@ async def list_callback_url( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param parameters: The callback URL parameters. + :type parameters: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: CallbackUrl or the result of cls(response) + :return: CallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.CallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_callback_url.metadata['url'] + url = self.list_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -498,87 +487,87 @@ async def list_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'GetCallbackUrlParameters') + body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} # type: ignore - def list_key_vault_key( + def list_key_vault_keys( self, resource_group_name: str, integration_account_name: str, - key_vault: "models.KeyVaultReference", - skip_token: Optional[str] = None, + list_key_vault_keys: "models.ListKeyVaultKeysDefinition", **kwargs - ) -> "models.KeyVaultKeyCollection": + ) -> AsyncIterable["models.KeyVaultKeyCollection"]: """Gets the integration account's Key Vault keys. :param resource_group_name: The resource group name. :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param key_vault: The key vault reference. - :type key_vault: ~logic_management_client.models.KeyVaultReference - :param skip_token: The skip token. - :type skip_token: str + :param list_key_vault_keys: The key vault parameters. + :type list_key_vault_keys: ~logic_management_client.models.ListKeyVaultKeysDefinition :keyword callable cls: A custom type or function that will be passed the direct response - :return: KeyVaultKeyCollection or the result of cls(response) - :rtype: ~logic_management_client.models.KeyVaultKeyCollection + :return: An iterator like instance of either KeyVaultKeyCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.KeyVaultKeyCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.KeyVaultKeyCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - _list_key_vault_keys = models.ListKeyVaultKeysDefinition(key_vault=key_vault, skip_token=skip_token) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = "application/json" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_key_vault_key.metadata['url'] + url = self.list_key_vault_keys.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_key_vault_keys, 'ListKeyVaultKeysDefinition') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) return request async def extract_data(pipeline_response): @@ -597,22 +586,20 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_key_vault_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} + list_key_vault_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} # type: ignore - async def log_tracking_event( + async def log_tracking_events( self, resource_group_name: str, integration_account_name: str, - source_type: str, - events: List["TrackingEvent"], - track_events_options: Optional[Union[str, "models.TrackEventsOperationOptions"]] = None, + log_tracking_events: "models.TrackingEventsDefinition", **kwargs ) -> None: """Logs the integration account's tracking events. @@ -621,26 +608,24 @@ async def log_tracking_event( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param source_type: The source type. - :type source_type: str - :param events: The events. - :type events: list[~logic_management_client.models.TrackingEvent] - :param track_events_options: The track events options. - :type track_events_options: str or ~logic_management_client.models.TrackEventsOperationOptions + :param log_tracking_events: The callback URL parameters. + :type log_tracking_events: ~logic_management_client.models.TrackingEventsDefinition :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _log_tracking_events = models.TrackingEventsDefinition(source_type=source_type, track_events_options=track_events_options, events=events) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.log_tracking_event.metadata['url'] + url = self.log_tracking_events.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -655,31 +640,30 @@ async def log_tracking_event( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_log_tracking_events, 'TrackingEventsDefinition') + body_content = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - log_tracking_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} + log_tracking_events.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} # type: ignore async def regenerate_access_key( self, resource_group_name: str, integration_account_name: str, - key_type: Optional[Union[str, "models.KeyType"]] = None, + regenerate_access_key: "models.RegenerateActionParameter", **kwargs ) -> "models.IntegrationAccount": """Regenerates the integration account access key. @@ -688,22 +672,24 @@ async def regenerate_access_key( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param regenerate_access_key: The access key type. + :type regenerate_access_key: ~logic_management_client.models.RegenerateActionParameter :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) + :return: IntegrationAccount, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccount :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _regenerate_access_key = models.RegenerateActionParameter(key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.regenerate_access_key.metadata['url'] + url = self.regenerate_access_key.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -718,26 +704,24 @@ async def regenerate_access_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_regenerate_access_key, 'RegenerateActionParameter') + body_content = self._serialize.body(regenerate_access_key, 'RegenerateActionParameter') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operation_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py similarity index 73% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operation_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py index 085d28c8212..c41a9ed5249 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operation_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationServiceEnvironmentManagedApiOperationOperations: - """IntegrationServiceEnvironmentManagedApiOperationOperations async operations. +class IntegrationServiceEnvironmentManagedApiOperationsOperations: + """IntegrationServiceEnvironmentManagedApiOperationsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,7 +47,7 @@ def list( integration_service_environment_name: str, api_name: str, **kwargs - ) -> "models.ApiOperationListResult": + ) -> AsyncIterable["models.ApiOperationListResult"]: """Gets the managed Api operations. :param resource_group: The resource group. @@ -56,18 +57,26 @@ def list( :param api_name: The api name. :type api_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApiOperationListResult or the result of cls(response) - :rtype: ~logic_management_client.models.ApiOperationListResult + :return: An iterator like instance of either ApiOperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.ApiOperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ApiOperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -75,19 +84,15 @@ def prepare_request(next_link=None): 'apiName': self._serialize.url("api_name", api_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -106,11 +111,11 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_apis_operations.py similarity index 63% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_apis_operations.py index 9c0380324d2..3ba3ac0fad3 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_apis_operations.py @@ -5,22 +5,24 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationServiceEnvironmentManagedApiOperations: - """IntegrationServiceEnvironmentManagedApiOperations async operations. +class IntegrationServiceEnvironmentManagedApisOperations: + """IntegrationServiceEnvironmentManagedApisOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,7 +48,7 @@ def list( resource_group: str, integration_service_environment_name: str, **kwargs - ) -> "models.ManagedApiListResult": + ) -> AsyncIterable["models.ManagedApiListResult"]: """Gets the integration service environment managed Apis. :param resource_group: The resource group. @@ -54,37 +56,41 @@ def list( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedApiListResult or the result of cls(response) - :rtype: ~logic_management_client.models.ManagedApiListResult + :return: An iterator like instance of either ManagedApiListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.ManagedApiListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApiListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -103,14 +109,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis'} # type: ignore async def get( self, @@ -128,16 +134,20 @@ async def get( :param api_name: The api name. :type api_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedApi or the result of cls(response) + :return: ManagedApi, or the result of cls(response) :rtype: ~logic_management_client.models.ManagedApi :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -152,9 +162,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -162,15 +171,15 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagedApi', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore async def _put_initial( self, @@ -180,11 +189,15 @@ async def _put_initial( **kwargs ) -> "models.ManagedApi": cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self._put_initial.metadata['url'] + url = self._put_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -199,9 +212,8 @@ async def _put_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.put(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -209,9 +221,8 @@ async def _put_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('ManagedApi', pipeline_response) @@ -219,18 +230,18 @@ async def _put_initial( deserialized = self._deserialize('ManagedApi', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore - async def put( + async def begin_put( self, resource_group: str, integration_service_environment_name: str, api_name: str, **kwargs - ) -> "models.ManagedApi": + ) -> AsyncLROPoller["models.ManagedApi"]: """Puts the integration service environment managed Api. :param resource_group: The resource group name. @@ -240,23 +251,33 @@ async def put( :param api_name: The api name. :type api_name: str :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns ManagedApi - :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.ManagedApi] - + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedApi or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~logic_management_client.models.ManagedApi] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - raw_result = await self._put_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._put_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): deserialized = self._deserialize('ManagedApi', pipeline_response) @@ -265,15 +286,26 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + 'apiName': self._serialize.url("api_name", api_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore async def _delete_initial( self, @@ -283,11 +315,15 @@ async def _delete_initial( **kwargs ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -302,8 +338,8 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -311,20 +347,20 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore - async def delete( + async def begin_delete( self, resource_group: str, integration_service_environment_name: str, api_name: str, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Deletes the integration service environment managed Api. :param resource_group: The resource group. @@ -334,34 +370,55 @@ async def delete( :param api_name: The api name. :type api_name: str :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] - raw_result = await self._delete_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + 'apiName': self._serialize.url("api_name", api_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_network_health_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py similarity index 81% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_network_health_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py index 182063c8f0a..664e419ac3d 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_network_health_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py @@ -8,9 +8,10 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models @@ -44,7 +45,7 @@ async def get( resource_group: str, integration_service_environment_name: str, **kwargs - ) -> Dict[str, "IntegrationServiceEnvironmentSubnetNetworkHealth"]: + ) -> Dict[str, "models.IntegrationServiceEnvironmentSubnetNetworkHealth"]: """Gets the integration service environment network health. :param resource_group: The resource group. @@ -52,16 +53,20 @@ async def get( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: dict or the result of cls(response) + :return: dict mapping str to IntegrationServiceEnvironmentSubnetNetworkHealth, or the result of cls(response) :rtype: dict[str, ~logic_management_client.models.IntegrationServiceEnvironmentSubnetNetworkHealth] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, "IntegrationServiceEnvironmentSubnetNetworkHealth"]] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, "models.IntegrationServiceEnvironmentSubnetNetworkHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -75,9 +80,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -85,12 +89,12 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('{IntegrationServiceEnvironmentSubnetNetworkHealth}', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_sku_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_skus_operations.py similarity index 71% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_sku_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_skus_operations.py index 68e19d61a2f..7f7c0d94fba 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_sku_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_skus_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationServiceEnvironmentSkuOperations: - """IntegrationServiceEnvironmentSkuOperations async operations. +class IntegrationServiceEnvironmentSkusOperations: + """IntegrationServiceEnvironmentSkusOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -45,7 +46,7 @@ def list( resource_group: str, integration_service_environment_name: str, **kwargs - ) -> "models.IntegrationServiceEnvironmentSkuList": + ) -> AsyncIterable["models.IntegrationServiceEnvironmentSkuList"]: """Gets a list of integration service environment Skus. :param resource_group: The resource group. @@ -53,37 +54,41 @@ def list( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentSkuList or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentSkuList + :return: An iterator like instance of either IntegrationServiceEnvironmentSkuList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationServiceEnvironmentSkuList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentSkuList"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -102,11 +107,11 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environments_operations.py similarity index 63% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environments_operations.py index 47134dc48cc..286f3670e8a 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environments_operations.py @@ -5,22 +5,24 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class IntegrationServiceEnvironmentOperations: - """IntegrationServiceEnvironmentOperations async operations. +class IntegrationServiceEnvironmentsOperations: + """IntegrationServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -45,43 +47,47 @@ def list_by_subscription( self, top: Optional[int] = None, **kwargs - ) -> "models.IntegrationServiceEnvironmentListResult": + ) -> AsyncIterable["models.IntegrationServiceEnvironmentListResult"]: """Gets a list of integration service environments by subscription. :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentListResult + :return: An iterator like instance of either IntegrationServiceEnvironmentListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationServiceEnvironmentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -100,21 +106,21 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments'} + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments'} # type: ignore def list_by_resource_group( self, resource_group: str, top: Optional[int] = None, **kwargs - ) -> "models.IntegrationServiceEnvironmentListResult": + ) -> AsyncIterable["models.IntegrationServiceEnvironmentListResult"]: """Gets a list of integration service environments by resource group. :param resource_group: The resource group. @@ -122,38 +128,42 @@ def list_by_resource_group( :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentListResult + :return: An iterator like instance of either IntegrationServiceEnvironmentListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.IntegrationServiceEnvironmentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -172,14 +182,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments'} # type: ignore async def get( self, @@ -194,16 +204,20 @@ async def get( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironment or the result of cls(response) + :return: IntegrationServiceEnvironment, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationServiceEnvironment :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -217,9 +231,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -227,35 +240,34 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore async def _create_or_update_initial( self, resource_group: str, integration_service_environment_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["models.IntegrationServiceEnvironmentProperties"] = None, - sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + integration_service_environment: "models.IntegrationServiceEnvironment", **kwargs ) -> "models.IntegrationServiceEnvironment": cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -270,23 +282,20 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_service_environment, 'IntegrationServiceEnvironment') + body_content = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -294,56 +303,54 @@ async def _create_or_update_initial( deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore - async def create_or_update( + async def begin_create_or_update( self, resource_group: str, integration_service_environment_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["models.IntegrationServiceEnvironmentProperties"] = None, - sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + integration_service_environment: "models.IntegrationServiceEnvironment", **kwargs - ) -> "models.IntegrationServiceEnvironment": + ) -> AsyncLROPoller["models.IntegrationServiceEnvironment"]: """Creates or updates an integration service environment. :param resource_group: The resource group. :type resource_group: str :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param integration_service_environment: The integration service environment. + :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns IntegrationServiceEnvironment - :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.IntegrationServiceEnvironment] - + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either IntegrationServiceEnvironment or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~logic_management_client.models.IntegrationServiceEnvironment] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - raw_result = await self._create_or_update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - location=location, - tags=tags, - properties=properties, - sku=sku, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -352,35 +359,44 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore async def _update_initial( self, resource_group: str, integration_service_environment_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["models.IntegrationServiceEnvironmentProperties"] = None, - sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + integration_service_environment: "models.IntegrationServiceEnvironment", **kwargs ) -> "models.IntegrationServiceEnvironment": cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -395,75 +411,71 @@ async def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_service_environment, 'IntegrationServiceEnvironment') + body_content = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore - async def update( + async def begin_update( self, resource_group: str, integration_service_environment_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["models.IntegrationServiceEnvironmentProperties"] = None, - sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + integration_service_environment: "models.IntegrationServiceEnvironment", **kwargs - ) -> "models.IntegrationServiceEnvironment": + ) -> AsyncLROPoller["models.IntegrationServiceEnvironment"]: """Updates an integration service environment. :param resource_group: The resource group. :type resource_group: str :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param integration_service_environment: The integration service environment. + :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns IntegrationServiceEnvironment - :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.IntegrationServiceEnvironment] - + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either IntegrationServiceEnvironment or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~logic_management_client.models.IntegrationServiceEnvironment] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - raw_result = await self._update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - location=location, - tags=tags, - properties=properties, - sku=sku, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -472,15 +484,25 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore async def delete( self, @@ -495,16 +517,20 @@ async def delete( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -518,8 +544,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -527,12 +553,12 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore async def restart( self, @@ -547,16 +573,20 @@ async def restart( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.restart.metadata['url'] + url = self.restart.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -570,8 +600,8 @@ async def restart( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -579,9 +609,9 @@ async def restart( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart'} + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_operation_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operations.py similarity index 69% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_operation_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operations.py index d4059badd62..1dff7a39941 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_operation_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class OperationOperations: - """OperationOperations async operations. +class Operations: + """Operations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -43,35 +44,39 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, **kwargs - ) -> "models.OperationListResult": + ) -> AsyncIterable["models.OperationListResult"]: """Lists all of the available Logic REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationListResult or the result of cls(response) - :rtype: ~logic_management_client.models.OperationListResult + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -90,11 +95,11 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.Logic/operations'} + list.metadata = {'url': '/providers/Microsoft.Logic/operations'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_operations.py similarity index 74% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_operations.py index d16fe2f0b6a..349c6fbf431 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowRunActionRepetitionOperations: - """WorkflowRunActionRepetitionOperations async operations. +class WorkflowRunActionRepetitionsOperations: + """WorkflowRunActionRepetitionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +48,7 @@ def list( run_name: str, action_name: str, **kwargs - ) -> "models.WorkflowRunActionRepetitionDefinitionCollection": + ) -> AsyncIterable["models.WorkflowRunActionRepetitionDefinitionCollection"]: """Get all of a workflow run action repetitions. :param resource_group_name: The resource group name. @@ -59,18 +60,26 @@ def list( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection + :return: An iterator like instance of either WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -79,19 +88,15 @@ def prepare_request(next_link=None): 'actionName': self._serialize.url("action_name", action_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -110,14 +115,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} # type: ignore async def get( self, @@ -141,16 +146,20 @@ async def get( :param repetition_name: The workflow repetition. :type repetition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinition or the result of cls(response) + :return: WorkflowRunActionRepetitionDefinition, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -167,9 +176,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -177,17 +185,17 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} # type: ignore - def list_expression_trace( + def list_expression_traces( self, resource_group_name: str, workflow_name: str, @@ -195,7 +203,7 @@ def list_expression_trace( action_name: str, repetition_name: str, **kwargs - ) -> "models.ExpressionTraces": + ) -> AsyncIterable["models.ExpressionTraces"]: """Lists a workflow run expression trace. :param resource_group_name: The resource group name. @@ -209,18 +217,26 @@ def list_expression_trace( :param repetition_name: The workflow repetition. :type repetition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressionTraces or the result of cls(response) - :rtype: ~logic_management_client.models.ExpressionTraces + :return: An iterator like instance of either ExpressionTraces or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.ExpressionTraces] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ExpressionTraces"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_expression_trace.metadata['url'] + url = self.list_expression_traces.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -230,19 +246,15 @@ def prepare_request(next_link=None): 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -261,11 +273,11 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_expression_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_request_history_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py similarity index 78% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_request_history_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py index faa4ba487cf..294724d60f2 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_request_history_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowRunActionRepetitionRequestHistoryOperations: - """WorkflowRunActionRepetitionRequestHistoryOperations async operations. +class WorkflowRunActionRepetitionsRequestHistoriesOperations: + """WorkflowRunActionRepetitionsRequestHistoriesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +49,7 @@ def list( action_name: str, repetition_name: str, **kwargs - ) -> "models.RequestHistoryListResult": + ) -> AsyncIterable["models.RequestHistoryListResult"]: """List a workflow run repetition request history. :param resource_group_name: The resource group name. @@ -62,18 +63,26 @@ def list( :param repetition_name: The workflow repetition. :type repetition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistoryListResult + :return: An iterator like instance of either RequestHistoryListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.RequestHistoryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,19 +92,15 @@ def prepare_request(next_link=None): 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -114,14 +119,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'} # type: ignore async def get( self, @@ -148,16 +153,20 @@ async def get( :param request_history_name: The request history name. :type request_history_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistory or the result of cls(response) + :return: RequestHistory, or the result of cls(response) :rtype: ~logic_management_client.models.RequestHistory :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -175,9 +184,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -185,12 +193,12 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RequestHistory', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_request_history_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_histories_operations.py similarity index 77% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_request_history_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_histories_operations.py index edfdb25ca27..6102f16a5f6 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_request_history_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_histories_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowRunActionRequestHistoryOperations: - """WorkflowRunActionRequestHistoryOperations async operations. +class WorkflowRunActionRequestHistoriesOperations: + """WorkflowRunActionRequestHistoriesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +48,7 @@ def list( run_name: str, action_name: str, **kwargs - ) -> "models.RequestHistoryListResult": + ) -> AsyncIterable["models.RequestHistoryListResult"]: """List a workflow run request history. :param resource_group_name: The resource group name. @@ -59,18 +60,26 @@ def list( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistoryListResult + :return: An iterator like instance of either RequestHistoryListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.RequestHistoryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -79,19 +88,15 @@ def prepare_request(next_link=None): 'actionName': self._serialize.url("action_name", action_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -110,14 +115,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'} # type: ignore async def get( self, @@ -141,16 +146,20 @@ async def get( :param request_history_name: The request history name. :type request_history_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistory or the result of cls(response) + :return: RequestHistory, or the result of cls(response) :rtype: ~logic_management_client.models.RequestHistory :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -167,9 +176,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -177,12 +185,12 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RequestHistory', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_scope_repetition_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py similarity index 77% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_scope_repetition_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py index 466b93bc8e5..300497c99cb 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_scope_repetition_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowRunActionScopeRepetitionOperations: - """WorkflowRunActionScopeRepetitionOperations async operations. +class WorkflowRunActionScopeRepetitionsOperations: + """WorkflowRunActionScopeRepetitionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +48,7 @@ def list( run_name: str, action_name: str, **kwargs - ) -> "models.WorkflowRunActionRepetitionDefinitionCollection": + ) -> AsyncIterable["models.WorkflowRunActionRepetitionDefinitionCollection"]: """List the workflow run action scoped repetitions. :param resource_group_name: The resource group name. @@ -59,18 +60,26 @@ def list( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection + :return: An iterator like instance of either WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -79,19 +88,15 @@ def prepare_request(next_link=None): 'actionName': self._serialize.url("action_name", action_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -110,14 +115,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} # type: ignore async def get( self, @@ -141,16 +146,20 @@ async def get( :param repetition_name: The workflow repetition. :type repetition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinition or the result of cls(response) + :return: WorkflowRunActionRepetitionDefinition, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -167,9 +176,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -177,12 +185,12 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_actions_operations.py similarity index 71% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_actions_operations.py index be74db4440a..39a80b1e8e4 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_actions_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowRunActionOperations: - """WorkflowRunActionOperations async operations. +class WorkflowRunActionsOperations: + """WorkflowRunActionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +49,7 @@ def list( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.WorkflowRunActionListResult": + ) -> AsyncIterable["models.WorkflowRunActionListResult"]: """Gets a list of workflow run actions. :param resource_group_name: The resource group name. @@ -62,18 +63,26 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: Status. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionListResult + :return: An iterator like instance of either WorkflowRunActionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.WorkflowRunActionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -81,23 +90,19 @@ def prepare_request(next_link=None): 'runName': self._serialize.url("run_name", run_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -116,14 +121,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} # type: ignore async def get( self, @@ -144,16 +149,20 @@ async def get( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunAction or the result of cls(response) + :return: WorkflowRunAction, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRunAction :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunAction"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,9 +178,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -179,24 +187,24 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunAction', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} # type: ignore - def list_expression_trace( + def list_expression_traces( self, resource_group_name: str, workflow_name: str, run_name: str, action_name: str, **kwargs - ) -> "models.ExpressionTraces": + ) -> AsyncIterable["models.ExpressionTraces"]: """Lists a workflow run expression trace. :param resource_group_name: The resource group name. @@ -208,18 +216,26 @@ def list_expression_trace( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressionTraces or the result of cls(response) - :rtype: ~logic_management_client.models.ExpressionTraces + :return: An iterator like instance of either ExpressionTraces or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.ExpressionTraces] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ExpressionTraces"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_expression_trace.metadata['url'] + url = self.list_expression_traces.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -228,19 +244,15 @@ def prepare_request(next_link=None): 'actionName': self._serialize.url("action_name", action_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -259,11 +271,11 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_expression_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operation_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations_operations.py similarity index 82% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operation_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations_operations.py index 1f9a83baf7c..0b72202d807 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operation_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations_operations.py @@ -8,17 +8,18 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowRunOperationOperations: - """WorkflowRunOperationOperations async operations. +class WorkflowRunOperationsOperations: + """WorkflowRunOperationsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -58,16 +59,20 @@ async def get( :param operation_id: The workflow operation id. :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRun or the result of cls(response) + :return: WorkflowRun, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRun :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,9 +88,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -93,12 +97,12 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRun', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_runs_operations.py similarity index 75% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_runs_operations.py index 6928623af09..8a7ed360d08 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_runs_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowRunOperations: - """WorkflowRunOperations async operations. +class WorkflowRunsOperations: + """WorkflowRunsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +48,7 @@ def list( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.WorkflowRunListResult": + ) -> AsyncIterable["models.WorkflowRunListResult"]: """Gets a list of workflow runs. :param resource_group_name: The resource group name. @@ -57,44 +58,48 @@ def list( :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. + StartTime, and ClientTrackingId. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunListResult + :return: An iterator like instance of either WorkflowRunListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.WorkflowRunListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -113,14 +118,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} # type: ignore async def get( self, @@ -138,16 +143,20 @@ async def get( :param run_name: The workflow run name. :type run_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRun or the result of cls(response) + :return: WorkflowRun, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRun :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -162,9 +171,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -172,15 +180,15 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRun', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} # type: ignore async def cancel( self, @@ -198,16 +206,20 @@ async def cancel( :param run_name: The workflow run name. :type run_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.cancel.metadata['url'] + url = self.cancel.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -222,8 +234,8 @@ async def cancel( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -231,9 +243,9 @@ async def cancel( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_history_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_histories_operations.py similarity index 76% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_history_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_histories_operations.py index c312c502edf..088ef6a937d 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_history_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_histories_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowTriggerHistoryOperations: - """WorkflowTriggerHistoryOperations async operations. +class WorkflowTriggerHistoriesOperations: + """WorkflowTriggerHistoriesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +49,7 @@ def list( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.WorkflowTriggerHistoryListResult": + ) -> AsyncIterable["models.WorkflowTriggerHistoryListResult"]: """Gets a list of workflow trigger histories. :param resource_group_name: The resource group name. @@ -60,21 +61,29 @@ def list( :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. + StartTime, and ClientTrackingId. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerHistoryListResult + :return: An iterator like instance of either WorkflowTriggerHistoryListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.WorkflowTriggerHistoryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -82,23 +91,19 @@ def prepare_request(next_link=None): 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -117,14 +122,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} # type: ignore async def get( self, @@ -146,16 +151,20 @@ async def get( triggers that resulted in a run. :type history_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerHistory or the result of cls(response) + :return: WorkflowTriggerHistory, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerHistory :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -171,9 +180,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -181,15 +189,15 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerHistory', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} # type: ignore async def resubmit( self, @@ -211,16 +219,20 @@ async def resubmit( triggers that resulted in a run. :type history_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.resubmit.metadata['url'] + url = self.resubmit.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -236,8 +248,8 @@ async def resubmit( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -245,9 +257,9 @@ async def resubmit( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} + resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_triggers_operations.py similarity index 76% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_triggers_operations.py index f0089b62dc1..15656c15b2b 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_triggers_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowTriggerOperations: - """WorkflowTriggerOperations async operations. +class WorkflowTriggersOperations: + """WorkflowTriggersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +48,7 @@ def list( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.WorkflowTriggerListResult": + ) -> AsyncIterable["models.WorkflowTriggerListResult"]: """Gets a list of workflow triggers. :param resource_group_name: The resource group name. @@ -59,41 +60,45 @@ def list( :param filter: The filter to apply on the operation. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerListResult + :return: An iterator like instance of either WorkflowTriggerListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.WorkflowTriggerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -112,14 +117,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers'} # type: ignore async def get( self, @@ -137,16 +142,20 @@ async def get( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTrigger or the result of cls(response) + :return: WorkflowTrigger, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTrigger :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTrigger"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -161,9 +170,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -171,15 +179,15 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTrigger', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} # type: ignore async def reset( self, @@ -197,16 +205,20 @@ async def reset( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.reset.metadata['url'] + url = self.reset.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -221,8 +233,8 @@ async def reset( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -230,12 +242,12 @@ async def reset( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} + reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} # type: ignore async def run( self, @@ -253,16 +265,20 @@ async def run( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.run.metadata['url'] + url = self.run.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -277,21 +293,21 @@ async def run( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in []: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize('object', response) - raise HttpResponseError(response=response, model=error) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} + run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} # type: ignore async def get_schema_json( self, @@ -309,16 +325,20 @@ async def get_schema_json( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: JsonSchema or the result of cls(response) + :return: JsonSchema, or the result of cls(response) :rtype: ~logic_management_client.models.JsonSchema :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.JsonSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get_schema_json.metadata['url'] + url = self.get_schema_json.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -333,9 +353,8 @@ async def get_schema_json( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -343,22 +362,22 @@ async def get_schema_json( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JsonSchema', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} + get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} # type: ignore async def set_state( self, resource_group_name: str, workflow_name: str, trigger_name: str, - source: "models.WorkflowTrigger", + set_state: "models.SetTriggerStateActionDefinition", **kwargs ) -> None: """Sets the state of a workflow trigger. @@ -369,22 +388,24 @@ async def set_state( :type workflow_name: str :param trigger_name: The workflow trigger name. :type trigger_name: str - :param source: The source. - :type source: ~logic_management_client.models.WorkflowTrigger + :param set_state: The workflow trigger state. + :type set_state: ~logic_management_client.models.SetTriggerStateActionDefinition :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _set_state = models.SetTriggerStateActionDefinition(source=source) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.set_state.metadata['url'] + url = self.set_state.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -400,25 +421,24 @@ async def set_state( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_set_state, 'SetTriggerStateActionDefinition') + body_content = self._serialize.body(set_state, 'SetTriggerStateActionDefinition') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} + set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} # type: ignore async def list_callback_url( self, @@ -436,16 +456,20 @@ async def list_callback_url( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.list_callback_url.metadata['url'] + url = self.list_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -460,9 +484,8 @@ async def list_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -470,12 +493,12 @@ async def list_callback_url( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_trigger_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_triggers_operations.py similarity index 79% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_trigger_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_triggers_operations.py index 527772d7cb7..5e3aa895ec8 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_trigger_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_triggers_operations.py @@ -5,21 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowVersionTriggerOperations: - """WorkflowVersionTriggerOperations async operations. +class WorkflowVersionTriggersOperations: + """WorkflowVersionTriggersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,8 +46,7 @@ async def list_callback_url( workflow_name: str, version_id: str, trigger_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, + parameters: Optional["models.GetCallbackUrlParameters"] = None, **kwargs ) -> "models.WorkflowTriggerCallbackUrl": """Get the callback url for a trigger of a workflow version. @@ -60,24 +59,24 @@ async def list_callback_url( :type version_id: str :param trigger_name: The workflow trigger name. :type trigger_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param parameters: The callback URL parameters. + :type parameters: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_callback_url.metadata['url'] + url = self.list_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -94,29 +93,27 @@ async def list_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - if _parameters is not None: - body_content = self._serialize.body(_parameters, 'GetCallbackUrlParameters') + if parameters is not None: + body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') else: body_content = None body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_versions_operations.py similarity index 74% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_versions_operations.py index a03d909848f..a4a6c925dab 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_versions_operations.py @@ -5,21 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowVersionOperations: - """WorkflowVersionOperations async operations. +class WorkflowVersionsOperations: + """WorkflowVersionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,7 +47,7 @@ def list( workflow_name: str, top: Optional[int] = None, **kwargs - ) -> "models.WorkflowVersionListResult": + ) -> AsyncIterable["models.WorkflowVersionListResult"]: """Gets a list of workflow versions. :param resource_group_name: The resource group name. @@ -56,39 +57,43 @@ def list( :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowVersionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowVersionListResult + :return: An iterator like instance of either WorkflowVersionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.WorkflowVersionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowVersionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -107,14 +112,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} # type: ignore async def get( self, @@ -132,16 +137,20 @@ async def get( :param version_id: The workflow versionId. :type version_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowVersion or the result of cls(response) + :return: WorkflowVersion, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowVersion :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowVersion"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -156,9 +165,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -166,12 +174,12 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowVersion', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflows_operations.py similarity index 68% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflows_operations.py index 8fde256f5ca..56ab36b6b29 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflows_operations.py @@ -5,23 +5,24 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowOperations: - """WorkflowOperations async operations. +class WorkflowsOperations: + """WorkflowsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,48 +48,52 @@ def list_by_subscription( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.WorkflowListResult": + ) -> AsyncIterable["models.WorkflowListResult"]: """Gets a list of workflows by subscription. :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. + Trigger, and ReferencedResourceId. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowListResult + :return: An iterator like instance of either WorkflowListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.WorkflowListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -107,14 +112,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} # type: ignore def list_by_resource_group( self, @@ -122,7 +127,7 @@ def list_by_resource_group( top: Optional[int] = None, filter: Optional[str] = None, **kwargs - ) -> "models.WorkflowListResult": + ) -> AsyncIterable["models.WorkflowListResult"]: """Gets a list of workflows by resource group. :param resource_group_name: The resource group name. @@ -130,43 +135,47 @@ def list_by_resource_group( :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. + Trigger, and ReferencedResourceId. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowListResult + :return: An iterator like instance of either WorkflowListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~logic_management_client.models.WorkflowListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -185,14 +194,14 @@ async def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} # type: ignore async def get( self, @@ -207,16 +216,20 @@ async def get( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) + :return: Workflow, or the result of cls(response) :rtype: ~logic_management_client.models.Workflow :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -230,9 +243,8 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -240,28 +252,21 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workflow', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore async def create_or_update( self, resource_group_name: str, workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, + workflow: "models.Workflow", **kwargs ) -> "models.Workflow": """Creates or updates a workflow. @@ -270,36 +275,24 @@ async def create_or_update( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param workflow: The workflow. + :type workflow: ~logic_management_client.models.Workflow :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) - :rtype: ~logic_management_client.models.Workflow or ~logic_management_client.models.Workflow + :return: Workflow, or the result of cls(response) + :rtype: ~logic_management_client.models.Workflow :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _workflow = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -314,23 +307,20 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_workflow, 'Workflow') + body_content = self._serialize.body(workflow, 'Workflow') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('Workflow', pipeline_response) @@ -338,23 +328,15 @@ async def create_or_update( deserialized = self._deserialize('Workflow', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore async def update( self, resource_group_name: str, workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, **kwargs ) -> "models.Workflow": """Updates a workflow. @@ -363,36 +345,21 @@ async def update( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) + :return: Workflow, or the result of cls(response) :rtype: ~logic_management_client.models.Workflow :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _workflow = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update.metadata['url'] + url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -406,30 +373,24 @@ async def update( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_workflow, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.patch(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workflow', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore async def delete( self, @@ -444,16 +405,20 @@ async def delete( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -467,8 +432,8 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -476,12 +441,12 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore async def disable( self, @@ -496,16 +461,20 @@ async def disable( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.disable.metadata['url'] + url = self.disable.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -519,8 +488,8 @@ async def disable( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -528,12 +497,12 @@ async def disable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} + disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} # type: ignore async def enable( self, @@ -548,16 +517,20 @@ async def enable( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.enable.metadata['url'] + url = self.enable.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -571,8 +544,8 @@ async def enable( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -580,18 +553,18 @@ async def enable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} + enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} # type: ignore async def generate_upgraded_definition( self, resource_group_name: str, workflow_name: str, - target_schema_version: Optional[str] = None, + parameters: "models.GenerateUpgradedDefinitionParameters", **kwargs ) -> object: """Generates the upgraded definition for a workflow. @@ -600,22 +573,24 @@ async def generate_upgraded_definition( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param target_schema_version: The target schema version. - :type target_schema_version: str + :param parameters: Parameters for generating an upgraded definition. + :type parameters: ~logic_management_client.models.GenerateUpgradedDefinitionParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: object or the result of cls(response) + :return: object, or the result of cls(response) :rtype: object :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[object] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.generate_upgraded_definition.metadata['url'] + url = self.generate_upgraded_definition.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -630,36 +605,33 @@ async def generate_upgraded_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'GenerateUpgradedDefinitionParameters') + body_content = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} + generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} # type: ignore async def list_callback_url( self, resource_group_name: str, workflow_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, + list_callback_url: "models.GetCallbackUrlParameters", **kwargs ) -> "models.WorkflowTriggerCallbackUrl": """Get the workflow callback Url. @@ -668,24 +640,24 @@ async def list_callback_url( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_callback_url: Which callback url to list. + :type list_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_callback_url.metadata['url'] + url = self.list_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -700,29 +672,27 @@ async def list_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} # type: ignore async def list_swagger( self, @@ -737,16 +707,20 @@ async def list_swagger( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: object or the result of cls(response) + :return: object, or the result of cls(response) :rtype: object :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[object] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.list_swagger.metadata['url'] + url = self.list_swagger.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -760,9 +734,8 @@ async def list_swagger( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -770,39 +743,34 @@ async def list_swagger( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} + list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} # type: ignore async def _move_initial( self, resource_group_name: str, workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, + move: "models.WorkflowReference", **kwargs ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _move = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._move_initial.metadata['url'] + url = self._move_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -817,107 +785,98 @@ async def _move_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_move, 'Workflow') + body_content = self._serialize.body(move, 'WorkflowReference') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - _move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} + _move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} # type: ignore - async def move( + async def begin_move( self, resource_group_name: str, workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, + move: "models.WorkflowReference", **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Moves an existing workflow. :param resource_group_name: The resource group name. :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param move: The workflow to move. + :type move: ~logic_management_client.models.WorkflowReference :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] - raw_result = await self._move_initial( - resource_group_name=resource_group_name, - workflow_name=workflow_name, - location=location, - tags=tags, - state=state, - endpoints_configuration=endpoints_configuration, - integration_account=integration_account, - integration_service_environment=integration_service_environment, - definition=definition, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._move_initial( + resource_group_name=resource_group_name, + workflow_name=workflow_name, + move=move, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} # type: ignore async def regenerate_access_key( self, resource_group_name: str, workflow_name: str, - key_type: Optional[Union[str, "models.KeyType"]] = None, + key_type: "models.RegenerateActionParameter", **kwargs ) -> None: """Regenerates the callback URL access key for request triggers. @@ -926,22 +885,24 @@ async def regenerate_access_key( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param key_type: The access key type. + :type key_type: ~logic_management_client.models.RegenerateActionParameter :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _key_type = models.RegenerateActionParameter(key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.regenerate_access_key.metadata['url'] + url = self.regenerate_access_key.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -956,38 +917,30 @@ async def regenerate_access_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_key_type, 'RegenerateActionParameter') + body_content = self._serialize.body(key_type, 'RegenerateActionParameter') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} # type: ignore async def validate_by_resource_group( self, resource_group_name: str, workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, + validate: "models.Workflow", **kwargs ) -> None: """Validates the workflow. @@ -996,36 +949,24 @@ async def validate_by_resource_group( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param validate: The workflow. + :type validate: ~logic_management_client.models.Workflow :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _validate = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.validate_by_resource_group.metadata['url'] + url = self.validate_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -1040,31 +981,31 @@ async def validate_by_resource_group( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_validate, 'Workflow') + body_content = self._serialize.body(validate, 'Workflow') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - validate_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} + validate_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} # type: ignore async def validate_by_location( self, resource_group_name: str, location: str, workflow_name: str, + validate: "models.Workflow", **kwargs ) -> None: """Validates the workflow definition. @@ -1075,17 +1016,24 @@ async def validate_by_location( :type location: str :param workflow_name: The workflow name. :type workflow_name: str + :param validate: The workflow. + :type validate: ~logic_management_client.models.Workflow :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.validate_by_location.metadata['url'] + url = self.validate_by_location.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -1100,18 +1048,22 @@ async def validate_by_location( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate, 'Workflow') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - validate_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} + validate_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/__init__.py deleted file mode 100644 index 46e654ae232..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/__init__.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._workflow_operations_async import WorkflowOperations -from ._workflow_version_operations_async import WorkflowVersionOperations -from ._workflow_trigger_operations_async import WorkflowTriggerOperations -from ._workflow_version_trigger_operations_async import WorkflowVersionTriggerOperations -from ._workflow_trigger_history_operations_async import WorkflowTriggerHistoryOperations -from ._workflow_run_operations_async import WorkflowRunOperations -from ._workflow_run_action_operations_async import WorkflowRunActionOperations -from ._workflow_run_action_repetition_operations_async import WorkflowRunActionRepetitionOperations -from ._workflow_run_action_repetition_request_history_operations_async import WorkflowRunActionRepetitionRequestHistoryOperations -from ._workflow_run_action_request_history_operations_async import WorkflowRunActionRequestHistoryOperations -from ._workflow_run_action_scope_repetition_operations_async import WorkflowRunActionScopeRepetitionOperations -from ._workflow_run_operation_operations_async import WorkflowRunOperationOperations -from ._integration_account_operations_async import IntegrationAccountOperations -from ._integration_account_assembly_operations_async import IntegrationAccountAssemblyOperations -from ._integration_account_batch_configuration_operations_async import IntegrationAccountBatchConfigurationOperations -from ._integration_account_schema_operations_async import IntegrationAccountSchemaOperations -from ._integration_account_map_operations_async import IntegrationAccountMapOperations -from ._integration_account_partner_operations_async import IntegrationAccountPartnerOperations -from ._integration_account_agreement_operations_async import IntegrationAccountAgreementOperations -from ._integration_account_certificate_operations_async import IntegrationAccountCertificateOperations -from ._integration_account_session_operations_async import IntegrationAccountSessionOperations -from ._integration_service_environment_operations_async import IntegrationServiceEnvironmentOperations -from ._integration_service_environment_sku_operations_async import IntegrationServiceEnvironmentSkuOperations -from ._integration_service_environment_network_health_operations_async import IntegrationServiceEnvironmentNetworkHealthOperations -from ._integration_service_environment_managed_api_operations_async import IntegrationServiceEnvironmentManagedApiOperations -from ._integration_service_environment_managed_api_operation_operations_async import IntegrationServiceEnvironmentManagedApiOperationOperations -from ._operation_operations_async import OperationOperations - -__all__ = [ - 'WorkflowOperations', - 'WorkflowVersionOperations', - 'WorkflowTriggerOperations', - 'WorkflowVersionTriggerOperations', - 'WorkflowTriggerHistoryOperations', - 'WorkflowRunOperations', - 'WorkflowRunActionOperations', - 'WorkflowRunActionRepetitionOperations', - 'WorkflowRunActionRepetitionRequestHistoryOperations', - 'WorkflowRunActionRequestHistoryOperations', - 'WorkflowRunActionScopeRepetitionOperations', - 'WorkflowRunOperationOperations', - 'IntegrationAccountOperations', - 'IntegrationAccountAssemblyOperations', - 'IntegrationAccountBatchConfigurationOperations', - 'IntegrationAccountSchemaOperations', - 'IntegrationAccountMapOperations', - 'IntegrationAccountPartnerOperations', - 'IntegrationAccountAgreementOperations', - 'IntegrationAccountCertificateOperations', - 'IntegrationAccountSessionOperations', - 'IntegrationServiceEnvironmentOperations', - 'IntegrationServiceEnvironmentSkuOperations', - 'IntegrationServiceEnvironmentNetworkHealthOperations', - 'IntegrationServiceEnvironmentManagedApiOperations', - 'IntegrationServiceEnvironmentManagedApiOperationOperations', - 'OperationOperations', -] diff --git a/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py index 0ae4722c172..925d7ec9561 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py @@ -68,6 +68,8 @@ from ._models_py3 import ExpressionRoot from ._models_py3 import ExpressionTraces from ._models_py3 import ExtendedErrorInfo + from ._models_py3 import FlowAccessControlConfiguration + from ._models_py3 import FlowAccessControlConfigurationPolicy from ._models_py3 import FlowEndpoints from ._models_py3 import FlowEndpointsConfiguration from ._models_py3 import GenerateUpgradedDefinitionParameters @@ -93,6 +95,8 @@ from ._models_py3 import IntegrationAccountSessionFilter from ._models_py3 import IntegrationAccountSessionListResult from ._models_py3 import IntegrationAccountSku + from ._models_py3 import IntegrationServiceEnvironmenEncryptionConfiguration + from ._models_py3 import IntegrationServiceEnvironmenEncryptionKeyReference from ._models_py3 import IntegrationServiceEnvironment from ._models_py3 import IntegrationServiceEnvironmentAccessEndpoint from ._models_py3 import IntegrationServiceEnvironmentListResult @@ -107,6 +111,7 @@ from ._models_py3 import IntegrationServiceEnvironmentSkuList from ._models_py3 import IntegrationServiceEnvironmentSubnetNetworkHealth from ._models_py3 import IpAddress + from ._models_py3 import IpAddressRange from ._models_py3 import JsonSchema from ._models_py3 import KeyVaultKey from ._models_py3 import KeyVaultKeyAttributes @@ -118,6 +123,9 @@ from ._models_py3 import ManagedApi from ._models_py3 import ManagedApiListResult from ._models_py3 import NetworkConfiguration + from ._models_py3 import OpenAuthenticationAccessPolicies + from ._models_py3 import OpenAuthenticationAccessPolicy + from ._models_py3 import OpenAuthenticationPolicyClaim from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult @@ -159,6 +167,7 @@ from ._models_py3 import WorkflowListResult from ._models_py3 import WorkflowOutputParameter from ._models_py3 import WorkflowParameter + from ._models_py3 import WorkflowReference from ._models_py3 import WorkflowRun from ._models_py3 import WorkflowRunAction from ._models_py3 import WorkflowRunActionFilter @@ -178,6 +187,7 @@ from ._models_py3 import WorkflowTriggerListCallbackUrlQueries from ._models_py3 import WorkflowTriggerListResult from ._models_py3 import WorkflowTriggerRecurrence + from ._models_py3 import WorkflowTriggerReference from ._models_py3 import WorkflowVersion from ._models_py3 import WorkflowVersionListResult from ._models_py3 import WsdlService @@ -258,6 +268,8 @@ from ._models import ExpressionRoot # type: ignore from ._models import ExpressionTraces # type: ignore from ._models import ExtendedErrorInfo # type: ignore + from ._models import FlowAccessControlConfiguration # type: ignore + from ._models import FlowAccessControlConfigurationPolicy # type: ignore from ._models import FlowEndpoints # type: ignore from ._models import FlowEndpointsConfiguration # type: ignore from ._models import GenerateUpgradedDefinitionParameters # type: ignore @@ -283,6 +295,8 @@ from ._models import IntegrationAccountSessionFilter # type: ignore from ._models import IntegrationAccountSessionListResult # type: ignore from ._models import IntegrationAccountSku # type: ignore + from ._models import IntegrationServiceEnvironmenEncryptionConfiguration # type: ignore + from ._models import IntegrationServiceEnvironmenEncryptionKeyReference # type: ignore from ._models import IntegrationServiceEnvironment # type: ignore from ._models import IntegrationServiceEnvironmentAccessEndpoint # type: ignore from ._models import IntegrationServiceEnvironmentListResult # type: ignore @@ -297,6 +311,7 @@ from ._models import IntegrationServiceEnvironmentSkuList # type: ignore from ._models import IntegrationServiceEnvironmentSubnetNetworkHealth # type: ignore from ._models import IpAddress # type: ignore + from ._models import IpAddressRange # type: ignore from ._models import JsonSchema # type: ignore from ._models import KeyVaultKey # type: ignore from ._models import KeyVaultKeyAttributes # type: ignore @@ -308,6 +323,9 @@ from ._models import ManagedApi # type: ignore from ._models import ManagedApiListResult # type: ignore from ._models import NetworkConfiguration # type: ignore + from ._models import OpenAuthenticationAccessPolicies # type: ignore + from ._models import OpenAuthenticationAccessPolicy # type: ignore + from ._models import OpenAuthenticationPolicyClaim # type: ignore from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore @@ -349,6 +367,7 @@ from ._models import WorkflowListResult # type: ignore from ._models import WorkflowOutputParameter # type: ignore from ._models import WorkflowParameter # type: ignore + from ._models import WorkflowReference # type: ignore from ._models import WorkflowRun # type: ignore from ._models import WorkflowRunAction # type: ignore from ._models import WorkflowRunActionFilter # type: ignore @@ -368,6 +387,7 @@ from ._models import WorkflowTriggerListCallbackUrlQueries # type: ignore from ._models import WorkflowTriggerListResult # type: ignore from ._models import WorkflowTriggerRecurrence # type: ignore + from ._models import WorkflowTriggerReference # type: ignore from ._models import WorkflowVersion # type: ignore from ._models import WorkflowVersionListResult # type: ignore from ._models import WsdlService # type: ignore @@ -411,6 +431,7 @@ KeyType, MapType, MessageFilterType, + OpenAuthenticationProviderType, ParameterType, PartnerType, RecurrenceFrequency, @@ -496,6 +517,8 @@ 'ExpressionRoot', 'ExpressionTraces', 'ExtendedErrorInfo', + 'FlowAccessControlConfiguration', + 'FlowAccessControlConfigurationPolicy', 'FlowEndpoints', 'FlowEndpointsConfiguration', 'GenerateUpgradedDefinitionParameters', @@ -521,6 +544,8 @@ 'IntegrationAccountSessionFilter', 'IntegrationAccountSessionListResult', 'IntegrationAccountSku', + 'IntegrationServiceEnvironmenEncryptionConfiguration', + 'IntegrationServiceEnvironmenEncryptionKeyReference', 'IntegrationServiceEnvironment', 'IntegrationServiceEnvironmentAccessEndpoint', 'IntegrationServiceEnvironmentListResult', @@ -535,6 +560,7 @@ 'IntegrationServiceEnvironmentSkuList', 'IntegrationServiceEnvironmentSubnetNetworkHealth', 'IpAddress', + 'IpAddressRange', 'JsonSchema', 'KeyVaultKey', 'KeyVaultKeyAttributes', @@ -546,6 +572,9 @@ 'ManagedApi', 'ManagedApiListResult', 'NetworkConfiguration', + 'OpenAuthenticationAccessPolicies', + 'OpenAuthenticationAccessPolicy', + 'OpenAuthenticationPolicyClaim', 'Operation', 'OperationDisplay', 'OperationListResult', @@ -587,6 +616,7 @@ 'WorkflowListResult', 'WorkflowOutputParameter', 'WorkflowParameter', + 'WorkflowReference', 'WorkflowRun', 'WorkflowRunAction', 'WorkflowRunActionFilter', @@ -606,6 +636,7 @@ 'WorkflowTriggerListCallbackUrlQueries', 'WorkflowTriggerListResult', 'WorkflowTriggerRecurrence', + 'WorkflowTriggerReference', 'WorkflowVersion', 'WorkflowVersionListResult', 'WsdlService', @@ -647,6 +678,7 @@ 'KeyType', 'MapType', 'MessageFilterType', + 'OpenAuthenticationProviderType', 'ParameterType', 'PartnerType', 'RecurrenceFrequency', diff --git a/src/logic/azext_logic/vendored_sdks/logic/models/_logic_management_client_enums.py b/src/logic/azext_logic/vendored_sdks/logic/models/_logic_management_client_enums.py index df43fa81c24..6cfb83828bc 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/models/_logic_management_client_enums.py +++ b/src/logic/azext_logic/vendored_sdks/logic/models/_logic_management_client_enums.py @@ -6,483 +6,511 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum - -class WorkflowProvisioningState(str, Enum): - """The workflow provisioning state. +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AgreementType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The agreement type. """ - not_specified = "NotSpecified" - accepted = "Accepted" - running = "Running" - ready = "Ready" - creating = "Creating" - created = "Created" - deleting = "Deleting" - deleted = "Deleted" - canceled = "Canceled" - failed = "Failed" - succeeded = "Succeeded" - moving = "Moving" - updating = "Updating" - registering = "Registering" - registered = "Registered" - unregistering = "Unregistering" - unregistered = "Unregistered" - completed = "Completed" - -class WorkflowState(str, Enum): - """The workflow state. + NOT_SPECIFIED = "NotSpecified" + AS2 = "AS2" + X12 = "X12" + EDIFACT = "Edifact" + +class ApiDeploymentParameterVisibility(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Api deployment parameter visibility. """ - not_specified = "NotSpecified" - completed = "Completed" - enabled = "Enabled" - disabled = "Disabled" - deleted = "Deleted" - suspended = "Suspended" + NOT_SPECIFIED = "NotSpecified" + DEFAULT = "Default" + INTERNAL = "Internal" -class ParameterType(str, Enum): - """The parameter type. +class ApiTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Api tier. """ - not_specified = "NotSpecified" - string = "String" - secure_string = "SecureString" - int = "Int" - float = "Float" - bool = "Bool" - array = "Array" - object = "Object" - secure_object = "SecureObject" + NOT_SPECIFIED = "NotSpecified" + ENTERPRISE = "Enterprise" + STANDARD = "Standard" + PREMIUM = "Premium" -class SkuName(str, Enum): - """The sku name. - """ +class ApiType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - not_specified = "NotSpecified" - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" + NOT_SPECIFIED = "NotSpecified" + REST = "Rest" + SOAP = "Soap" -class DaysOfWeek(str, Enum): +class AzureAsyncOperationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Azure async operation state. + """ - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + PENDING = "Pending" + CANCELED = "Canceled" -class DayOfWeek(str, Enum): +class DayOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The day of the week. """ - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" -class WorkflowTriggerProvisioningState(str, Enum): - """The workflow trigger provisioning state. - """ +class DaysOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - not_specified = "NotSpecified" - accepted = "Accepted" - running = "Running" - ready = "Ready" - creating = "Creating" - created = "Created" - deleting = "Deleting" - deleted = "Deleted" - canceled = "Canceled" - failed = "Failed" - succeeded = "Succeeded" - moving = "Moving" - updating = "Updating" - registering = "Registering" - registered = "Registered" - unregistering = "Unregistering" - unregistered = "Unregistered" - completed = "Completed" - -class WorkflowStatus(str, Enum): - """The workflow status. - """ + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" - not_specified = "NotSpecified" - paused = "Paused" - running = "Running" - waiting = "Waiting" - succeeded = "Succeeded" - skipped = "Skipped" - suspended = "Suspended" - cancelled = "Cancelled" - failed = "Failed" - faulted = "Faulted" - timed_out = "TimedOut" - aborted = "Aborted" - ignored = "Ignored" - -class RecurrenceFrequency(str, Enum): - """The recurrence frequency. +class EdifactCharacterSet(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The edifact character set. """ - not_specified = "NotSpecified" - second = "Second" - minute = "Minute" - hour = "Hour" - day = "Day" - week = "Week" - month = "Month" - year = "Year" - -class IntegrationAccountSkuName(str, Enum): - """The integration account sku name. + NOT_SPECIFIED = "NotSpecified" + UNOB = "UNOB" + UNOA = "UNOA" + UNOC = "UNOC" + UNOD = "UNOD" + UNOE = "UNOE" + UNOF = "UNOF" + UNOG = "UNOG" + UNOH = "UNOH" + UNOI = "UNOI" + UNOJ = "UNOJ" + UNOK = "UNOK" + UNOX = "UNOX" + UNOY = "UNOY" + KECA = "KECA" + +class EdifactDecimalIndicator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The edifact decimal indicator. """ - not_specified = "NotSpecified" - free = "Free" - basic = "Basic" - standard = "Standard" + NOT_SPECIFIED = "NotSpecified" + COMMA = "Comma" + DECIMAL = "Decimal" -class IntegrationServiceEnvironmentAccessEndpointType(str, Enum): - """The integration service environment access endpoint type. +class EncryptionAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The encryption algorithm. """ - not_specified = "NotSpecified" - external = "External" - internal = "Internal" + NOT_SPECIFIED = "NotSpecified" + NONE = "None" + DES3 = "DES3" + RC2 = "RC2" + AES128 = "AES128" + AES192 = "AES192" + AES256 = "AES256" -class IntegrationServiceEnvironmentSkuName(str, Enum): - """The integration service environment sku name. +class ErrorResponseCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The error response code. """ - not_specified = "NotSpecified" - premium = "Premium" - developer = "Developer" + NOT_SPECIFIED = "NotSpecified" + INTEGRATION_SERVICE_ENVIRONMENT_NOT_FOUND = "IntegrationServiceEnvironmentNotFound" + INTERNAL_SERVER_ERROR = "InternalServerError" + INVALID_OPERATION_ID = "InvalidOperationId" -class EventLevel(str, Enum): +class EventLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The event level. """ - log_always = "LogAlways" - critical = "Critical" - error = "Error" - warning = "Warning" - informational = "Informational" - verbose = "Verbose" + LOG_ALWAYS = "LogAlways" + CRITICAL = "Critical" + ERROR = "Error" + WARNING = "Warning" + INFORMATIONAL = "Informational" + VERBOSE = "Verbose" -class TrackingRecordType(str, Enum): - """The tracking record type. +class HashingAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The signing or hashing algorithm. """ - not_specified = "NotSpecified" - custom = "Custom" - as2_message = "AS2Message" - as2_mdn = "AS2MDN" - x12_interchange = "X12Interchange" - x12_functional_group = "X12FunctionalGroup" - x12_transaction_set = "X12TransactionSet" - x12_interchange_acknowledgment = "X12InterchangeAcknowledgment" - x12_functional_group_acknowledgment = "X12FunctionalGroupAcknowledgment" - x12_transaction_set_acknowledgment = "X12TransactionSetAcknowledgment" - edifact_interchange = "EdifactInterchange" - edifact_functional_group = "EdifactFunctionalGroup" - edifact_transaction_set = "EdifactTransactionSet" - edifact_interchange_acknowledgment = "EdifactInterchangeAcknowledgment" - edifact_functional_group_acknowledgment = "EdifactFunctionalGroupAcknowledgment" - edifact_transaction_set_acknowledgment = "EdifactTransactionSetAcknowledgment" - -class SchemaType(str, Enum): - """The schema type. + NOT_SPECIFIED = "NotSpecified" + NONE = "None" + MD5 = "MD5" + SHA1 = "SHA1" + SHA2256 = "SHA2256" + SHA2384 = "SHA2384" + SHA2512 = "SHA2512" + +class IntegrationAccountSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The integration account sku name. """ - not_specified = "NotSpecified" - xml = "Xml" + NOT_SPECIFIED = "NotSpecified" + FREE = "Free" + BASIC = "Basic" + STANDARD = "Standard" -class MapType(str, Enum): - """The map type. +class IntegrationServiceEnvironmentAccessEndpointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment access endpoint type. """ - not_specified = "NotSpecified" - xslt = "Xslt" - xslt20 = "Xslt20" - xslt30 = "Xslt30" - liquid = "Liquid" + NOT_SPECIFIED = "NotSpecified" + EXTERNAL = "External" + INTERNAL = "Internal" -class PartnerType(str, Enum): - """The partner type. +class IntegrationServiceEnvironmentNetworkDependencyCategoryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment network dependency category type. """ - not_specified = "NotSpecified" - b2_b = "B2B" - -class X12DateFormat(str, Enum): - """The x12 date format. + NOT_SPECIFIED = "NotSpecified" + AZURE_STORAGE = "AzureStorage" + AZURE_MANAGEMENT = "AzureManagement" + AZURE_ACTIVE_DIRECTORY = "AzureActiveDirectory" + SSL_CERTIFICATE_VERIFICATION = "SSLCertificateVerification" + DIAGNOSTIC_LOGS_AND_METRICS = "DiagnosticLogsAndMetrics" + INTEGRATION_SERVICE_ENVIRONMENT_CONNECTORS = "IntegrationServiceEnvironmentConnectors" + REDIS_CACHE = "RedisCache" + ACCESS_ENDPOINTS = "AccessEndpoints" + RECOVERY_SERVICE = "RecoveryService" + SQL = "SQL" + REGIONAL_SERVICE = "RegionalService" + +class IntegrationServiceEnvironmentNetworkDependencyHealthState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment network dependency health state. """ - not_specified = "NotSpecified" - ccyymmdd = "CCYYMMDD" - yymmdd = "YYMMDD" + NOT_SPECIFIED = "NotSpecified" + HEALTHY = "Healthy" + UNHEALTHY = "Unhealthy" + UNKNOWN = "Unknown" -class X12TimeFormat(str, Enum): - """The x12 time format. +class IntegrationServiceEnvironmentNetworkEndPointAccessibilityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment network endpoint accessibility state. """ - not_specified = "NotSpecified" - hhmm = "HHMM" - hhmmss = "HHMMSS" - hhmms_sdd = "HHMMSSdd" - hhmms_sd = "HHMMSSd" + NOT_SPECIFIED = "NotSpecified" + UNKNOWN = "Unknown" + AVAILABLE = "Available" + NOT_AVAILABLE = "NotAvailable" -class TrailingSeparatorPolicy(str, Enum): - """The trailing separator policy. +class IntegrationServiceEnvironmentSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment sku name. """ - not_specified = "NotSpecified" - not_allowed = "NotAllowed" - optional = "Optional" - mandatory = "Mandatory" + NOT_SPECIFIED = "NotSpecified" + PREMIUM = "Premium" + DEVELOPER = "Developer" -class SegmentTerminatorSuffix(str, Enum): - """The segment terminator suffix. +class IntegrationServiceEnvironmentSkuScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment sku scale type. """ - not_specified = "NotSpecified" - none = "None" - cr = "CR" - lf = "LF" - crlf = "CRLF" + MANUAL = "Manual" + AUTOMATIC = "Automatic" + NONE = "None" -class EdifactDecimalIndicator(str, Enum): - """The edifact decimal indicator. +class KeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The key type. """ - not_specified = "NotSpecified" - comma = "Comma" - decimal = "Decimal" + NOT_SPECIFIED = "NotSpecified" + PRIMARY = "Primary" + SECONDARY = "Secondary" -class AgreementType(str, Enum): - """The agreement type. +class MapType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The map type. """ - not_specified = "NotSpecified" - as2 = "AS2" - x12 = "X12" - edifact = "Edifact" + NOT_SPECIFIED = "NotSpecified" + XSLT = "Xslt" + XSLT20 = "Xslt20" + XSLT30 = "Xslt30" + LIQUID = "Liquid" -class HashingAlgorithm(str, Enum): - """The signing or hashing algorithm. +class MessageFilterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The message filter type. """ - not_specified = "NotSpecified" - none = "None" - md5 = "MD5" - sha1 = "SHA1" - sha2256 = "SHA2256" - sha2384 = "SHA2384" - sha2512 = "SHA2512" + NOT_SPECIFIED = "NotSpecified" + INCLUDE = "Include" + EXCLUDE = "Exclude" -class EncryptionAlgorithm(str, Enum): - """The encryption algorithm. +class OpenAuthenticationProviderType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Open authentication policy provider type. """ - not_specified = "NotSpecified" - none = "None" - des3 = "DES3" - rc2 = "RC2" - aes128 = "AES128" - aes192 = "AES192" - aes256 = "AES256" + AAD = "AAD" -class SigningAlgorithm(str, Enum): - """The signing or hashing algorithm. +class ParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The parameter type. """ - not_specified = "NotSpecified" - default = "Default" - sha1 = "SHA1" - sha2256 = "SHA2256" - sha2384 = "SHA2384" - sha2512 = "SHA2512" + NOT_SPECIFIED = "NotSpecified" + STRING = "String" + SECURE_STRING = "SecureString" + INT = "Int" + FLOAT = "Float" + BOOL = "Bool" + ARRAY = "Array" + OBJECT = "Object" + SECURE_OBJECT = "SecureObject" -class X12CharacterSet(str, Enum): - """The X12 character set. +class PartnerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The partner type. """ - not_specified = "NotSpecified" - basic = "Basic" - extended = "Extended" - utf8 = "UTF8" + NOT_SPECIFIED = "NotSpecified" + B2_B = "B2B" -class UsageIndicator(str, Enum): - """The usage indicator. +class RecurrenceFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The recurrence frequency. """ - not_specified = "NotSpecified" - test = "Test" - information = "Information" - production = "Production" + NOT_SPECIFIED = "NotSpecified" + SECOND = "Second" + MINUTE = "Minute" + HOUR = "Hour" + DAY = "Day" + WEEK = "Week" + MONTH = "Month" + YEAR = "Year" -class MessageFilterType(str, Enum): - """The message filter type. +class SchemaType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The schema type. """ - not_specified = "NotSpecified" - include = "Include" - exclude = "Exclude" + NOT_SPECIFIED = "NotSpecified" + XML = "Xml" -class EdifactCharacterSet(str, Enum): - """The edifact character set. +class SegmentTerminatorSuffix(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The segment terminator suffix. """ - not_specified = "NotSpecified" - unob = "UNOB" - unoa = "UNOA" - unoc = "UNOC" - unod = "UNOD" - unoe = "UNOE" - unof = "UNOF" - unog = "UNOG" - unoh = "UNOH" - unoi = "UNOI" - unoj = "UNOJ" - unok = "UNOK" - unox = "UNOX" - unoy = "UNOY" - keca = "KECA" - -class IntegrationServiceEnvironmentSkuScaleType(str, Enum): - """The integration service environment sku scale type. + NOT_SPECIFIED = "NotSpecified" + NONE = "None" + CR = "CR" + LF = "LF" + CRLF = "CRLF" + +class SigningAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The signing or hashing algorithm. """ - manual = "Manual" - automatic = "Automatic" - none = "None" + NOT_SPECIFIED = "NotSpecified" + DEFAULT = "Default" + SHA1 = "SHA1" + SHA2256 = "SHA2256" + SHA2384 = "SHA2384" + SHA2512 = "SHA2512" -class IntegrationServiceEnvironmentNetworkEndPointAccessibilityState(str, Enum): - """The integration service environment network endpoint accessibility state. +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The sku name. """ - not_specified = "NotSpecified" - unknown = "Unknown" - available = "Available" - not_available = "NotAvailable" + NOT_SPECIFIED = "NotSpecified" + FREE = "Free" + SHARED = "Shared" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" -class IntegrationServiceEnvironmentNetworkDependencyCategoryType(str, Enum): - """The integration service environment network dependency category type. +class StatusAnnotation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status annotation. """ - not_specified = "NotSpecified" - azure_storage = "AzureStorage" - azure_management = "AzureManagement" - azure_active_directory = "AzureActiveDirectory" - ssl_certificate_verification = "SSLCertificateVerification" - diagnostic_logs_and_metrics = "DiagnosticLogsAndMetrics" - integration_service_environment_connectors = "IntegrationServiceEnvironmentConnectors" - redis_cache = "RedisCache" - access_endpoints = "AccessEndpoints" - recovery_service = "RecoveryService" - sql = "SQL" - regional_service = "RegionalService" - -class ErrorResponseCode(str, Enum): - """The error response code. + NOT_SPECIFIED = "NotSpecified" + PREVIEW = "Preview" + PRODUCTION = "Production" + +class SwaggerSchemaType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The swagger schema type. """ - not_specified = "NotSpecified" - integration_service_environment_not_found = "IntegrationServiceEnvironmentNotFound" - internal_server_error = "InternalServerError" - invalid_operation_id = "InvalidOperationId" + STRING = "String" + NUMBER = "Number" + INTEGER = "Integer" + BOOLEAN = "Boolean" + ARRAY = "Array" + FILE = "File" + OBJECT = "Object" + NULL = "Null" + +class TrackEventsOperationOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The track events operation options. + """ -class ApiType(str, Enum): + NONE = "None" + DISABLE_SOURCE_INFO_ENRICH = "DisableSourceInfoEnrich" - not_specified = "NotSpecified" - rest = "Rest" - soap = "Soap" +class TrackingRecordType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The tracking record type. + """ -class WsdlImportMethod(str, Enum): - """The WSDL import method. + NOT_SPECIFIED = "NotSpecified" + CUSTOM = "Custom" + AS2_MESSAGE = "AS2Message" + AS2_MDN = "AS2MDN" + X12_INTERCHANGE = "X12Interchange" + X12_FUNCTIONAL_GROUP = "X12FunctionalGroup" + X12_TRANSACTION_SET = "X12TransactionSet" + X12_INTERCHANGE_ACKNOWLEDGMENT = "X12InterchangeAcknowledgment" + X12_FUNCTIONAL_GROUP_ACKNOWLEDGMENT = "X12FunctionalGroupAcknowledgment" + X12_TRANSACTION_SET_ACKNOWLEDGMENT = "X12TransactionSetAcknowledgment" + EDIFACT_INTERCHANGE = "EdifactInterchange" + EDIFACT_FUNCTIONAL_GROUP = "EdifactFunctionalGroup" + EDIFACT_TRANSACTION_SET = "EdifactTransactionSet" + EDIFACT_INTERCHANGE_ACKNOWLEDGMENT = "EdifactInterchangeAcknowledgment" + EDIFACT_FUNCTIONAL_GROUP_ACKNOWLEDGMENT = "EdifactFunctionalGroupAcknowledgment" + EDIFACT_TRANSACTION_SET_ACKNOWLEDGMENT = "EdifactTransactionSetAcknowledgment" + +class TrailingSeparatorPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The trailing separator policy. """ - not_specified = "NotSpecified" - soap_to_rest = "SoapToRest" - soap_pass_through = "SoapPassThrough" + NOT_SPECIFIED = "NotSpecified" + NOT_ALLOWED = "NotAllowed" + OPTIONAL = "Optional" + MANDATORY = "Mandatory" -class ApiDeploymentParameterVisibility(str, Enum): - """The Api deployment parameter visibility. +class UsageIndicator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The usage indicator. """ - not_specified = "NotSpecified" - default = "Default" - internal = "Internal" + NOT_SPECIFIED = "NotSpecified" + TEST = "Test" + INFORMATION = "Information" + PRODUCTION = "Production" -class ApiTier(str, Enum): - """The Api tier. +class WorkflowProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The workflow provisioning state. """ - not_specified = "NotSpecified" - enterprise = "Enterprise" - standard = "Standard" - premium = "Premium" - -class SwaggerSchemaType(str, Enum): - """The swagger schema type. + NOT_SPECIFIED = "NotSpecified" + ACCEPTED = "Accepted" + RUNNING = "Running" + READY = "Ready" + CREATING = "Creating" + CREATED = "Created" + DELETING = "Deleting" + DELETED = "Deleted" + CANCELED = "Canceled" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + MOVING = "Moving" + UPDATING = "Updating" + REGISTERING = "Registering" + REGISTERED = "Registered" + UNREGISTERING = "Unregistering" + UNREGISTERED = "Unregistered" + COMPLETED = "Completed" + RENEWING = "Renewing" + PENDING = "Pending" + WAITING = "Waiting" + IN_PROGRESS = "InProgress" + +class WorkflowState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The workflow state. """ - string = "String" - number = "Number" - integer = "Integer" - boolean = "Boolean" - array = "Array" - file = "File" - object = "Object" - null = "Null" + NOT_SPECIFIED = "NotSpecified" + COMPLETED = "Completed" + ENABLED = "Enabled" + DISABLED = "Disabled" + DELETED = "Deleted" + SUSPENDED = "Suspended" -class StatusAnnotation(str, Enum): - """The status annotation. +class WorkflowStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The workflow status. """ - not_specified = "NotSpecified" - preview = "Preview" - production = "Production" + NOT_SPECIFIED = "NotSpecified" + PAUSED = "Paused" + RUNNING = "Running" + WAITING = "Waiting" + SUCCEEDED = "Succeeded" + SKIPPED = "Skipped" + SUSPENDED = "Suspended" + CANCELLED = "Cancelled" + FAILED = "Failed" + FAULTED = "Faulted" + TIMED_OUT = "TimedOut" + ABORTED = "Aborted" + IGNORED = "Ignored" + +class WorkflowTriggerProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The workflow trigger provisioning state. + """ -class KeyType(str, Enum): - """The key type. + NOT_SPECIFIED = "NotSpecified" + ACCEPTED = "Accepted" + RUNNING = "Running" + READY = "Ready" + CREATING = "Creating" + CREATED = "Created" + DELETING = "Deleting" + DELETED = "Deleted" + CANCELED = "Canceled" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + MOVING = "Moving" + UPDATING = "Updating" + REGISTERING = "Registering" + REGISTERED = "Registered" + UNREGISTERING = "Unregistering" + UNREGISTERED = "Unregistered" + COMPLETED = "Completed" + +class WsdlImportMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The WSDL import method. """ - not_specified = "NotSpecified" - primary = "Primary" - secondary = "Secondary" + NOT_SPECIFIED = "NotSpecified" + SOAP_TO_REST = "SoapToRest" + SOAP_PASS_THROUGH = "SoapPassThrough" -class TrackEventsOperationOptions(str, Enum): - """The track events operation options. +class X12CharacterSet(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The X12 character set. """ - none = "None" - disable_source_info_enrich = "DisableSourceInfoEnrich" + NOT_SPECIFIED = "NotSpecified" + BASIC = "Basic" + EXTENDED = "Extended" + UTF8 = "UTF8" -class IntegrationServiceEnvironmentNetworkDependencyHealthState(str, Enum): - """The integration service environment network dependency health state. +class X12DateFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The x12 date format. """ - not_specified = "NotSpecified" - healthy = "Healthy" - unhealthy = "Unhealthy" - unknown = "Unknown" + NOT_SPECIFIED = "NotSpecified" + CCYYMMDD = "CCYYMMDD" + YYMMDD = "YYMMDD" -class AzureAsyncOperationState(str, Enum): - """The Azure async operation state. +class X12TimeFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The x12 time format. """ - failed = "Failed" - succeeded = "Succeeded" - pending = "Pending" - canceled = "Canceled" + NOT_SPECIFIED = "NotSpecified" + HHMM = "HHMM" + HHMMSS = "HHMMSS" + HHMMS_SDD = "HHMMSSdd" + HHMMS_SD = "HHMMSSd" diff --git a/src/logic/azext_logic/vendored_sdks/logic/models/_models.py b/src/logic/azext_logic/vendored_sdks/logic/models/_models.py index baf7e711522..c6cc1178064 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/models/_models.py +++ b/src/logic/azext_logic/vendored_sdks/logic/models/_models.py @@ -14,11 +14,11 @@ class AgreementContent(msrest.serialization.Model): """The integration account agreement content. :param a_s2: The AS2 agreement content. - :type a_s2: ~azure.mgmt.logic.models.As2AgreementContent + :type a_s2: ~logic_management_client.models.As2AgreementContent :param x12: The X12 agreement content. - :type x12: ~azure.mgmt.logic.models.X12AgreementContent + :type x12: ~logic_management_client.models.X12AgreementContent :param edifact: The EDIFACT agreement content. - :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent + :type edifact: ~logic_management_client.models.EdifactAgreementContent """ _attribute_map = { @@ -50,7 +50,7 @@ class ApiDeploymentParameterMetadata(msrest.serialization.Model): :type description: str :param visibility: The visibility. Possible values include: "NotSpecified", "Default", "Internal". - :type visibility: str or ~azure.mgmt.logic.models.ApiDeploymentParameterVisibility + :type visibility: str or ~logic_management_client.models.ApiDeploymentParameterVisibility """ _attribute_map = { @@ -77,9 +77,10 @@ class ApiDeploymentParameterMetadataSet(msrest.serialization.Model): """The API deployment parameters metadata. :param package_content_link: The package content link parameter. - :type package_content_link: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata + :type package_content_link: ~logic_management_client.models.ApiDeploymentParameterMetadata :param redis_cache_connection_string: The package content link parameter. - :type redis_cache_connection_string: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata + :type redis_cache_connection_string: + ~logic_management_client.models.ApiDeploymentParameterMetadata """ _attribute_map = { @@ -155,7 +156,7 @@ class ApiOperation(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: The api operations properties. - :type properties: ~azure.mgmt.logic.models.ApiOperationPropertiesDefinition + :type properties: ~logic_management_client.models.ApiOperationPropertiesDefinition """ _validation = { @@ -186,7 +187,7 @@ class ApiOperationAnnotation(msrest.serialization.Model): :param status: The status annotation. Possible values include: "NotSpecified", "Preview", "Production". - :type status: str or ~azure.mgmt.logic.models.StatusAnnotation + :type status: str or ~logic_management_client.models.StatusAnnotation :param family: The family. :type family: str :param revision: The revision. @@ -213,7 +214,7 @@ class ApiOperationListResult(msrest.serialization.Model): """The list of managed API operations. :param value: The api operation definitions for an API. - :type value: list[~azure.mgmt.logic.models.ApiOperation] + :type value: list[~logic_management_client.models.ApiOperation] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -248,13 +249,13 @@ class ApiOperationPropertiesDefinition(msrest.serialization.Model): :param pageable: Indicates whether the api operation is pageable. :type pageable: bool :param annotation: The annotation of api operation. - :type annotation: ~azure.mgmt.logic.models.ApiOperationAnnotation + :type annotation: ~logic_management_client.models.ApiOperationAnnotation :param api: The api reference. - :type api: ~azure.mgmt.logic.models.ApiReference + :type api: ~logic_management_client.models.ApiReference :param inputs_definition: The operation inputs definition schema. - :type inputs_definition: ~azure.mgmt.logic.models.SwaggerSchema + :type inputs_definition: ~logic_management_client.models.SwaggerSchema :param responses_definition: The operation responses definition schemas. - :type responses_definition: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] + :type responses_definition: dict[str, ~logic_management_client.models.SwaggerSchema] :param is_webhook: Indicates whether the API operation is webhook or not. :type is_webhook: bool :param is_notification: Indicates whether the API operation is notification or not. @@ -352,9 +353,9 @@ class ApiReference(ResourceReference): :type brand_color: str :param category: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", "Premium". - :type category: str or ~azure.mgmt.logic.models.ApiTier + :type category: str or ~logic_management_client.models.ApiTier :param integration_service_environment: The integration service environment reference. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :type integration_service_environment: ~logic_management_client.models.ResourceReference """ _validation = { @@ -446,7 +447,7 @@ class ApiResourceGeneralInformation(msrest.serialization.Model): :type release_tag: str :param tier: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", "Premium". - :type tier: str or ~azure.mgmt.logic.models.ApiTier + :type tier: str or ~logic_management_client.models.ApiTier """ _attribute_map = { @@ -483,21 +484,21 @@ class ApiResourceMetadata(msrest.serialization.Model): :param tags: A set of tags. The tags. :type tags: dict[str, str] :param api_type: The api type. Possible values include: "NotSpecified", "Rest", "Soap". - :type api_type: str or ~azure.mgmt.logic.models.ApiType + :type api_type: str or ~logic_management_client.models.ApiType :param wsdl_service: The WSDL service. - :type wsdl_service: ~azure.mgmt.logic.models.WsdlService + :type wsdl_service: ~logic_management_client.models.WsdlService :param wsdl_import_method: The WSDL import method. Possible values include: "NotSpecified", "SoapToRest", "SoapPassThrough". - :type wsdl_import_method: str or ~azure.mgmt.logic.models.WsdlImportMethod + :type wsdl_import_method: str or ~logic_management_client.models.WsdlImportMethod :param connection_type: The connection type. :type connection_type: str :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :param deployment_parameters: The connector deployment parameters metadata. - :type deployment_parameters: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadataSet + :type deployment_parameters: ~logic_management_client.models.ApiDeploymentParameterMetadataSet """ _attribute_map = { @@ -561,31 +562,31 @@ class ApiResourceProperties(msrest.serialization.Model): :param connection_parameters: The connection parameters. :type connection_parameters: dict[str, object] :param metadata: The metadata. - :type metadata: ~azure.mgmt.logic.models.ApiResourceMetadata + :type metadata: ~logic_management_client.models.ApiResourceMetadata :param runtime_urls: The runtime urls. :type runtime_urls: list[str] :param general_information: The api general information. - :type general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation + :type general_information: ~logic_management_client.models.ApiResourceGeneralInformation :param capabilities: The capabilities. :type capabilities: list[str] :param backend_service: The backend service. - :type backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService + :type backend_service: ~logic_management_client.models.ApiResourceBackendService :param policies: The policies for the API. - :type policies: ~azure.mgmt.logic.models.ApiResourcePolicies + :type policies: ~logic_management_client.models.ApiResourcePolicies :param api_definition_url: The API definition. :type api_definition_url: str :param api_definitions: The api definitions. - :type api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions + :type api_definitions: ~logic_management_client.models.ApiResourceDefinitions :param integration_service_environment: The integration service environment reference. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :type integration_service_environment: ~logic_management_client.models.ResourceReference :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :param category: The category. Possible values include: "NotSpecified", "Enterprise", "Standard", "Premium". - :type category: str or ~azure.mgmt.logic.models.ApiTier + :type category: str or ~logic_management_client.models.ApiTier """ _attribute_map = { @@ -665,7 +666,7 @@ class ArtifactContentPropertiesDefinition(ArtifactProperties): :param content_type: The content type. :type content_type: str :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink + :type content_link: ~logic_management_client.models.ContentLink """ _attribute_map = { @@ -735,9 +736,9 @@ class As2AgreementContent(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param receive_agreement: Required. The AS2 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.As2OneWayAgreement + :type receive_agreement: ~logic_management_client.models.As2OneWayAgreement :param send_agreement: Required. The AS2 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.As2OneWayAgreement + :type send_agreement: ~logic_management_client.models.As2OneWayAgreement """ _validation = { @@ -865,7 +866,7 @@ class As2MdnSettings(msrest.serialization.Model): :type send_inbound_mdn_to_message_box: bool :param mic_hashing_algorithm: Required. The signing or hashing algorithm. Possible values include: "NotSpecified", "None", "MD5", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :type mic_hashing_algorithm: str or ~azure.mgmt.logic.models.HashingAlgorithm + :type mic_hashing_algorithm: str or ~logic_management_client.models.HashingAlgorithm """ _validation = { @@ -954,11 +955,11 @@ class As2OneWayAgreement(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type sender_business_identity: ~logic_management_client.models.BusinessIdentity :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type receiver_business_identity: ~logic_management_client.models.BusinessIdentity :param protocol_settings: Required. The AS2 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.As2ProtocolSettings + :type protocol_settings: ~logic_management_client.models.As2ProtocolSettings """ _validation = { @@ -989,20 +990,20 @@ class As2ProtocolSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param message_connection_settings: Required. The message connection settings. - :type message_connection_settings: ~azure.mgmt.logic.models.As2MessageConnectionSettings + :type message_connection_settings: ~logic_management_client.models.As2MessageConnectionSettings :param acknowledgement_connection_settings: Required. The acknowledgement connection settings. :type acknowledgement_connection_settings: - ~azure.mgmt.logic.models.As2AcknowledgementConnectionSettings + ~logic_management_client.models.As2AcknowledgementConnectionSettings :param mdn_settings: Required. The MDN settings. - :type mdn_settings: ~azure.mgmt.logic.models.As2MdnSettings + :type mdn_settings: ~logic_management_client.models.As2MdnSettings :param security_settings: Required. The security settings. - :type security_settings: ~azure.mgmt.logic.models.As2SecuritySettings + :type security_settings: ~logic_management_client.models.As2SecuritySettings :param validation_settings: Required. The validation settings. - :type validation_settings: ~azure.mgmt.logic.models.As2ValidationSettings + :type validation_settings: ~logic_management_client.models.As2ValidationSettings :param envelope_settings: Required. The envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.As2EnvelopeSettings + :type envelope_settings: ~logic_management_client.models.As2EnvelopeSettings :param error_settings: Required. The error settings. - :type error_settings: ~azure.mgmt.logic.models.As2ErrorSettings + :type error_settings: ~logic_management_client.models.As2ErrorSettings """ _validation = { @@ -1143,10 +1144,10 @@ class As2ValidationSettings(msrest.serialization.Model): :type check_certificate_revocation_list_on_receive: bool :param encryption_algorithm: Required. The encryption algorithm. Possible values include: "NotSpecified", "None", "DES3", "RC2", "AES128", "AES192", "AES256". - :type encryption_algorithm: str or ~azure.mgmt.logic.models.EncryptionAlgorithm + :type encryption_algorithm: str or ~logic_management_client.models.EncryptionAlgorithm :param signing_algorithm: The signing algorithm. Possible values include: "NotSpecified", "Default", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm + :type signing_algorithm: str or ~logic_management_client.models.SigningAlgorithm """ _validation = { @@ -1195,7 +1196,7 @@ class AssemblyCollection(msrest.serialization.Model): """A collection of assembly definitions. :param value: - :type value: list[~azure.mgmt.logic.models.AssemblyDefinition] + :type value: list[~logic_management_client.models.AssemblyDefinition] """ _attribute_map = { @@ -1228,7 +1229,7 @@ class AssemblyDefinition(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: Required. The assembly properties. - :type properties: ~azure.mgmt.logic.models.AssemblyProperties + :type properties: ~logic_management_client.models.AssemblyProperties """ _validation = { @@ -1271,7 +1272,7 @@ class AssemblyProperties(ArtifactContentPropertiesDefinition): :param content_type: The content type. :type content_type: str :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink + :type content_link: ~logic_management_client.models.ContentLink :param assembly_name: Required. The assembly name. :type assembly_name: str :param assembly_version: The assembly version. @@ -1345,7 +1346,7 @@ class AzureResourceErrorInfo(ErrorInfo): :param message: Required. The error message. :type message: str :param details: The error details. - :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + :type details: list[~logic_management_client.models.AzureResourceErrorInfo] """ _validation = { @@ -1372,7 +1373,7 @@ class B2BPartnerContent(msrest.serialization.Model): """The B2B partner content. :param business_identities: The list of partner business identities. - :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] + :type business_identities: list[~logic_management_client.models.BusinessIdentity] """ _attribute_map = { @@ -1405,7 +1406,7 @@ class BatchConfiguration(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: Required. The batch configuration properties. - :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + :type properties: ~logic_management_client.models.BatchConfigurationProperties """ _validation = { @@ -1436,7 +1437,7 @@ class BatchConfigurationCollection(msrest.serialization.Model): """A collection of batch configurations. :param value: - :type value: list[~azure.mgmt.logic.models.BatchConfiguration] + :type value: list[~logic_management_client.models.BatchConfiguration] """ _attribute_map = { @@ -1456,16 +1457,16 @@ class BatchConfigurationProperties(ArtifactProperties): All required parameters must be populated in order to send to Azure. + :param created_time: The artifact creation time. + :type created_time: ~datetime.datetime + :param changed_time: The artifact changed time. + :type changed_time: ~datetime.datetime :param metadata: Any object. :type metadata: object :param batch_group_name: Required. The name of the batch group. :type batch_group_name: str :param release_criteria: Required. The batch release criteria. - :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria - :param created_time: The created time. - :type created_time: ~datetime.datetime - :param changed_time: The changed time. - :type changed_time: ~datetime.datetime + :type release_criteria: ~logic_management_client.models.BatchReleaseCriteria """ _validation = { @@ -1474,11 +1475,11 @@ class BatchConfigurationProperties(ArtifactProperties): } _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, 'metadata': {'key': 'metadata', 'type': 'object'}, 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, } def __init__( @@ -1488,8 +1489,6 @@ def __init__( super(BatchConfigurationProperties, self).__init__(**kwargs) self.batch_group_name = kwargs['batch_group_name'] self.release_criteria = kwargs['release_criteria'] - self.created_time = kwargs.get('created_time', None) - self.changed_time = kwargs.get('changed_time', None) class BatchReleaseCriteria(msrest.serialization.Model): @@ -1500,7 +1499,7 @@ class BatchReleaseCriteria(msrest.serialization.Model): :param batch_size: The batch size in bytes. :type batch_size: int :param recurrence: The recurrence. - :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + :type recurrence: ~logic_management_client.models.WorkflowTriggerRecurrence """ _attribute_map = { @@ -1601,7 +1600,7 @@ class ContentLink(msrest.serialization.Model): :param content_size: The content size. :type content_size: long :param content_hash: The content hash. - :type content_hash: ~azure.mgmt.logic.models.ContentHash + :type content_hash: ~logic_management_client.models.ContentHash :param metadata: The metadata. :type metadata: object """ @@ -1733,9 +1732,9 @@ class EdifactAgreementContent(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param receive_agreement: Required. The EDIFACT one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :type receive_agreement: ~logic_management_client.models.EdifactOneWayAgreement :param send_agreement: Required. The EDIFACT one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :type send_agreement: ~logic_management_client.models.EdifactOneWayAgreement """ _validation = { @@ -1778,10 +1777,10 @@ class EdifactDelimiterOverride(msrest.serialization.Model): :type repetition_separator: int :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :type segment_terminator_suffix: str or ~logic_management_client.models.SegmentTerminatorSuffix :param decimal_point_indicator: Required. The decimal point indicator. Possible values include: "NotSpecified", "Comma", "Decimal". - :type decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator + :type decimal_point_indicator: str or ~logic_management_client.models.EdifactDecimalIndicator :param release_indicator: Required. The release indicator. :type release_indicator: int :param message_association_assigned_code: The message association assigned code. @@ -2146,13 +2145,13 @@ class EdifactFramingSettings(msrest.serialization.Model): :param character_set: Required. The EDIFACT frame setting characterSet. Possible values include: "NotSpecified", "UNOB", "UNOA", "UNOC", "UNOD", "UNOE", "UNOF", "UNOG", "UNOH", "UNOI", "UNOJ", "UNOK", "UNOX", "UNOY", "KECA". - :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :type character_set: str or ~logic_management_client.models.EdifactCharacterSet :param decimal_point_indicator: Required. The EDIFACT frame setting decimal indicator. Possible values include: "NotSpecified", "Comma", "Decimal". - :type decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator + :type decimal_point_indicator: str or ~logic_management_client.models.EdifactDecimalIndicator :param segment_terminator_suffix: Required. The EDIFACT frame setting segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :type segment_terminator_suffix: str or ~logic_management_client.models.SegmentTerminatorSuffix """ _validation = { @@ -2206,7 +2205,7 @@ class EdifactMessageFilter(msrest.serialization.Model): :param message_filter_type: Required. The message filter type. Possible values include: "NotSpecified", "Include", "Exclude". - :type message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType + :type message_filter_type: str or ~logic_management_client.models.MessageFilterType """ _validation = { @@ -2256,11 +2255,11 @@ class EdifactOneWayAgreement(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type sender_business_identity: ~logic_management_client.models.BusinessIdentity :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type receiver_business_identity: ~logic_management_client.models.BusinessIdentity :param protocol_settings: Required. The EDIFACT protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings + :type protocol_settings: ~logic_management_client.models.EdifactProtocolSettings """ _validation = { @@ -2339,27 +2338,28 @@ class EdifactProtocolSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param validation_settings: Required. The EDIFACT validation settings. - :type validation_settings: ~azure.mgmt.logic.models.EdifactValidationSettings + :type validation_settings: ~logic_management_client.models.EdifactValidationSettings :param framing_settings: Required. The EDIFACT framing settings. - :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :type framing_settings: ~logic_management_client.models.EdifactFramingSettings :param envelope_settings: Required. The EDIFACT envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :type envelope_settings: ~logic_management_client.models.EdifactEnvelopeSettings :param acknowledgement_settings: Required. The EDIFACT acknowledgement settings. - :type acknowledgement_settings: ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :type acknowledgement_settings: ~logic_management_client.models.EdifactAcknowledgementSettings :param message_filter: Required. The EDIFACT message filter. - :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :type message_filter: ~logic_management_client.models.EdifactMessageFilter :param processing_settings: Required. The EDIFACT processing Settings. - :type processing_settings: ~azure.mgmt.logic.models.EdifactProcessingSettings + :type processing_settings: ~logic_management_client.models.EdifactProcessingSettings :param envelope_overrides: The EDIFACT envelope override settings. - :type envelope_overrides: list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] + :type envelope_overrides: list[~logic_management_client.models.EdifactEnvelopeOverride] :param message_filter_list: The EDIFACT message filter list. - :type message_filter_list: list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :type message_filter_list: list[~logic_management_client.models.EdifactMessageIdentifier] :param schema_references: Required. The EDIFACT schema references. - :type schema_references: list[~azure.mgmt.logic.models.EdifactSchemaReference] + :type schema_references: list[~logic_management_client.models.EdifactSchemaReference] :param validation_overrides: The EDIFACT validation override settings. - :type validation_overrides: list[~azure.mgmt.logic.models.EdifactValidationOverride] + :type validation_overrides: list[~logic_management_client.models.EdifactValidationOverride] :param edifact_delimiter_overrides: The EDIFACT delimiter override settings. - :type edifact_delimiter_overrides: list[~azure.mgmt.logic.models.EdifactDelimiterOverride] + :type edifact_delimiter_overrides: + list[~logic_management_client.models.EdifactDelimiterOverride] """ _validation = { @@ -2474,7 +2474,7 @@ class EdifactValidationOverride(msrest.serialization.Model): :type allow_leading_and_trailing_spaces_and_zeroes: bool :param trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :type trailing_separator_policy: str or ~logic_management_client.models.TrailingSeparatorPolicy :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool @@ -2548,7 +2548,7 @@ class EdifactValidationSettings(msrest.serialization.Model): :type trim_leading_and_trailing_spaces_and_zeroes: bool :param trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :type trailing_separator_policy: str or ~logic_management_client.models.TrailingSeparatorPolicy """ _validation = { @@ -2621,7 +2621,7 @@ class ErrorResponse(msrest.serialization.Model): """Error response indicates Logic service is not able to process the incoming request. The error property contains the error details. :param error: The error properties. - :type error: ~azure.mgmt.logic.models.ErrorProperties + :type error: ~logic_management_client.models.ErrorProperties """ _attribute_map = { @@ -2644,9 +2644,9 @@ class Expression(msrest.serialization.Model): :param value: Any object. :type value: object :param subexpressions: The sub expressions. - :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :type subexpressions: list[~logic_management_client.models.Expression] :param error: The azure resource error info. - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :type error: ~logic_management_client.models.AzureResourceErrorInfo """ _attribute_map = { @@ -2675,9 +2675,9 @@ class ExpressionRoot(Expression): :param value: Any object. :type value: object :param subexpressions: The sub expressions. - :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :type subexpressions: list[~logic_management_client.models.Expression] :param error: The azure resource error info. - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :type error: ~logic_management_client.models.AzureResourceErrorInfo :param path: The path. :type path: str """ @@ -2702,7 +2702,7 @@ class ExpressionTraces(msrest.serialization.Model): """The expression traces. :param inputs: - :type inputs: list[~azure.mgmt.logic.models.ExpressionRoot] + :type inputs: list[~logic_management_client.models.ExpressionRoot] """ _attribute_map = { @@ -2724,11 +2724,11 @@ class ExtendedErrorInfo(msrest.serialization.Model): :param code: Required. The error code. Possible values include: "NotSpecified", "IntegrationServiceEnvironmentNotFound", "InternalServerError", "InvalidOperationId". - :type code: str or ~azure.mgmt.logic.models.ErrorResponseCode + :type code: str or ~logic_management_client.models.ErrorResponseCode :param message: Required. The error message. :type message: str :param details: The error message details. - :type details: list[~azure.mgmt.logic.models.ExtendedErrorInfo] + :type details: list[~logic_management_client.models.ExtendedErrorInfo] :param inner_error: The inner error. :type inner_error: object """ @@ -2760,13 +2760,13 @@ class FlowAccessControlConfiguration(msrest.serialization.Model): """The access control configuration. :param triggers: The access control configuration for invoking workflow triggers. - :type triggers: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy :param contents: The access control configuration for accessing workflow run contents. - :type contents: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy :param actions: The access control configuration for workflow actions. - :type actions: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy :param workflow_management: The access control configuration for workflow management. - :type workflow_management: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy """ _attribute_map = { @@ -2791,9 +2791,10 @@ class FlowAccessControlConfigurationPolicy(msrest.serialization.Model): """The access control configuration policy. :param allowed_caller_ip_addresses: The allowed caller IP address ranges. - :type allowed_caller_ip_addresses: list[~azure.mgmt.logic.models.IpAddressRange] + :type allowed_caller_ip_addresses: list[~logic_management_client.models.IpAddressRange] :param open_authentication_policies: The authentication policies for workflow. - :type open_authentication_policies: ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicies + :type open_authentication_policies: + ~logic_management_client.models.OpenAuthenticationAccessPolicies """ _attribute_map = { @@ -2814,9 +2815,9 @@ class FlowEndpoints(msrest.serialization.Model): """The flow endpoints configuration. :param outgoing_ip_addresses: The outgoing ip address. - :type outgoing_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] + :type outgoing_ip_addresses: list[~logic_management_client.models.IpAddress] :param access_endpoint_ip_addresses: The access endpoint ip address. - :type access_endpoint_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] + :type access_endpoint_ip_addresses: list[~logic_management_client.models.IpAddress] """ _attribute_map = { @@ -2837,9 +2838,9 @@ class FlowEndpointsConfiguration(msrest.serialization.Model): """The endpoints configuration. :param workflow: The workflow endpoints. - :type workflow: ~azure.mgmt.logic.models.FlowEndpoints + :type workflow: ~logic_management_client.models.FlowEndpoints :param connector: The connector endpoints. - :type connector: ~azure.mgmt.logic.models.FlowEndpoints + :type connector: ~logic_management_client.models.FlowEndpoints """ _attribute_map = { @@ -2881,7 +2882,7 @@ class GetCallbackUrlParameters(msrest.serialization.Model): :param not_after: The expiry time. :type not_after: ~datetime.datetime :param key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :type key_type: str or ~azure.mgmt.logic.models.KeyType + :type key_type: str or ~logic_management_client.models.KeyType """ _attribute_map = { @@ -2914,12 +2915,13 @@ class IntegrationAccount(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku + :type sku: ~logic_management_client.models.IntegrationAccountSku :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment + :type integration_service_environment: + ~logic_management_client.models.IntegrationServiceEnvironment :param state: The workflow state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState """ _validation = { @@ -2974,7 +2976,7 @@ class IntegrationAccountAgreement(Resource): :type metadata: object :param agreement_type: Required. The agreement type. Possible values include: "NotSpecified", "AS2", "X12", "Edifact". - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :type agreement_type: str or ~logic_management_client.models.AgreementType :param host_partner: Required. The integration account partner that is set as host partner for this agreement. :type host_partner: str @@ -2982,11 +2984,11 @@ class IntegrationAccountAgreement(Resource): for this agreement. :type guest_partner: str :param host_identity: Required. The business identity of the host partner. - :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type host_identity: ~logic_management_client.models.BusinessIdentity :param guest_identity: Required. The business identity of the guest partner. - :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type guest_identity: ~logic_management_client.models.BusinessIdentity :param content: Required. The agreement content. - :type content: ~azure.mgmt.logic.models.AgreementContent + :type content: ~logic_management_client.models.AgreementContent """ _validation = { @@ -3043,7 +3045,7 @@ class IntegrationAccountAgreementFilter(msrest.serialization.Model): :param agreement_type: Required. The agreement type of integration account agreement. Possible values include: "NotSpecified", "AS2", "X12", "Edifact". - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :type agreement_type: str or ~logic_management_client.models.AgreementType """ _validation = { @@ -3066,7 +3068,7 @@ class IntegrationAccountAgreementListResult(msrest.serialization.Model): """The list of integration account agreements. :param value: The list of integration account agreements. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountAgreement] + :type value: list[~logic_management_client.models.IntegrationAccountAgreement] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3107,7 +3109,7 @@ class IntegrationAccountCertificate(Resource): :param metadata: The metadata. :type metadata: object :param key: The key details in the key vault. - :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference + :type key: ~logic_management_client.models.KeyVaultKeyReference :param public_certificate: The public certificate. :type public_certificate: str """ @@ -3149,7 +3151,7 @@ class IntegrationAccountCertificateListResult(msrest.serialization.Model): """The list of integration account certificates. :param value: The list of integration account certificates. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountCertificate] + :type value: list[~logic_management_client.models.IntegrationAccountCertificate] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3172,7 +3174,7 @@ class IntegrationAccountListResult(msrest.serialization.Model): """The list of integration accounts. :param value: The list of integration accounts. - :type value: list[~azure.mgmt.logic.models.IntegrationAccount] + :type value: list[~logic_management_client.models.IntegrationAccount] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3210,10 +3212,10 @@ class IntegrationAccountMap(Resource): :type tags: dict[str, str] :param map_type: Required. The map type. Possible values include: "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". - :type map_type: str or ~azure.mgmt.logic.models.MapType + :type map_type: str or ~logic_management_client.models.MapType :param parameters_schema: The parameters schema of integration account map. :type parameters_schema: - ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema + ~logic_management_client.models.IntegrationAccountMapPropertiesParametersSchema :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. @@ -3223,7 +3225,7 @@ class IntegrationAccountMap(Resource): :param content_type: The content type. :type content_type: str :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink + :vartype content_link: ~logic_management_client.models.ContentLink :param metadata: The metadata. :type metadata: object """ @@ -3276,7 +3278,7 @@ class IntegrationAccountMapFilter(msrest.serialization.Model): :param map_type: Required. The map type of integration account map. Possible values include: "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". - :type map_type: str or ~azure.mgmt.logic.models.MapType + :type map_type: str or ~logic_management_client.models.MapType """ _validation = { @@ -3299,7 +3301,7 @@ class IntegrationAccountMapListResult(msrest.serialization.Model): """The list of integration account maps. :param value: The list of integration account maps. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountMap] + :type value: list[~logic_management_client.models.IntegrationAccountMap] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3356,7 +3358,7 @@ class IntegrationAccountPartner(Resource): :type tags: dict[str, str] :param partner_type: Required. The partner type. Possible values include: "NotSpecified", "B2B". - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :type partner_type: str or ~logic_management_client.models.PartnerType :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. @@ -3364,7 +3366,7 @@ class IntegrationAccountPartner(Resource): :param metadata: The metadata. :type metadata: object :param content: Required. The partner content. - :type content: ~azure.mgmt.logic.models.PartnerContent + :type content: ~logic_management_client.models.PartnerContent """ _validation = { @@ -3409,7 +3411,7 @@ class IntegrationAccountPartnerFilter(msrest.serialization.Model): :param partner_type: Required. The partner type of integration account partner. Possible values include: "NotSpecified", "B2B". - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :type partner_type: str or ~logic_management_client.models.PartnerType """ _validation = { @@ -3432,7 +3434,7 @@ class IntegrationAccountPartnerListResult(msrest.serialization.Model): """The list of integration account partners. :param value: The list of integration account partners. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountPartner] + :type value: list[~logic_management_client.models.IntegrationAccountPartner] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3469,7 +3471,7 @@ class IntegrationAccountSchema(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param schema_type: Required. The schema type. Possible values include: "NotSpecified", "Xml". - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + :type schema_type: str or ~logic_management_client.models.SchemaType :param target_namespace: The target namespace of the schema. :type target_namespace: str :param document_name: The document name. @@ -3487,7 +3489,7 @@ class IntegrationAccountSchema(Resource): :param content_type: The content type. :type content_type: str :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink + :vartype content_link: ~logic_management_client.models.ContentLink """ _validation = { @@ -3542,7 +3544,7 @@ class IntegrationAccountSchemaFilter(msrest.serialization.Model): :param schema_type: Required. The schema type of integration account schema. Possible values include: "NotSpecified", "Xml". - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + :type schema_type: str or ~logic_management_client.models.SchemaType """ _validation = { @@ -3565,7 +3567,7 @@ class IntegrationAccountSchemaListResult(msrest.serialization.Model): """The list of integration account schemas. :param value: The list of integration account schemas. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountSchema] + :type value: list[~logic_management_client.models.IntegrationAccountSchema] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3665,7 +3667,7 @@ class IntegrationAccountSessionListResult(msrest.serialization.Model): """The list of integration account sessions. :param value: The list of integration account sessions. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountSession] + :type value: list[~logic_management_client.models.IntegrationAccountSession] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3691,7 +3693,7 @@ class IntegrationAccountSku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "NotSpecified", "Free", "Basic", "Standard". - :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + :type name: str or ~logic_management_client.models.IntegrationAccountSkuName """ _validation = { @@ -3710,6 +3712,53 @@ def __init__( self.name = kwargs['name'] +class IntegrationServiceEnvironmenEncryptionConfiguration(msrest.serialization.Model): + """The encryption configuration for the integration service environment. + + :param encryption_key_reference: The encryption key reference. + :type encryption_key_reference: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionKeyReference + """ + + _attribute_map = { + 'encryption_key_reference': {'key': 'encryptionKeyReference', 'type': 'IntegrationServiceEnvironmenEncryptionKeyReference'}, + } + + def __init__( + self, + **kwargs + ): + super(IntegrationServiceEnvironmenEncryptionConfiguration, self).__init__(**kwargs) + self.encryption_key_reference = kwargs.get('encryption_key_reference', None) + + +class IntegrationServiceEnvironmenEncryptionKeyReference(msrest.serialization.Model): + """The encryption key details for the integration service environment. + + :param key_vault: The key vault reference. + :type key_vault: ~logic_management_client.models.ResourceReference + :param key_name: Gets the key name in the Key Vault. + :type key_name: str + :param key_version: Gets the version of the key specified in the keyName property. + :type key_version: str + """ + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'ResourceReference'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IntegrationServiceEnvironmenEncryptionKeyReference, self).__init__(**kwargs) + self.key_vault = kwargs.get('key_vault', None) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + + class IntegrationServiceEnvironment(Resource): """The integration service environment. @@ -3726,9 +3775,9 @@ class IntegrationServiceEnvironment(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: The integration service environment properties. - :type properties: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentProperties + :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku """ _validation = { @@ -3761,7 +3810,8 @@ class IntegrationServiceEnvironmentAccessEndpoint(msrest.serialization.Model): :param type: The access endpoint type. Possible values include: "NotSpecified", "External", "Internal". - :type type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpointType + :type type: str or + ~logic_management_client.models.IntegrationServiceEnvironmentAccessEndpointType """ _attribute_map = { @@ -3780,7 +3830,7 @@ class IntegrationServiceEnvironmentListResult(msrest.serialization.Model): """The list of integration service environments. :param value: - :type value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironment] + :type value: list[~logic_management_client.models.IntegrationServiceEnvironment] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3807,11 +3857,12 @@ class IntegrationServiceEnvironmentNetworkDependency(msrest.serialization.Model) "DiagnosticLogsAndMetrics", "IntegrationServiceEnvironmentConnectors", "RedisCache", "AccessEndpoints", "RecoveryService", "SQL", "RegionalService". :type category: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyCategoryType + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkDependencyCategoryType :param display_name: The display name. :type display_name: str :param endpoints: The endpoints. - :type endpoints: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndpoint] + :type endpoints: + list[~logic_management_client.models.IntegrationServiceEnvironmentNetworkEndpoint] """ _attribute_map = { @@ -3834,11 +3885,11 @@ class IntegrationServiceEnvironmentNetworkDependencyHealth(msrest.serialization. """The integration service environment subnet network health. :param error: The error if any occurred during the operation. - :type error: ~azure.mgmt.logic.models.ExtendedErrorInfo + :type error: ~logic_management_client.models.ExtendedErrorInfo :param state: The network dependency health state. Possible values include: "NotSpecified", "Healthy", "Unhealthy", "Unknown". :type state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealthState + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkDependencyHealthState """ _attribute_map = { @@ -3861,7 +3912,7 @@ class IntegrationServiceEnvironmentNetworkEndpoint(msrest.serialization.Model): :param accessibility: The accessibility state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". :type accessibility: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState :param domain_name: The domain name. :type domain_name: str :param ports: The ports. @@ -3891,16 +3942,19 @@ class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :param state: The integration service environment state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState :param integration_service_environment_id: Gets the tracking id. :type integration_service_environment_id: str :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration :param network_configuration: The network configuration. - :type network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration """ _attribute_map = { @@ -3909,6 +3963,7 @@ class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): 'integration_service_environment_id': {'key': 'integrationServiceEnvironmentId', 'type': 'str'}, 'endpoints_configuration': {'key': 'endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, 'network_configuration': {'key': 'networkConfiguration', 'type': 'NetworkConfiguration'}, + 'encryption_configuration': {'key': 'encryptionConfiguration', 'type': 'IntegrationServiceEnvironmenEncryptionConfiguration'}, } def __init__( @@ -3921,13 +3976,14 @@ def __init__( self.integration_service_environment_id = kwargs.get('integration_service_environment_id', None) self.endpoints_configuration = kwargs.get('endpoints_configuration', None) self.network_configuration = kwargs.get('network_configuration', None) + self.encryption_configuration = kwargs.get('encryption_configuration', None) class IntegrationServiceEnvironmentSku(msrest.serialization.Model): """The integration service environment sku. :param name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :type name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName + :type name: str or ~logic_management_client.models.IntegrationServiceEnvironmentSkuName :param capacity: The sku capacity. :type capacity: int """ @@ -3956,7 +4012,8 @@ class IntegrationServiceEnvironmentSkuCapacity(msrest.serialization.Model): :param default: The default capacity. :type default: int :param scale_type: The sku scale type. Possible values include: "Manual", "Automatic", "None". - :type scale_type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuScaleType + :type scale_type: str or + ~logic_management_client.models.IntegrationServiceEnvironmentSkuScaleType """ _attribute_map = { @@ -3983,9 +4040,9 @@ class IntegrationServiceEnvironmentSkuDefinition(msrest.serialization.Model): :param resource_type: The resource type. :type resource_type: str :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinitionSku + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSkuDefinitionSku :param capacity: The sku capacity. - :type capacity: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuCapacity + :type capacity: ~logic_management_client.models.IntegrationServiceEnvironmentSkuCapacity """ _attribute_map = { @@ -4008,7 +4065,7 @@ class IntegrationServiceEnvironmentSkuDefinitionSku(msrest.serialization.Model): """The sku. :param name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :type name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName + :type name: str or ~logic_management_client.models.IntegrationServiceEnvironmentSkuName :param tier: The sku tier. :type tier: str """ @@ -4031,7 +4088,7 @@ class IntegrationServiceEnvironmentSkuList(msrest.serialization.Model): """The list of integration service environment skus. :param value: The list of integration service environment skus. - :type value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinition] + :type value: list[~logic_management_client.models.IntegrationServiceEnvironmentSkuDefinition] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -4057,14 +4114,14 @@ class IntegrationServiceEnvironmentSubnetNetworkHealth(msrest.serialization.Mode :param outbound_network_dependencies: The outbound network dependencies. :type outbound_network_dependencies: - list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependency] + list[~logic_management_client.models.IntegrationServiceEnvironmentNetworkDependency] :param outbound_network_health: The integration service environment network health. :type outbound_network_health: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealth + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkDependencyHealth :param network_dependency_health_state: Required. The integration service environment network health state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". :type network_dependency_health_state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState """ _validation = { @@ -4154,7 +4211,7 @@ class KeyVaultKey(msrest.serialization.Model): :param kid: The key id. :type kid: str :param attributes: The key attributes. - :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + :type attributes: ~logic_management_client.models.KeyVaultKeyAttributes """ _attribute_map = { @@ -4202,7 +4259,7 @@ class KeyVaultKeyCollection(msrest.serialization.Model): """Collection of key vault keys. :param value: The key vault keys. - :type value: list[~azure.mgmt.logic.models.KeyVaultKey] + :type value: list[~logic_management_client.models.KeyVaultKey] :param skip_token: The skip token. :type skip_token: str """ @@ -4227,7 +4284,7 @@ class KeyVaultKeyReference(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :type key_vault: ~logic_management_client.models.KeyVaultKeyReferenceKeyVault :param key_name: Required. The private key name in key vault. :type key_name: str :param key_version: The private key version in key vault. @@ -4296,20 +4353,21 @@ class KeyVaultReference(ResourceReference): :param id: The resource id. :type id: str + :ivar name: Gets the resource name. + :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param name: The key vault name. - :type name: str """ _validation = { + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__( @@ -4317,7 +4375,6 @@ def __init__( **kwargs ): super(KeyVaultReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) class ListKeyVaultKeysDefinition(msrest.serialization.Model): @@ -4326,7 +4383,7 @@ class ListKeyVaultKeysDefinition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :type key_vault: ~logic_management_client.models.KeyVaultReference :param skip_token: The skip token. :type skip_token: str """ @@ -4365,7 +4422,7 @@ class ManagedApi(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: The api resource properties. - :type properties: ~azure.mgmt.logic.models.ApiResourceProperties + :type properties: ~logic_management_client.models.ApiResourceProperties """ _validation = { @@ -4395,7 +4452,7 @@ class ManagedApiListResult(msrest.serialization.Model): """The list of managed APIs. :param value: The managed APIs. - :type value: list[~azure.mgmt.logic.models.ManagedApi] + :type value: list[~logic_management_client.models.ManagedApi] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -4420,9 +4477,10 @@ class NetworkConfiguration(msrest.serialization.Model): :param virtual_network_address_space: Gets the virtual network address space. :type virtual_network_address_space: str :param access_endpoint: The access endpoint. - :type access_endpoint: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpoint + :type access_endpoint: + ~logic_management_client.models.IntegrationServiceEnvironmentAccessEndpoint :param subnets: The subnets. - :type subnets: list[~azure.mgmt.logic.models.ResourceReference] + :type subnets: list[~logic_management_client.models.ResourceReference] """ _attribute_map = { @@ -4445,7 +4503,7 @@ class OpenAuthenticationAccessPolicies(msrest.serialization.Model): """AuthenticationPolicy of type Open. :param policies: Open authentication policies. - :type policies: dict[str, ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicy] + :type policies: dict[str, ~logic_management_client.models.OpenAuthenticationAccessPolicy] """ _attribute_map = { @@ -4465,14 +4523,14 @@ class OpenAuthenticationAccessPolicy(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: Type of provider for OAuth. Default value: "AAD". - :vartype type: str + :ivar type: Type of provider for OAuth. Possible values include: "AAD". + :vartype type: str or ~logic_management_client.models.OpenAuthenticationProviderType :param claims: The access policy claims. - :type claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] + :type claims: list[~logic_management_client.models.OpenAuthenticationPolicyClaim] """ _validation = { - 'type': {'readonly': True, 'constant': True}, + 'type': {'readonly': True}, } _attribute_map = { @@ -4480,8 +4538,6 @@ class OpenAuthenticationAccessPolicy(msrest.serialization.Model): 'claims': {'key': 'claims', 'type': '[OpenAuthenticationPolicyClaim]'}, } - type = "AAD" - def __init__( self, **kwargs @@ -4522,7 +4578,7 @@ class Operation(msrest.serialization.Model): :param name: Operation name: {provider}/{resource}/{operation}. :type name: str :param display: The object that represents the operation. - :type display: ~azure.mgmt.logic.models.OperationDisplay + :type display: ~logic_management_client.models.OperationDisplay :param properties: The properties. :type properties: object """ @@ -4580,7 +4636,7 @@ class OperationListResult(msrest.serialization.Model): """Result of the request to list Logic operations. It contains a list of operations and a URL link to get the next set of results. :param value: List of Logic operations supported by the Logic resource provider. - :type value: list[~azure.mgmt.logic.models.Operation] + :type value: list[~logic_management_client.models.Operation] :param next_link: URL to get the next set of operation list results if there are any. :type next_link: str """ @@ -4607,11 +4663,11 @@ class OperationResultProperties(msrest.serialization.Model): :param end_time: The end time of the workflow scope repetition. :type end_time: ~datetime.datetime :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :param status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus :param code: The workflow scope repetition code. :type code: str :param error: Any object. @@ -4650,11 +4706,11 @@ class OperationResult(OperationResultProperties): :param end_time: The end time of the workflow scope repetition. :type end_time: ~datetime.datetime :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :param status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus :param code: The workflow scope repetition code. :type code: str :param error: Any object. @@ -4664,15 +4720,15 @@ class OperationResult(OperationResultProperties): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :type retry_history: list[~logic_management_client.models.RetryHistory] :param iteration_count: :type iteration_count: int """ @@ -4722,7 +4778,7 @@ class PartnerContent(msrest.serialization.Model): """The integration account partner content. :param b2_b: The B2B partner content. - :type b2_b: ~azure.mgmt.logic.models.B2BPartnerContent + :type b2_b: ~logic_management_client.models.B2BPartnerContent """ _attribute_map = { @@ -4745,11 +4801,11 @@ class RecurrenceSchedule(msrest.serialization.Model): :param hours: The hours. :type hours: list[int] :param week_days: The days of the week. - :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] + :type week_days: list[str or ~logic_management_client.models.DaysOfWeek] :param month_days: The month days. :type month_days: list[int] :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] + :type monthly_occurrences: list[~logic_management_client.models.RecurrenceScheduleOccurrence] """ _attribute_map = { @@ -4777,7 +4833,7 @@ class RecurrenceScheduleOccurrence(msrest.serialization.Model): :param day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday". - :type day: str or ~azure.mgmt.logic.models.DayOfWeek + :type day: str or ~logic_management_client.models.DayOfWeek :param occurrence: The occurrence. :type occurrence: int """ @@ -4800,7 +4856,7 @@ class RegenerateActionParameter(msrest.serialization.Model): """The access key regenerate action content. :param key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :type key_type: str or ~azure.mgmt.logic.models.KeyType + :type key_type: str or ~logic_management_client.models.KeyType """ _attribute_map = { @@ -4887,7 +4943,7 @@ class RequestHistory(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: The request history properties. - :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties + :type properties: ~logic_management_client.models.RequestHistoryProperties """ _validation = { @@ -4917,7 +4973,7 @@ class RequestHistoryListResult(msrest.serialization.Model): """The list of workflow request histories. :param value: A list of workflow request histories. - :type value: list[~azure.mgmt.logic.models.RequestHistory] + :type value: list[~logic_management_client.models.RequestHistory] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -4944,9 +5000,9 @@ class RequestHistoryProperties(msrest.serialization.Model): :param end_time: The time the request ended. :type end_time: ~datetime.datetime :param request: The request. - :type request: ~azure.mgmt.logic.models.Request + :type request: ~logic_management_client.models.Request :param response: The response. - :type response: ~azure.mgmt.logic.models.Response + :type response: ~logic_management_client.models.Response """ _attribute_map = { @@ -4975,7 +5031,7 @@ class Response(msrest.serialization.Model): :param status_code: The status code of the response. :type status_code: int :param body_link: Details on the location of the body content. - :type body_link: ~azure.mgmt.logic.models.ContentLink + :type body_link: ~logic_management_client.models.ContentLink """ _attribute_map = { @@ -5008,7 +5064,7 @@ class RetryHistory(msrest.serialization.Model): :param service_request_id: Gets the service request Id. :type service_request_id: str :param error: Gets the error response. - :type error: ~azure.mgmt.logic.models.ErrorResponse + :type error: ~logic_management_client.models.ErrorResponse """ _attribute_map = { @@ -5087,7 +5143,7 @@ class SetTriggerStateActionDefinition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param source: Required. The source. - :type source: ~azure.mgmt.logic.models.WorkflowTriggerReference + :type source: ~logic_management_client.models.WorkflowTriggerReference """ _validation = { @@ -5113,9 +5169,9 @@ class Sku(msrest.serialization.Model): :param name: Required. The name. Possible values include: "NotSpecified", "Free", "Shared", "Basic", "Standard", "Premium". - :type name: str or ~azure.mgmt.logic.models.SkuName + :type name: str or ~logic_management_client.models.SkuName :param plan: The reference to plan. - :type plan: ~azure.mgmt.logic.models.ResourceReference + :type plan: ~logic_management_client.models.ResourceReference """ _validation = { @@ -5177,7 +5233,7 @@ class SwaggerCustomDynamicList(msrest.serialization.Model): item. :type item_title_path: str :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] + :type parameters: dict[str, ~logic_management_client.models.SwaggerCustomDynamicProperties] """ _attribute_map = { @@ -5210,7 +5266,7 @@ class SwaggerCustomDynamicProperties(msrest.serialization.Model): :param value_path: Json pointer to the dynamic schema on the response body. :type value_path: str :param parameters: The operation parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] + :type parameters: dict[str, ~logic_management_client.models.SwaggerCustomDynamicProperties] """ _attribute_map = { @@ -5260,11 +5316,11 @@ class SwaggerCustomDynamicTree(msrest.serialization.Model): """The swagger custom dynamic tree. :param settings: The tree settings. - :type settings: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeSettings + :type settings: ~logic_management_client.models.SwaggerCustomDynamicTreeSettings :param open: The tree on-open configuration. - :type open: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand + :type open: ~logic_management_client.models.SwaggerCustomDynamicTreeCommand :param browse: The tree on-browse configuration. - :type browse: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand + :type browse: ~logic_management_client.models.SwaggerCustomDynamicTreeCommand """ _attribute_map = { @@ -5305,7 +5361,7 @@ class SwaggerCustomDynamicTreeCommand(msrest.serialization.Model): item. :type selectable_filter: str :param parameters: Dictionary of :code:``. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeParameter] + :type parameters: dict[str, ~logic_management_client.models.SwaggerCustomDynamicTreeParameter] """ _attribute_map = { @@ -5423,13 +5479,13 @@ class SwaggerSchema(msrest.serialization.Model): :type ref: str :param type: The type. Possible values include: "String", "Number", "Integer", "Boolean", "Array", "File", "Object", "Null". - :type type: str or ~azure.mgmt.logic.models.SwaggerSchemaType + :type type: str or ~logic_management_client.models.SwaggerSchemaType :param title: The title. :type title: str :param items: The items schema. - :type items: ~azure.mgmt.logic.models.SwaggerSchema + :type items: ~logic_management_client.models.SwaggerSchema :param properties: The object properties. - :type properties: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] + :type properties: dict[str, ~logic_management_client.models.SwaggerSchema] :param additional_properties: The additional properties. :type additional_properties: object :param required: The object required properties. @@ -5439,28 +5495,28 @@ class SwaggerSchema(msrest.serialization.Model): :param min_properties: The minimum number of allowed properties. :type min_properties: int :param all_of: The schemas which must pass validation when this schema is used. - :type all_of: list[~azure.mgmt.logic.models.SwaggerSchema] + :type all_of: list[~logic_management_client.models.SwaggerSchema] :param discriminator: The discriminator. :type discriminator: str :param read_only: Indicates whether this property must be present in the a request. :type read_only: bool :param xml: The xml representation format for a property. - :type xml: ~azure.mgmt.logic.models.SwaggerXml + :type xml: ~logic_management_client.models.SwaggerXml :param external_docs: The external documentation. - :type external_docs: ~azure.mgmt.logic.models.SwaggerExternalDocumentation + :type external_docs: ~logic_management_client.models.SwaggerExternalDocumentation :param example: The example value. :type example: object :param notification_url_extension: Indicates the notification url extension. If this is set, the property's value should be a callback url for a webhook. :type notification_url_extension: bool :param dynamic_schema_old: The dynamic schema configuration. - :type dynamic_schema_old: ~azure.mgmt.logic.models.SwaggerCustomDynamicSchema + :type dynamic_schema_old: ~logic_management_client.models.SwaggerCustomDynamicSchema :param dynamic_schema_new: The dynamic schema configuration. - :type dynamic_schema_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties + :type dynamic_schema_new: ~logic_management_client.models.SwaggerCustomDynamicProperties :param dynamic_list_new: The dynamic list. - :type dynamic_list_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicList + :type dynamic_list_new: ~logic_management_client.models.SwaggerCustomDynamicList :param dynamic_tree: The dynamic values tree configuration. - :type dynamic_tree: ~azure.mgmt.logic.models.SwaggerCustomDynamicTree + :type dynamic_tree: ~logic_management_client.models.SwaggerCustomDynamicTree """ _attribute_map = { @@ -5559,7 +5615,7 @@ class TrackingEvent(msrest.serialization.Model): :param event_level: Required. The event level. Possible values include: "LogAlways", "Critical", "Error", "Warning", "Informational", "Verbose". - :type event_level: str or ~azure.mgmt.logic.models.EventLevel + :type event_level: str or ~logic_management_client.models.EventLevel :param event_time: Required. The event time. :type event_time: ~datetime.datetime :param record_type: Required. The record type. Possible values include: "NotSpecified", @@ -5568,11 +5624,11 @@ class TrackingEvent(msrest.serialization.Model): "X12TransactionSetAcknowledgment", "EdifactInterchange", "EdifactFunctionalGroup", "EdifactTransactionSet", "EdifactInterchangeAcknowledgment", "EdifactFunctionalGroupAcknowledgment", "EdifactTransactionSetAcknowledgment". - :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :type record_type: str or ~logic_management_client.models.TrackingRecordType :param record: The record. :type record: object :param error: The error. - :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + :type error: ~logic_management_client.models.TrackingEventErrorInfo """ _validation = { @@ -5633,9 +5689,9 @@ class TrackingEventsDefinition(msrest.serialization.Model): :type source_type: str :param track_events_options: The track events options. Possible values include: "None", "DisableSourceInfoEnrich". - :type track_events_options: str or ~azure.mgmt.logic.models.TrackEventsOperationOptions + :type track_events_options: str or ~logic_management_client.models.TrackEventsOperationOptions :param events: Required. The events. - :type events: list[~azure.mgmt.logic.models.TrackingEvent] + :type events: list[~logic_management_client.models.TrackingEvent] """ _validation = { @@ -5678,32 +5734,32 @@ class Workflow(Resource): "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :vartype provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :ivar created_time: Gets the created time. :vartype created_time: ~datetime.datetime :ivar changed_time: Gets the changed time. :vartype changed_time: ~datetime.datetime :param state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration + :type access_control: ~logic_management_client.models.FlowAccessControlConfiguration :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku + :vartype sku: ~logic_management_client.models.Sku :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :type integration_account: ~logic_management_client.models.ResourceReference :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :type integration_service_environment: ~logic_management_client.models.ResourceReference :param definition: The definition. :type definition: object :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] """ _validation = { @@ -5764,7 +5820,7 @@ class WorkflowFilter(msrest.serialization.Model): :param state: The state of workflows. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState """ _attribute_map = { @@ -5783,7 +5839,7 @@ class WorkflowListResult(msrest.serialization.Model): """The list of workflows. :param value: The list of workflows. - :type value: list[~azure.mgmt.logic.models.Workflow] + :type value: list[~logic_management_client.models.Workflow] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -5807,7 +5863,7 @@ class WorkflowParameter(msrest.serialization.Model): :param type: The type. Possible values include: "NotSpecified", "String", "SecureString", "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :type type: str or ~azure.mgmt.logic.models.ParameterType + :type type: str or ~logic_management_client.models.ParameterType :param value: The value. :type value: object :param metadata: The metadata. @@ -5841,7 +5897,7 @@ class WorkflowOutputParameter(WorkflowParameter): :param type: The type. Possible values include: "NotSpecified", "String", "SecureString", "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :type type: str or ~azure.mgmt.logic.models.ParameterType + :type type: str or ~logic_management_client.models.ParameterType :param value: The value. :type value: object :param metadata: The metadata. @@ -5879,20 +5935,21 @@ class WorkflowReference(ResourceReference): :param id: The resource id. :type id: str + :ivar name: Gets the resource name. + :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param name: The workflow name. - :type name: str """ _validation = { + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__( @@ -5900,7 +5957,6 @@ def __init__( **kwargs ): super(WorkflowReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) class WorkflowRun(SubResource): @@ -5923,7 +5979,7 @@ class WorkflowRun(SubResource): :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -5931,15 +5987,15 @@ class WorkflowRun(SubResource): :ivar correlation_id: Gets the correlation id. :vartype correlation_id: str :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation + :type correlation: ~logic_management_client.models.Correlation :ivar workflow: Gets the reference to workflow version. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :vartype workflow: ~logic_management_client.models.ResourceReference :ivar trigger: Gets the fired trigger. - :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger + :vartype trigger: ~logic_management_client.models.WorkflowRunTrigger :ivar outputs: Gets the outputs. - :vartype outputs: dict[str, ~azure.mgmt.logic.models.WorkflowOutputParameter] + :vartype outputs: dict[str, ~logic_management_client.models.WorkflowOutputParameter] :ivar response: Gets the response of the flow run. - :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger + :vartype response: ~logic_management_client.models.WorkflowRunTrigger """ _validation = { @@ -6016,7 +6072,7 @@ class WorkflowRunAction(SubResource): :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -6024,15 +6080,15 @@ class WorkflowRunAction(SubResource): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :type retry_history: list[~logic_management_client.models.RetryHistory] """ _validation = { @@ -6093,7 +6149,7 @@ class WorkflowRunActionFilter(msrest.serialization.Model): :param status: The status of workflow run action. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus """ _attribute_map = { @@ -6112,7 +6168,7 @@ class WorkflowRunActionListResult(msrest.serialization.Model): """The list of workflow run actions. :param value: A list of workflow run actions. - :type value: list[~azure.mgmt.logic.models.WorkflowRunAction] + :type value: list[~logic_management_client.models.WorkflowRunAction] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -6151,11 +6207,11 @@ class WorkflowRunActionRepetitionDefinition(Resource): :param end_time: The end time of the workflow scope repetition. :type end_time: ~datetime.datetime :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :param status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus :param code: The workflow scope repetition code. :type code: str :param error: Any object. @@ -6165,19 +6221,19 @@ class WorkflowRunActionRepetitionDefinition(Resource): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :type retry_history: list[~logic_management_client.models.RetryHistory] :param iteration_count: :type iteration_count: int :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + :type repetition_indexes: list[~logic_management_client.models.RepetitionIndex] """ _validation = { @@ -6243,7 +6299,7 @@ class WorkflowRunActionRepetitionDefinitionCollection(msrest.serialization.Model :param next_link: The link used to get the next page of recommendations. :type next_link: str :param value: - :type value: list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + :type value: list[~logic_management_client.models.WorkflowRunActionRepetitionDefinition] """ _attribute_map = { @@ -6270,11 +6326,11 @@ class WorkflowRunActionRepetitionProperties(OperationResult): :param end_time: The end time of the workflow scope repetition. :type end_time: ~datetime.datetime :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :param status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus :param code: The workflow scope repetition code. :type code: str :param error: Any object. @@ -6284,19 +6340,19 @@ class WorkflowRunActionRepetitionProperties(OperationResult): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :type retry_history: list[~logic_management_client.models.RetryHistory] :param iteration_count: :type iteration_count: int :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + :type repetition_indexes: list[~logic_management_client.models.RepetitionIndex] """ _validation = { @@ -6340,7 +6396,7 @@ class WorkflowRunFilter(msrest.serialization.Model): :param status: The status of workflow run. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus """ _attribute_map = { @@ -6359,7 +6415,7 @@ class WorkflowRunListResult(msrest.serialization.Model): """The list of workflow runs. :param value: A list of workflow runs. - :type value: list[~azure.mgmt.logic.models.WorkflowRun] + :type value: list[~logic_management_client.models.WorkflowRun] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -6388,11 +6444,11 @@ class WorkflowRunTrigger(msrest.serialization.Model): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar scheduled_time: Gets the scheduled time. :vartype scheduled_time: ~datetime.datetime :ivar start_time: Gets the start time. @@ -6402,13 +6458,13 @@ class WorkflowRunTrigger(msrest.serialization.Model): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation + :type correlation: ~logic_management_client.models.Correlation :ivar code: Gets the code. :vartype code: str :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar error: Gets the error. :vartype error: object :ivar tracked_properties: Gets the tracked properties. @@ -6484,26 +6540,27 @@ class WorkflowTrigger(SubResource): "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState + :vartype provisioning_state: str or + ~logic_management_client.models.WorkflowTriggerProvisioningState :ivar created_time: Gets the created time. :vartype created_time: ~datetime.datetime :ivar changed_time: Gets the changed time. :vartype changed_time: ~datetime.datetime :ivar state: Gets the state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState + :vartype state: str or ~logic_management_client.models.WorkflowState :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar last_execution_time: Gets the last execution time. :vartype last_execution_time: ~datetime.datetime :ivar next_execution_time: Gets the next execution time. :vartype next_execution_time: ~datetime.datetime :ivar recurrence: Gets the workflow trigger recurrence. - :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + :vartype recurrence: ~logic_management_client.models.WorkflowTriggerRecurrence :ivar workflow: Gets the reference to workflow. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :vartype workflow: ~logic_management_client.models.ResourceReference """ _validation = { @@ -6571,7 +6628,7 @@ class WorkflowTriggerCallbackUrl(msrest.serialization.Model): parameters. :type relative_path_parameters: list[str] :param queries: Gets the workflow trigger callback URL query parameters. - :type queries: ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries + :type queries: ~logic_management_client.models.WorkflowTriggerListCallbackUrlQueries """ _validation = { @@ -6608,7 +6665,7 @@ class WorkflowTriggerFilter(msrest.serialization.Model): :param state: The state of workflow trigger. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState """ _attribute_map = { @@ -6643,7 +6700,7 @@ class WorkflowTriggerHistory(SubResource): :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -6651,15 +6708,15 @@ class WorkflowTriggerHistory(SubResource): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation + :type correlation: ~logic_management_client.models.Correlation :ivar inputs_link: Gets the link to input parameters. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs_link: Gets the link to output parameters. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar fired: The value indicating whether trigger was fired. :vartype fired: bool :ivar run: Gets the reference to workflow run. - :vartype run: ~azure.mgmt.logic.models.ResourceReference + :vartype run: ~logic_management_client.models.ResourceReference """ _validation = { @@ -6724,7 +6781,7 @@ class WorkflowTriggerHistoryFilter(msrest.serialization.Model): :param status: The status of workflow trigger history. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus """ _attribute_map = { @@ -6743,7 +6800,7 @@ class WorkflowTriggerHistoryListResult(msrest.serialization.Model): """The list of workflow trigger histories. :param value: A list of workflow trigger histories. - :type value: list[~azure.mgmt.logic.models.WorkflowTriggerHistory] + :type value: list[~logic_management_client.models.WorkflowTriggerHistory] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -6801,7 +6858,7 @@ class WorkflowTriggerListResult(msrest.serialization.Model): """The list of workflow triggers. :param value: A list of workflow triggers. - :type value: list[~azure.mgmt.logic.models.WorkflowTrigger] + :type value: list[~logic_management_client.models.WorkflowTrigger] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -6825,7 +6882,7 @@ class WorkflowTriggerRecurrence(msrest.serialization.Model): :param frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", "Hour", "Day", "Week", "Month", "Year". - :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency + :type frequency: str or ~logic_management_client.models.RecurrenceFrequency :param interval: The interval. :type interval: int :param start_time: The start time. @@ -6835,7 +6892,7 @@ class WorkflowTriggerRecurrence(msrest.serialization.Model): :param time_zone: The time zone. :type time_zone: str :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + :type schedule: ~logic_management_client.models.RecurrenceSchedule """ _attribute_map = { @@ -6867,10 +6924,10 @@ class WorkflowTriggerReference(ResourceReference): :param id: The resource id. :type id: str + :ivar name: Gets the resource name. + :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param name: The workflow trigger resource reference name. - :type name: str :param flow_name: The workflow name. :type flow_name: str :param trigger_name: The workflow trigger name. @@ -6878,13 +6935,14 @@ class WorkflowTriggerReference(ResourceReference): """ _validation = { + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'flow_name': {'key': 'flowName', 'type': 'str'}, 'trigger_name': {'key': 'triggerName', 'type': 'str'}, } @@ -6894,7 +6952,6 @@ def __init__( **kwargs ): super(WorkflowTriggerReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) self.flow_name = kwargs.get('flow_name', None) self.trigger_name = kwargs.get('trigger_name', None) @@ -6918,30 +6975,30 @@ class WorkflowVersion(Resource): "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :vartype provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :ivar created_time: Gets the created time. :vartype created_time: ~datetime.datetime :ivar changed_time: Gets the changed time. :vartype changed_time: ~datetime.datetime :param state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration + :type access_control: ~logic_management_client.models.FlowAccessControlConfiguration :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku + :vartype sku: ~logic_management_client.models.Sku :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :type integration_account: ~logic_management_client.models.ResourceReference :param definition: The definition. :type definition: object :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] """ _validation = { @@ -6999,7 +7056,7 @@ class WorkflowVersionListResult(msrest.serialization.Model): """The list of workflow versions. :param value: A list of workflow versions. - :type value: list[~azure.mgmt.logic.models.WorkflowVersion] + :type value: list[~logic_management_client.models.WorkflowVersion] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -7149,9 +7206,9 @@ class X12AgreementContent(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param receive_agreement: Required. The X12 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :type receive_agreement: ~logic_management_client.models.X12OneWayAgreement :param send_agreement: Required. The X12 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :type send_agreement: ~logic_management_client.models.X12OneWayAgreement """ _validation = { @@ -7190,7 +7247,7 @@ class X12DelimiterOverrides(msrest.serialization.Model): :type segment_terminator: int :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :type segment_terminator_suffix: str or ~logic_management_client.models.SegmentTerminatorSuffix :param replace_character: Required. The replacement character. :type replace_character: int :param replace_separators_in_payload: Required. The value indicating whether to replace @@ -7263,10 +7320,10 @@ class X12EnvelopeOverride(msrest.serialization.Model): :type functional_identifier_code: str :param date_format: Required. The date format. Possible values include: "NotSpecified", "CCYYMMDD", "YYMMDD". - :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :type date_format: str or ~logic_management_client.models.X12DateFormat :param time_format: Required. The time format. Possible values include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + :type time_format: str or ~logic_management_client.models.X12TimeFormat """ _validation = { @@ -7370,13 +7427,13 @@ class X12EnvelopeSettings(msrest.serialization.Model): :type overwrite_existing_transaction_set_control_number: bool :param group_header_date_format: Required. The group header date format. Possible values include: "NotSpecified", "CCYYMMDD", "YYMMDD". - :type group_header_date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :type group_header_date_format: str or ~logic_management_client.models.X12DateFormat :param group_header_time_format: Required. The group header time format. Possible values include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :type group_header_time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + :type group_header_time_format: str or ~logic_management_client.models.X12TimeFormat :param usage_indicator: Required. The usage indicator. Possible values include: "NotSpecified", "Test", "Information", "Production". - :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator + :type usage_indicator: str or ~logic_management_client.models.UsageIndicator """ _validation = { @@ -7479,10 +7536,10 @@ class X12FramingSettings(msrest.serialization.Model): :type segment_terminator: int :param character_set: Required. The X12 character set. Possible values include: "NotSpecified", "Basic", "Extended", "UTF8". - :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :type character_set: str or ~logic_management_client.models.X12CharacterSet :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :type segment_terminator_suffix: str or ~logic_management_client.models.SegmentTerminatorSuffix """ _validation = { @@ -7526,7 +7583,7 @@ class X12MessageFilter(msrest.serialization.Model): :param message_filter_type: Required. The message filter type. Possible values include: "NotSpecified", "Include", "Exclude". - :type message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType + :type message_filter_type: str or ~logic_management_client.models.MessageFilterType """ _validation = { @@ -7576,11 +7633,11 @@ class X12OneWayAgreement(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type sender_business_identity: ~logic_management_client.models.BusinessIdentity :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type receiver_business_identity: ~logic_management_client.models.BusinessIdentity :param protocol_settings: Required. The X12 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings + :type protocol_settings: ~logic_management_client.models.X12ProtocolSettings """ _validation = { @@ -7665,29 +7722,29 @@ class X12ProtocolSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param validation_settings: Required. The X12 validation settings. - :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :type validation_settings: ~logic_management_client.models.X12ValidationSettings :param framing_settings: Required. The X12 framing settings. - :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :type framing_settings: ~logic_management_client.models.X12FramingSettings :param envelope_settings: Required. The X12 envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :type envelope_settings: ~logic_management_client.models.X12EnvelopeSettings :param acknowledgement_settings: Required. The X12 acknowledgment settings. - :type acknowledgement_settings: ~azure.mgmt.logic.models.X12AcknowledgementSettings + :type acknowledgement_settings: ~logic_management_client.models.X12AcknowledgementSettings :param message_filter: Required. The X12 message filter. - :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :type message_filter: ~logic_management_client.models.X12MessageFilter :param security_settings: Required. The X12 security settings. - :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :type security_settings: ~logic_management_client.models.X12SecuritySettings :param processing_settings: Required. The X12 processing settings. - :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings + :type processing_settings: ~logic_management_client.models.X12ProcessingSettings :param envelope_overrides: The X12 envelope override settings. - :type envelope_overrides: list[~azure.mgmt.logic.models.X12EnvelopeOverride] + :type envelope_overrides: list[~logic_management_client.models.X12EnvelopeOverride] :param validation_overrides: The X12 validation override settings. - :type validation_overrides: list[~azure.mgmt.logic.models.X12ValidationOverride] + :type validation_overrides: list[~logic_management_client.models.X12ValidationOverride] :param message_filter_list: The X12 message filter list. - :type message_filter_list: list[~azure.mgmt.logic.models.X12MessageIdentifier] + :type message_filter_list: list[~logic_management_client.models.X12MessageIdentifier] :param schema_references: Required. The X12 schema references. - :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] + :type schema_references: list[~logic_management_client.models.X12SchemaReference] :param x12_delimiter_overrides: The X12 delimiter override settings. - :type x12_delimiter_overrides: list[~azure.mgmt.logic.models.X12DelimiterOverrides] + :type x12_delimiter_overrides: list[~logic_management_client.models.X12DelimiterOverrides] """ _validation = { @@ -7834,7 +7891,7 @@ class X12ValidationOverride(msrest.serialization.Model): :type trim_leading_and_trailing_spaces_and_zeroes: bool :param trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :type trailing_separator_policy: str or ~logic_management_client.models.TrailingSeparatorPolicy """ _validation = { @@ -7905,7 +7962,7 @@ class X12ValidationSettings(msrest.serialization.Model): :type trim_leading_and_trailing_spaces_and_zeroes: bool :param trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :type trailing_separator_policy: str or ~logic_management_client.models.TrailingSeparatorPolicy """ _validation = { diff --git a/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py b/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py index 7ccdd61abf5..1eb190a8894 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py +++ b/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py @@ -12,16 +12,18 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization +from ._logic_management_client_enums import * + class AgreementContent(msrest.serialization.Model): """The integration account agreement content. :param a_s2: The AS2 agreement content. - :type a_s2: ~azure.mgmt.logic.models.As2AgreementContent + :type a_s2: ~logic_management_client.models.As2AgreementContent :param x12: The X12 agreement content. - :type x12: ~azure.mgmt.logic.models.X12AgreementContent + :type x12: ~logic_management_client.models.X12AgreementContent :param edifact: The EDIFACT agreement content. - :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent + :type edifact: ~logic_management_client.models.EdifactAgreementContent """ _attribute_map = { @@ -57,7 +59,7 @@ class ApiDeploymentParameterMetadata(msrest.serialization.Model): :type description: str :param visibility: The visibility. Possible values include: "NotSpecified", "Default", "Internal". - :type visibility: str or ~azure.mgmt.logic.models.ApiDeploymentParameterVisibility + :type visibility: str or ~logic_management_client.models.ApiDeploymentParameterVisibility """ _attribute_map = { @@ -90,9 +92,10 @@ class ApiDeploymentParameterMetadataSet(msrest.serialization.Model): """The API deployment parameters metadata. :param package_content_link: The package content link parameter. - :type package_content_link: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata + :type package_content_link: ~logic_management_client.models.ApiDeploymentParameterMetadata :param redis_cache_connection_string: The package content link parameter. - :type redis_cache_connection_string: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata + :type redis_cache_connection_string: + ~logic_management_client.models.ApiDeploymentParameterMetadata """ _attribute_map = { @@ -174,7 +177,7 @@ class ApiOperation(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: The api operations properties. - :type properties: ~azure.mgmt.logic.models.ApiOperationPropertiesDefinition + :type properties: ~logic_management_client.models.ApiOperationPropertiesDefinition """ _validation = { @@ -209,7 +212,7 @@ class ApiOperationAnnotation(msrest.serialization.Model): :param status: The status annotation. Possible values include: "NotSpecified", "Preview", "Production". - :type status: str or ~azure.mgmt.logic.models.StatusAnnotation + :type status: str or ~logic_management_client.models.StatusAnnotation :param family: The family. :type family: str :param revision: The revision. @@ -240,7 +243,7 @@ class ApiOperationListResult(msrest.serialization.Model): """The list of managed API operations. :param value: The api operation definitions for an API. - :type value: list[~azure.mgmt.logic.models.ApiOperation] + :type value: list[~logic_management_client.models.ApiOperation] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -278,13 +281,13 @@ class ApiOperationPropertiesDefinition(msrest.serialization.Model): :param pageable: Indicates whether the api operation is pageable. :type pageable: bool :param annotation: The annotation of api operation. - :type annotation: ~azure.mgmt.logic.models.ApiOperationAnnotation + :type annotation: ~logic_management_client.models.ApiOperationAnnotation :param api: The api reference. - :type api: ~azure.mgmt.logic.models.ApiReference + :type api: ~logic_management_client.models.ApiReference :param inputs_definition: The operation inputs definition schema. - :type inputs_definition: ~azure.mgmt.logic.models.SwaggerSchema + :type inputs_definition: ~logic_management_client.models.SwaggerSchema :param responses_definition: The operation responses definition schemas. - :type responses_definition: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] + :type responses_definition: dict[str, ~logic_management_client.models.SwaggerSchema] :param is_webhook: Indicates whether the API operation is webhook or not. :type is_webhook: bool :param is_notification: Indicates whether the API operation is notification or not. @@ -397,9 +400,9 @@ class ApiReference(ResourceReference): :type brand_color: str :param category: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", "Premium". - :type category: str or ~azure.mgmt.logic.models.ApiTier + :type category: str or ~logic_management_client.models.ApiTier :param integration_service_environment: The integration service environment reference. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :type integration_service_environment: ~logic_management_client.models.ResourceReference """ _validation = { @@ -505,7 +508,7 @@ class ApiResourceGeneralInformation(msrest.serialization.Model): :type release_tag: str :param tier: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", "Premium". - :type tier: str or ~azure.mgmt.logic.models.ApiTier + :type tier: str or ~logic_management_client.models.ApiTier """ _attribute_map = { @@ -549,21 +552,21 @@ class ApiResourceMetadata(msrest.serialization.Model): :param tags: A set of tags. The tags. :type tags: dict[str, str] :param api_type: The api type. Possible values include: "NotSpecified", "Rest", "Soap". - :type api_type: str or ~azure.mgmt.logic.models.ApiType + :type api_type: str or ~logic_management_client.models.ApiType :param wsdl_service: The WSDL service. - :type wsdl_service: ~azure.mgmt.logic.models.WsdlService + :type wsdl_service: ~logic_management_client.models.WsdlService :param wsdl_import_method: The WSDL import method. Possible values include: "NotSpecified", "SoapToRest", "SoapPassThrough". - :type wsdl_import_method: str or ~azure.mgmt.logic.models.WsdlImportMethod + :type wsdl_import_method: str or ~logic_management_client.models.WsdlImportMethod :param connection_type: The connection type. :type connection_type: str :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :param deployment_parameters: The connector deployment parameters metadata. - :type deployment_parameters: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadataSet + :type deployment_parameters: ~logic_management_client.models.ApiDeploymentParameterMetadataSet """ _attribute_map = { @@ -641,31 +644,31 @@ class ApiResourceProperties(msrest.serialization.Model): :param connection_parameters: The connection parameters. :type connection_parameters: dict[str, object] :param metadata: The metadata. - :type metadata: ~azure.mgmt.logic.models.ApiResourceMetadata + :type metadata: ~logic_management_client.models.ApiResourceMetadata :param runtime_urls: The runtime urls. :type runtime_urls: list[str] :param general_information: The api general information. - :type general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation + :type general_information: ~logic_management_client.models.ApiResourceGeneralInformation :param capabilities: The capabilities. :type capabilities: list[str] :param backend_service: The backend service. - :type backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService + :type backend_service: ~logic_management_client.models.ApiResourceBackendService :param policies: The policies for the API. - :type policies: ~azure.mgmt.logic.models.ApiResourcePolicies + :type policies: ~logic_management_client.models.ApiResourcePolicies :param api_definition_url: The API definition. :type api_definition_url: str :param api_definitions: The api definitions. - :type api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions + :type api_definitions: ~logic_management_client.models.ApiResourceDefinitions :param integration_service_environment: The integration service environment reference. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :type integration_service_environment: ~logic_management_client.models.ResourceReference :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :param category: The category. Possible values include: "NotSpecified", "Enterprise", "Standard", "Premium". - :type category: str or ~azure.mgmt.logic.models.ApiTier + :type category: str or ~logic_management_client.models.ApiTier """ _attribute_map = { @@ -763,7 +766,7 @@ class ArtifactContentPropertiesDefinition(ArtifactProperties): :param content_type: The content type. :type content_type: str :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink + :type content_link: ~logic_management_client.models.ContentLink """ _attribute_map = { @@ -845,9 +848,9 @@ class As2AgreementContent(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param receive_agreement: Required. The AS2 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.As2OneWayAgreement + :type receive_agreement: ~logic_management_client.models.As2OneWayAgreement :param send_agreement: Required. The AS2 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.As2OneWayAgreement + :type send_agreement: ~logic_management_client.models.As2OneWayAgreement """ _validation = { @@ -987,7 +990,7 @@ class As2MdnSettings(msrest.serialization.Model): :type send_inbound_mdn_to_message_box: bool :param mic_hashing_algorithm: Required. The signing or hashing algorithm. Possible values include: "NotSpecified", "None", "MD5", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :type mic_hashing_algorithm: str or ~azure.mgmt.logic.models.HashingAlgorithm + :type mic_hashing_algorithm: str or ~logic_management_client.models.HashingAlgorithm """ _validation = { @@ -1091,11 +1094,11 @@ class As2OneWayAgreement(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type sender_business_identity: ~logic_management_client.models.BusinessIdentity :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type receiver_business_identity: ~logic_management_client.models.BusinessIdentity :param protocol_settings: Required. The AS2 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.As2ProtocolSettings + :type protocol_settings: ~logic_management_client.models.As2ProtocolSettings """ _validation = { @@ -1130,20 +1133,20 @@ class As2ProtocolSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param message_connection_settings: Required. The message connection settings. - :type message_connection_settings: ~azure.mgmt.logic.models.As2MessageConnectionSettings + :type message_connection_settings: ~logic_management_client.models.As2MessageConnectionSettings :param acknowledgement_connection_settings: Required. The acknowledgement connection settings. :type acknowledgement_connection_settings: - ~azure.mgmt.logic.models.As2AcknowledgementConnectionSettings + ~logic_management_client.models.As2AcknowledgementConnectionSettings :param mdn_settings: Required. The MDN settings. - :type mdn_settings: ~azure.mgmt.logic.models.As2MdnSettings + :type mdn_settings: ~logic_management_client.models.As2MdnSettings :param security_settings: Required. The security settings. - :type security_settings: ~azure.mgmt.logic.models.As2SecuritySettings + :type security_settings: ~logic_management_client.models.As2SecuritySettings :param validation_settings: Required. The validation settings. - :type validation_settings: ~azure.mgmt.logic.models.As2ValidationSettings + :type validation_settings: ~logic_management_client.models.As2ValidationSettings :param envelope_settings: Required. The envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.As2EnvelopeSettings + :type envelope_settings: ~logic_management_client.models.As2EnvelopeSettings :param error_settings: Required. The error settings. - :type error_settings: ~azure.mgmt.logic.models.As2ErrorSettings + :type error_settings: ~logic_management_client.models.As2ErrorSettings """ _validation = { @@ -1303,10 +1306,10 @@ class As2ValidationSettings(msrest.serialization.Model): :type check_certificate_revocation_list_on_receive: bool :param encryption_algorithm: Required. The encryption algorithm. Possible values include: "NotSpecified", "None", "DES3", "RC2", "AES128", "AES192", "AES256". - :type encryption_algorithm: str or ~azure.mgmt.logic.models.EncryptionAlgorithm + :type encryption_algorithm: str or ~logic_management_client.models.EncryptionAlgorithm :param signing_algorithm: The signing algorithm. Possible values include: "NotSpecified", "Default", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm + :type signing_algorithm: str or ~logic_management_client.models.SigningAlgorithm """ _validation = { @@ -1366,7 +1369,7 @@ class AssemblyCollection(msrest.serialization.Model): """A collection of assembly definitions. :param value: - :type value: list[~azure.mgmt.logic.models.AssemblyDefinition] + :type value: list[~logic_management_client.models.AssemblyDefinition] """ _attribute_map = { @@ -1401,7 +1404,7 @@ class AssemblyDefinition(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: Required. The assembly properties. - :type properties: ~azure.mgmt.logic.models.AssemblyProperties + :type properties: ~logic_management_client.models.AssemblyProperties """ _validation = { @@ -1448,7 +1451,7 @@ class AssemblyProperties(ArtifactContentPropertiesDefinition): :param content_type: The content type. :type content_type: str :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink + :type content_link: ~logic_management_client.models.ContentLink :param assembly_name: Required. The assembly name. :type assembly_name: str :param assembly_version: The assembly version. @@ -1535,7 +1538,7 @@ class AzureResourceErrorInfo(ErrorInfo): :param message: Required. The error message. :type message: str :param details: The error details. - :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + :type details: list[~logic_management_client.models.AzureResourceErrorInfo] """ _validation = { @@ -1566,7 +1569,7 @@ class B2BPartnerContent(msrest.serialization.Model): """The B2B partner content. :param business_identities: The list of partner business identities. - :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] + :type business_identities: list[~logic_management_client.models.BusinessIdentity] """ _attribute_map = { @@ -1601,7 +1604,7 @@ class BatchConfiguration(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: Required. The batch configuration properties. - :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + :type properties: ~logic_management_client.models.BatchConfigurationProperties """ _validation = { @@ -1636,7 +1639,7 @@ class BatchConfigurationCollection(msrest.serialization.Model): """A collection of batch configurations. :param value: - :type value: list[~azure.mgmt.logic.models.BatchConfiguration] + :type value: list[~logic_management_client.models.BatchConfiguration] """ _attribute_map = { @@ -1658,16 +1661,16 @@ class BatchConfigurationProperties(ArtifactProperties): All required parameters must be populated in order to send to Azure. + :param created_time: The artifact creation time. + :type created_time: ~datetime.datetime + :param changed_time: The artifact changed time. + :type changed_time: ~datetime.datetime :param metadata: Any object. :type metadata: object :param batch_group_name: Required. The name of the batch group. :type batch_group_name: str :param release_criteria: Required. The batch release criteria. - :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria - :param created_time: The created time. - :type created_time: ~datetime.datetime - :param changed_time: The changed time. - :type changed_time: ~datetime.datetime + :type release_criteria: ~logic_management_client.models.BatchReleaseCriteria """ _validation = { @@ -1676,11 +1679,11 @@ class BatchConfigurationProperties(ArtifactProperties): } _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, 'metadata': {'key': 'metadata', 'type': 'object'}, 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, } def __init__( @@ -1688,16 +1691,14 @@ def __init__( *, batch_group_name: str, release_criteria: "BatchReleaseCriteria", - metadata: Optional[object] = None, created_time: Optional[datetime.datetime] = None, changed_time: Optional[datetime.datetime] = None, + metadata: Optional[object] = None, **kwargs ): - super(BatchConfigurationProperties, self).__init__(metadata=metadata, **kwargs) + super(BatchConfigurationProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) self.batch_group_name = batch_group_name self.release_criteria = release_criteria - self.created_time = created_time - self.changed_time = changed_time class BatchReleaseCriteria(msrest.serialization.Model): @@ -1708,7 +1709,7 @@ class BatchReleaseCriteria(msrest.serialization.Model): :param batch_size: The batch size in bytes. :type batch_size: int :param recurrence: The recurrence. - :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + :type recurrence: ~logic_management_client.models.WorkflowTriggerRecurrence """ _attribute_map = { @@ -1821,7 +1822,7 @@ class ContentLink(msrest.serialization.Model): :param content_size: The content size. :type content_size: long :param content_hash: The content hash. - :type content_hash: ~azure.mgmt.logic.models.ContentHash + :type content_hash: ~logic_management_client.models.ContentHash :param metadata: The metadata. :type metadata: object """ @@ -1973,9 +1974,9 @@ class EdifactAgreementContent(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param receive_agreement: Required. The EDIFACT one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :type receive_agreement: ~logic_management_client.models.EdifactOneWayAgreement :param send_agreement: Required. The EDIFACT one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :type send_agreement: ~logic_management_client.models.EdifactOneWayAgreement """ _validation = { @@ -2021,10 +2022,10 @@ class EdifactDelimiterOverride(msrest.serialization.Model): :type repetition_separator: int :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :type segment_terminator_suffix: str or ~logic_management_client.models.SegmentTerminatorSuffix :param decimal_point_indicator: Required. The decimal point indicator. Possible values include: "NotSpecified", "Comma", "Decimal". - :type decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator + :type decimal_point_indicator: str or ~logic_management_client.models.EdifactDecimalIndicator :param release_indicator: Required. The release indicator. :type release_indicator: int :param message_association_assigned_code: The message association assigned code. @@ -2460,13 +2461,13 @@ class EdifactFramingSettings(msrest.serialization.Model): :param character_set: Required. The EDIFACT frame setting characterSet. Possible values include: "NotSpecified", "UNOB", "UNOA", "UNOC", "UNOD", "UNOE", "UNOF", "UNOG", "UNOH", "UNOI", "UNOJ", "UNOK", "UNOX", "UNOY", "KECA". - :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :type character_set: str or ~logic_management_client.models.EdifactCharacterSet :param decimal_point_indicator: Required. The EDIFACT frame setting decimal indicator. Possible values include: "NotSpecified", "Comma", "Decimal". - :type decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator + :type decimal_point_indicator: str or ~logic_management_client.models.EdifactDecimalIndicator :param segment_terminator_suffix: Required. The EDIFACT frame setting segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :type segment_terminator_suffix: str or ~logic_management_client.models.SegmentTerminatorSuffix """ _validation = { @@ -2532,7 +2533,7 @@ class EdifactMessageFilter(msrest.serialization.Model): :param message_filter_type: Required. The message filter type. Possible values include: "NotSpecified", "Include", "Exclude". - :type message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType + :type message_filter_type: str or ~logic_management_client.models.MessageFilterType """ _validation = { @@ -2586,11 +2587,11 @@ class EdifactOneWayAgreement(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type sender_business_identity: ~logic_management_client.models.BusinessIdentity :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type receiver_business_identity: ~logic_management_client.models.BusinessIdentity :param protocol_settings: Required. The EDIFACT protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings + :type protocol_settings: ~logic_management_client.models.EdifactProtocolSettings """ _validation = { @@ -2679,27 +2680,28 @@ class EdifactProtocolSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param validation_settings: Required. The EDIFACT validation settings. - :type validation_settings: ~azure.mgmt.logic.models.EdifactValidationSettings + :type validation_settings: ~logic_management_client.models.EdifactValidationSettings :param framing_settings: Required. The EDIFACT framing settings. - :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :type framing_settings: ~logic_management_client.models.EdifactFramingSettings :param envelope_settings: Required. The EDIFACT envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :type envelope_settings: ~logic_management_client.models.EdifactEnvelopeSettings :param acknowledgement_settings: Required. The EDIFACT acknowledgement settings. - :type acknowledgement_settings: ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :type acknowledgement_settings: ~logic_management_client.models.EdifactAcknowledgementSettings :param message_filter: Required. The EDIFACT message filter. - :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :type message_filter: ~logic_management_client.models.EdifactMessageFilter :param processing_settings: Required. The EDIFACT processing Settings. - :type processing_settings: ~azure.mgmt.logic.models.EdifactProcessingSettings + :type processing_settings: ~logic_management_client.models.EdifactProcessingSettings :param envelope_overrides: The EDIFACT envelope override settings. - :type envelope_overrides: list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] + :type envelope_overrides: list[~logic_management_client.models.EdifactEnvelopeOverride] :param message_filter_list: The EDIFACT message filter list. - :type message_filter_list: list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :type message_filter_list: list[~logic_management_client.models.EdifactMessageIdentifier] :param schema_references: Required. The EDIFACT schema references. - :type schema_references: list[~azure.mgmt.logic.models.EdifactSchemaReference] + :type schema_references: list[~logic_management_client.models.EdifactSchemaReference] :param validation_overrides: The EDIFACT validation override settings. - :type validation_overrides: list[~azure.mgmt.logic.models.EdifactValidationOverride] + :type validation_overrides: list[~logic_management_client.models.EdifactValidationOverride] :param edifact_delimiter_overrides: The EDIFACT delimiter override settings. - :type edifact_delimiter_overrides: list[~azure.mgmt.logic.models.EdifactDelimiterOverride] + :type edifact_delimiter_overrides: + list[~logic_management_client.models.EdifactDelimiterOverride] """ _validation = { @@ -2834,7 +2836,7 @@ class EdifactValidationOverride(msrest.serialization.Model): :type allow_leading_and_trailing_spaces_and_zeroes: bool :param trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :type trailing_separator_policy: str or ~logic_management_client.models.TrailingSeparatorPolicy :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool @@ -2916,7 +2918,7 @@ class EdifactValidationSettings(msrest.serialization.Model): :type trim_leading_and_trailing_spaces_and_zeroes: bool :param trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :type trailing_separator_policy: str or ~logic_management_client.models.TrailingSeparatorPolicy """ _validation = { @@ -3003,7 +3005,7 @@ class ErrorResponse(msrest.serialization.Model): """Error response indicates Logic service is not able to process the incoming request. The error property contains the error details. :param error: The error properties. - :type error: ~azure.mgmt.logic.models.ErrorProperties + :type error: ~logic_management_client.models.ErrorProperties """ _attribute_map = { @@ -3028,9 +3030,9 @@ class Expression(msrest.serialization.Model): :param value: Any object. :type value: object :param subexpressions: The sub expressions. - :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :type subexpressions: list[~logic_management_client.models.Expression] :param error: The azure resource error info. - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :type error: ~logic_management_client.models.AzureResourceErrorInfo """ _attribute_map = { @@ -3064,9 +3066,9 @@ class ExpressionRoot(Expression): :param value: Any object. :type value: object :param subexpressions: The sub expressions. - :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :type subexpressions: list[~logic_management_client.models.Expression] :param error: The azure resource error info. - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :type error: ~logic_management_client.models.AzureResourceErrorInfo :param path: The path. :type path: str """ @@ -3097,7 +3099,7 @@ class ExpressionTraces(msrest.serialization.Model): """The expression traces. :param inputs: - :type inputs: list[~azure.mgmt.logic.models.ExpressionRoot] + :type inputs: list[~logic_management_client.models.ExpressionRoot] """ _attribute_map = { @@ -3121,11 +3123,11 @@ class ExtendedErrorInfo(msrest.serialization.Model): :param code: Required. The error code. Possible values include: "NotSpecified", "IntegrationServiceEnvironmentNotFound", "InternalServerError", "InvalidOperationId". - :type code: str or ~azure.mgmt.logic.models.ErrorResponseCode + :type code: str or ~logic_management_client.models.ErrorResponseCode :param message: Required. The error message. :type message: str :param details: The error message details. - :type details: list[~azure.mgmt.logic.models.ExtendedErrorInfo] + :type details: list[~logic_management_client.models.ExtendedErrorInfo] :param inner_error: The inner error. :type inner_error: object """ @@ -3162,13 +3164,13 @@ class FlowAccessControlConfiguration(msrest.serialization.Model): """The access control configuration. :param triggers: The access control configuration for invoking workflow triggers. - :type triggers: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy :param contents: The access control configuration for accessing workflow run contents. - :type contents: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy :param actions: The access control configuration for workflow actions. - :type actions: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy :param workflow_management: The access control configuration for workflow management. - :type workflow_management: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy """ _attribute_map = { @@ -3198,9 +3200,10 @@ class FlowAccessControlConfigurationPolicy(msrest.serialization.Model): """The access control configuration policy. :param allowed_caller_ip_addresses: The allowed caller IP address ranges. - :type allowed_caller_ip_addresses: list[~azure.mgmt.logic.models.IpAddressRange] + :type allowed_caller_ip_addresses: list[~logic_management_client.models.IpAddressRange] :param open_authentication_policies: The authentication policies for workflow. - :type open_authentication_policies: ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicies + :type open_authentication_policies: + ~logic_management_client.models.OpenAuthenticationAccessPolicies """ _attribute_map = { @@ -3224,9 +3227,9 @@ class FlowEndpoints(msrest.serialization.Model): """The flow endpoints configuration. :param outgoing_ip_addresses: The outgoing ip address. - :type outgoing_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] + :type outgoing_ip_addresses: list[~logic_management_client.models.IpAddress] :param access_endpoint_ip_addresses: The access endpoint ip address. - :type access_endpoint_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] + :type access_endpoint_ip_addresses: list[~logic_management_client.models.IpAddress] """ _attribute_map = { @@ -3250,9 +3253,9 @@ class FlowEndpointsConfiguration(msrest.serialization.Model): """The endpoints configuration. :param workflow: The workflow endpoints. - :type workflow: ~azure.mgmt.logic.models.FlowEndpoints + :type workflow: ~logic_management_client.models.FlowEndpoints :param connector: The connector endpoints. - :type connector: ~azure.mgmt.logic.models.FlowEndpoints + :type connector: ~logic_management_client.models.FlowEndpoints """ _attribute_map = { @@ -3299,7 +3302,7 @@ class GetCallbackUrlParameters(msrest.serialization.Model): :param not_after: The expiry time. :type not_after: ~datetime.datetime :param key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :type key_type: str or ~azure.mgmt.logic.models.KeyType + :type key_type: str or ~logic_management_client.models.KeyType """ _attribute_map = { @@ -3335,12 +3338,13 @@ class IntegrationAccount(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku + :type sku: ~logic_management_client.models.IntegrationAccountSku :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment + :type integration_service_environment: + ~logic_management_client.models.IntegrationServiceEnvironment :param state: The workflow state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState """ _validation = { @@ -3401,7 +3405,7 @@ class IntegrationAccountAgreement(Resource): :type metadata: object :param agreement_type: Required. The agreement type. Possible values include: "NotSpecified", "AS2", "X12", "Edifact". - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :type agreement_type: str or ~logic_management_client.models.AgreementType :param host_partner: Required. The integration account partner that is set as host partner for this agreement. :type host_partner: str @@ -3409,11 +3413,11 @@ class IntegrationAccountAgreement(Resource): for this agreement. :type guest_partner: str :param host_identity: Required. The business identity of the host partner. - :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type host_identity: ~logic_management_client.models.BusinessIdentity :param guest_identity: Required. The business identity of the guest partner. - :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type guest_identity: ~logic_management_client.models.BusinessIdentity :param content: Required. The agreement content. - :type content: ~azure.mgmt.logic.models.AgreementContent + :type content: ~logic_management_client.models.AgreementContent """ _validation = { @@ -3480,7 +3484,7 @@ class IntegrationAccountAgreementFilter(msrest.serialization.Model): :param agreement_type: Required. The agreement type of integration account agreement. Possible values include: "NotSpecified", "AS2", "X12", "Edifact". - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :type agreement_type: str or ~logic_management_client.models.AgreementType """ _validation = { @@ -3505,7 +3509,7 @@ class IntegrationAccountAgreementListResult(msrest.serialization.Model): """The list of integration account agreements. :param value: The list of integration account agreements. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountAgreement] + :type value: list[~logic_management_client.models.IntegrationAccountAgreement] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3549,7 +3553,7 @@ class IntegrationAccountCertificate(Resource): :param metadata: The metadata. :type metadata: object :param key: The key details in the key vault. - :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference + :type key: ~logic_management_client.models.KeyVaultKeyReference :param public_certificate: The public certificate. :type public_certificate: str """ @@ -3597,7 +3601,7 @@ class IntegrationAccountCertificateListResult(msrest.serialization.Model): """The list of integration account certificates. :param value: The list of integration account certificates. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountCertificate] + :type value: list[~logic_management_client.models.IntegrationAccountCertificate] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3623,7 +3627,7 @@ class IntegrationAccountListResult(msrest.serialization.Model): """The list of integration accounts. :param value: The list of integration accounts. - :type value: list[~azure.mgmt.logic.models.IntegrationAccount] + :type value: list[~logic_management_client.models.IntegrationAccount] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3664,10 +3668,10 @@ class IntegrationAccountMap(Resource): :type tags: dict[str, str] :param map_type: Required. The map type. Possible values include: "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". - :type map_type: str or ~azure.mgmt.logic.models.MapType + :type map_type: str or ~logic_management_client.models.MapType :param parameters_schema: The parameters schema of integration account map. :type parameters_schema: - ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema + ~logic_management_client.models.IntegrationAccountMapPropertiesParametersSchema :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. @@ -3677,7 +3681,7 @@ class IntegrationAccountMap(Resource): :param content_type: The content type. :type content_type: str :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink + :vartype content_link: ~logic_management_client.models.ContentLink :param metadata: The metadata. :type metadata: object """ @@ -3738,7 +3742,7 @@ class IntegrationAccountMapFilter(msrest.serialization.Model): :param map_type: Required. The map type of integration account map. Possible values include: "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". - :type map_type: str or ~azure.mgmt.logic.models.MapType + :type map_type: str or ~logic_management_client.models.MapType """ _validation = { @@ -3763,7 +3767,7 @@ class IntegrationAccountMapListResult(msrest.serialization.Model): """The list of integration account maps. :param value: The list of integration account maps. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountMap] + :type value: list[~logic_management_client.models.IntegrationAccountMap] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3825,7 +3829,7 @@ class IntegrationAccountPartner(Resource): :type tags: dict[str, str] :param partner_type: Required. The partner type. Possible values include: "NotSpecified", "B2B". - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :type partner_type: str or ~logic_management_client.models.PartnerType :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. @@ -3833,7 +3837,7 @@ class IntegrationAccountPartner(Resource): :param metadata: The metadata. :type metadata: object :param content: Required. The partner content. - :type content: ~azure.mgmt.logic.models.PartnerContent + :type content: ~logic_management_client.models.PartnerContent """ _validation = { @@ -3884,7 +3888,7 @@ class IntegrationAccountPartnerFilter(msrest.serialization.Model): :param partner_type: Required. The partner type of integration account partner. Possible values include: "NotSpecified", "B2B". - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :type partner_type: str or ~logic_management_client.models.PartnerType """ _validation = { @@ -3909,7 +3913,7 @@ class IntegrationAccountPartnerListResult(msrest.serialization.Model): """The list of integration account partners. :param value: The list of integration account partners. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountPartner] + :type value: list[~logic_management_client.models.IntegrationAccountPartner] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -3949,7 +3953,7 @@ class IntegrationAccountSchema(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param schema_type: Required. The schema type. Possible values include: "NotSpecified", "Xml". - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + :type schema_type: str or ~logic_management_client.models.SchemaType :param target_namespace: The target namespace of the schema. :type target_namespace: str :param document_name: The document name. @@ -3967,7 +3971,7 @@ class IntegrationAccountSchema(Resource): :param content_type: The content type. :type content_type: str :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink + :vartype content_link: ~logic_management_client.models.ContentLink """ _validation = { @@ -4032,7 +4036,7 @@ class IntegrationAccountSchemaFilter(msrest.serialization.Model): :param schema_type: Required. The schema type of integration account schema. Possible values include: "NotSpecified", "Xml". - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + :type schema_type: str or ~logic_management_client.models.SchemaType """ _validation = { @@ -4057,7 +4061,7 @@ class IntegrationAccountSchemaListResult(msrest.serialization.Model): """The list of integration account schemas. :param value: The list of integration account schemas. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountSchema] + :type value: list[~logic_management_client.models.IntegrationAccountSchema] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -4166,7 +4170,7 @@ class IntegrationAccountSessionListResult(msrest.serialization.Model): """The list of integration account sessions. :param value: The list of integration account sessions. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountSession] + :type value: list[~logic_management_client.models.IntegrationAccountSession] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -4195,7 +4199,7 @@ class IntegrationAccountSku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "NotSpecified", "Free", "Basic", "Standard". - :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + :type name: str or ~logic_management_client.models.IntegrationAccountSkuName """ _validation = { @@ -4216,6 +4220,59 @@ def __init__( self.name = name +class IntegrationServiceEnvironmenEncryptionConfiguration(msrest.serialization.Model): + """The encryption configuration for the integration service environment. + + :param encryption_key_reference: The encryption key reference. + :type encryption_key_reference: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionKeyReference + """ + + _attribute_map = { + 'encryption_key_reference': {'key': 'encryptionKeyReference', 'type': 'IntegrationServiceEnvironmenEncryptionKeyReference'}, + } + + def __init__( + self, + *, + encryption_key_reference: Optional["IntegrationServiceEnvironmenEncryptionKeyReference"] = None, + **kwargs + ): + super(IntegrationServiceEnvironmenEncryptionConfiguration, self).__init__(**kwargs) + self.encryption_key_reference = encryption_key_reference + + +class IntegrationServiceEnvironmenEncryptionKeyReference(msrest.serialization.Model): + """The encryption key details for the integration service environment. + + :param key_vault: The key vault reference. + :type key_vault: ~logic_management_client.models.ResourceReference + :param key_name: Gets the key name in the Key Vault. + :type key_name: str + :param key_version: Gets the version of the key specified in the keyName property. + :type key_version: str + """ + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'ResourceReference'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + key_vault: Optional["ResourceReference"] = None, + key_name: Optional[str] = None, + key_version: Optional[str] = None, + **kwargs + ): + super(IntegrationServiceEnvironmenEncryptionKeyReference, self).__init__(**kwargs) + self.key_vault = key_vault + self.key_name = key_name + self.key_version = key_version + + class IntegrationServiceEnvironment(Resource): """The integration service environment. @@ -4232,9 +4289,9 @@ class IntegrationServiceEnvironment(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: The integration service environment properties. - :type properties: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentProperties + :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku """ _validation = { @@ -4272,7 +4329,8 @@ class IntegrationServiceEnvironmentAccessEndpoint(msrest.serialization.Model): :param type: The access endpoint type. Possible values include: "NotSpecified", "External", "Internal". - :type type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpointType + :type type: str or + ~logic_management_client.models.IntegrationServiceEnvironmentAccessEndpointType """ _attribute_map = { @@ -4293,7 +4351,7 @@ class IntegrationServiceEnvironmentListResult(msrest.serialization.Model): """The list of integration service environments. :param value: - :type value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironment] + :type value: list[~logic_management_client.models.IntegrationServiceEnvironment] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -4323,11 +4381,12 @@ class IntegrationServiceEnvironmentNetworkDependency(msrest.serialization.Model) "DiagnosticLogsAndMetrics", "IntegrationServiceEnvironmentConnectors", "RedisCache", "AccessEndpoints", "RecoveryService", "SQL", "RegionalService". :type category: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyCategoryType + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkDependencyCategoryType :param display_name: The display name. :type display_name: str :param endpoints: The endpoints. - :type endpoints: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndpoint] + :type endpoints: + list[~logic_management_client.models.IntegrationServiceEnvironmentNetworkEndpoint] """ _attribute_map = { @@ -4354,11 +4413,11 @@ class IntegrationServiceEnvironmentNetworkDependencyHealth(msrest.serialization. """The integration service environment subnet network health. :param error: The error if any occurred during the operation. - :type error: ~azure.mgmt.logic.models.ExtendedErrorInfo + :type error: ~logic_management_client.models.ExtendedErrorInfo :param state: The network dependency health state. Possible values include: "NotSpecified", "Healthy", "Unhealthy", "Unknown". :type state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealthState + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkDependencyHealthState """ _attribute_map = { @@ -4384,7 +4443,7 @@ class IntegrationServiceEnvironmentNetworkEndpoint(msrest.serialization.Model): :param accessibility: The accessibility state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". :type accessibility: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState :param domain_name: The domain name. :type domain_name: str :param ports: The ports. @@ -4418,16 +4477,19 @@ class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :param state: The integration service environment state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState :param integration_service_environment_id: Gets the tracking id. :type integration_service_environment_id: str :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration :param network_configuration: The network configuration. - :type network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration """ _attribute_map = { @@ -4436,6 +4498,7 @@ class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): 'integration_service_environment_id': {'key': 'integrationServiceEnvironmentId', 'type': 'str'}, 'endpoints_configuration': {'key': 'endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, 'network_configuration': {'key': 'networkConfiguration', 'type': 'NetworkConfiguration'}, + 'encryption_configuration': {'key': 'encryptionConfiguration', 'type': 'IntegrationServiceEnvironmenEncryptionConfiguration'}, } def __init__( @@ -4446,6 +4509,7 @@ def __init__( integration_service_environment_id: Optional[str] = None, endpoints_configuration: Optional["FlowEndpointsConfiguration"] = None, network_configuration: Optional["NetworkConfiguration"] = None, + encryption_configuration: Optional["IntegrationServiceEnvironmenEncryptionConfiguration"] = None, **kwargs ): super(IntegrationServiceEnvironmentProperties, self).__init__(**kwargs) @@ -4454,13 +4518,14 @@ def __init__( self.integration_service_environment_id = integration_service_environment_id self.endpoints_configuration = endpoints_configuration self.network_configuration = network_configuration + self.encryption_configuration = encryption_configuration class IntegrationServiceEnvironmentSku(msrest.serialization.Model): """The integration service environment sku. :param name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :type name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName + :type name: str or ~logic_management_client.models.IntegrationServiceEnvironmentSkuName :param capacity: The sku capacity. :type capacity: int """ @@ -4492,7 +4557,8 @@ class IntegrationServiceEnvironmentSkuCapacity(msrest.serialization.Model): :param default: The default capacity. :type default: int :param scale_type: The sku scale type. Possible values include: "Manual", "Automatic", "None". - :type scale_type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuScaleType + :type scale_type: str or + ~logic_management_client.models.IntegrationServiceEnvironmentSkuScaleType """ _attribute_map = { @@ -4524,9 +4590,9 @@ class IntegrationServiceEnvironmentSkuDefinition(msrest.serialization.Model): :param resource_type: The resource type. :type resource_type: str :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinitionSku + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSkuDefinitionSku :param capacity: The sku capacity. - :type capacity: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuCapacity + :type capacity: ~logic_management_client.models.IntegrationServiceEnvironmentSkuCapacity """ _attribute_map = { @@ -4553,7 +4619,7 @@ class IntegrationServiceEnvironmentSkuDefinitionSku(msrest.serialization.Model): """The sku. :param name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :type name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName + :type name: str or ~logic_management_client.models.IntegrationServiceEnvironmentSkuName :param tier: The sku tier. :type tier: str """ @@ -4579,7 +4645,7 @@ class IntegrationServiceEnvironmentSkuList(msrest.serialization.Model): """The list of integration service environment skus. :param value: The list of integration service environment skus. - :type value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinition] + :type value: list[~logic_management_client.models.IntegrationServiceEnvironmentSkuDefinition] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -4608,14 +4674,14 @@ class IntegrationServiceEnvironmentSubnetNetworkHealth(msrest.serialization.Mode :param outbound_network_dependencies: The outbound network dependencies. :type outbound_network_dependencies: - list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependency] + list[~logic_management_client.models.IntegrationServiceEnvironmentNetworkDependency] :param outbound_network_health: The integration service environment network health. :type outbound_network_health: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealth + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkDependencyHealth :param network_dependency_health_state: Required. The integration service environment network health state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". :type network_dependency_health_state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState + ~logic_management_client.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState """ _validation = { @@ -4716,7 +4782,7 @@ class KeyVaultKey(msrest.serialization.Model): :param kid: The key id. :type kid: str :param attributes: The key attributes. - :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + :type attributes: ~logic_management_client.models.KeyVaultKeyAttributes """ _attribute_map = { @@ -4771,7 +4837,7 @@ class KeyVaultKeyCollection(msrest.serialization.Model): """Collection of key vault keys. :param value: The key vault keys. - :type value: list[~azure.mgmt.logic.models.KeyVaultKey] + :type value: list[~logic_management_client.models.KeyVaultKey] :param skip_token: The skip token. :type skip_token: str """ @@ -4799,7 +4865,7 @@ class KeyVaultKeyReference(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :type key_vault: ~logic_management_client.models.KeyVaultKeyReferenceKeyVault :param key_name: Required. The private key name in key vault. :type key_name: str :param key_version: The private key version in key vault. @@ -4874,31 +4940,30 @@ class KeyVaultReference(ResourceReference): :param id: The resource id. :type id: str + :ivar name: Gets the resource name. + :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param name: The key vault name. - :type name: str """ _validation = { + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, *, id: Optional[str] = None, - name: Optional[str] = None, **kwargs ): super(KeyVaultReference, self).__init__(id=id, **kwargs) - self.name = name class ListKeyVaultKeysDefinition(msrest.serialization.Model): @@ -4907,7 +4972,7 @@ class ListKeyVaultKeysDefinition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :type key_vault: ~logic_management_client.models.KeyVaultReference :param skip_token: The skip token. :type skip_token: str """ @@ -4949,7 +5014,7 @@ class ManagedApi(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: The api resource properties. - :type properties: ~azure.mgmt.logic.models.ApiResourceProperties + :type properties: ~logic_management_client.models.ApiResourceProperties """ _validation = { @@ -4983,7 +5048,7 @@ class ManagedApiListResult(msrest.serialization.Model): """The list of managed APIs. :param value: The managed APIs. - :type value: list[~azure.mgmt.logic.models.ManagedApi] + :type value: list[~logic_management_client.models.ManagedApi] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -5011,9 +5076,10 @@ class NetworkConfiguration(msrest.serialization.Model): :param virtual_network_address_space: Gets the virtual network address space. :type virtual_network_address_space: str :param access_endpoint: The access endpoint. - :type access_endpoint: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpoint + :type access_endpoint: + ~logic_management_client.models.IntegrationServiceEnvironmentAccessEndpoint :param subnets: The subnets. - :type subnets: list[~azure.mgmt.logic.models.ResourceReference] + :type subnets: list[~logic_management_client.models.ResourceReference] """ _attribute_map = { @@ -5040,7 +5106,7 @@ class OpenAuthenticationAccessPolicies(msrest.serialization.Model): """AuthenticationPolicy of type Open. :param policies: Open authentication policies. - :type policies: dict[str, ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicy] + :type policies: dict[str, ~logic_management_client.models.OpenAuthenticationAccessPolicy] """ _attribute_map = { @@ -5062,14 +5128,14 @@ class OpenAuthenticationAccessPolicy(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: Type of provider for OAuth. Default value: "AAD". - :vartype type: str + :ivar type: Type of provider for OAuth. Possible values include: "AAD". + :vartype type: str or ~logic_management_client.models.OpenAuthenticationProviderType :param claims: The access policy claims. - :type claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] + :type claims: list[~logic_management_client.models.OpenAuthenticationPolicyClaim] """ _validation = { - 'type': {'readonly': True, 'constant': True}, + 'type': {'readonly': True}, } _attribute_map = { @@ -5077,8 +5143,6 @@ class OpenAuthenticationAccessPolicy(msrest.serialization.Model): 'claims': {'key': 'claims', 'type': '[OpenAuthenticationPolicyClaim]'}, } - type = "AAD" - def __init__( self, *, @@ -5124,7 +5188,7 @@ class Operation(msrest.serialization.Model): :param name: Operation name: {provider}/{resource}/{operation}. :type name: str :param display: The object that represents the operation. - :type display: ~azure.mgmt.logic.models.OperationDisplay + :type display: ~logic_management_client.models.OperationDisplay :param properties: The properties. :type properties: object """ @@ -5192,7 +5256,7 @@ class OperationListResult(msrest.serialization.Model): """Result of the request to list Logic operations. It contains a list of operations and a URL link to get the next set of results. :param value: List of Logic operations supported by the Logic resource provider. - :type value: list[~azure.mgmt.logic.models.Operation] + :type value: list[~logic_management_client.models.Operation] :param next_link: URL to get the next set of operation list results if there are any. :type next_link: str """ @@ -5222,11 +5286,11 @@ class OperationResultProperties(msrest.serialization.Model): :param end_time: The end time of the workflow scope repetition. :type end_time: ~datetime.datetime :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :param status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus :param code: The workflow scope repetition code. :type code: str :param error: Any object. @@ -5272,11 +5336,11 @@ class OperationResult(OperationResultProperties): :param end_time: The end time of the workflow scope repetition. :type end_time: ~datetime.datetime :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :param status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus :param code: The workflow scope repetition code. :type code: str :param error: Any object. @@ -5286,15 +5350,15 @@ class OperationResult(OperationResultProperties): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :type retry_history: list[~logic_management_client.models.RetryHistory] :param iteration_count: :type iteration_count: int """ @@ -5353,7 +5417,7 @@ class PartnerContent(msrest.serialization.Model): """The integration account partner content. :param b2_b: The B2B partner content. - :type b2_b: ~azure.mgmt.logic.models.B2BPartnerContent + :type b2_b: ~logic_management_client.models.B2BPartnerContent """ _attribute_map = { @@ -5378,11 +5442,11 @@ class RecurrenceSchedule(msrest.serialization.Model): :param hours: The hours. :type hours: list[int] :param week_days: The days of the week. - :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] + :type week_days: list[str or ~logic_management_client.models.DaysOfWeek] :param month_days: The month days. :type month_days: list[int] :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] + :type monthly_occurrences: list[~logic_management_client.models.RecurrenceScheduleOccurrence] """ _attribute_map = { @@ -5416,7 +5480,7 @@ class RecurrenceScheduleOccurrence(msrest.serialization.Model): :param day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday". - :type day: str or ~azure.mgmt.logic.models.DayOfWeek + :type day: str or ~logic_management_client.models.DayOfWeek :param occurrence: The occurrence. :type occurrence: int """ @@ -5442,7 +5506,7 @@ class RegenerateActionParameter(msrest.serialization.Model): """The access key regenerate action content. :param key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :type key_type: str or ~azure.mgmt.logic.models.KeyType + :type key_type: str or ~logic_management_client.models.KeyType """ _attribute_map = { @@ -5538,7 +5602,7 @@ class RequestHistory(Resource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param properties: The request history properties. - :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties + :type properties: ~logic_management_client.models.RequestHistoryProperties """ _validation = { @@ -5572,7 +5636,7 @@ class RequestHistoryListResult(msrest.serialization.Model): """The list of workflow request histories. :param value: A list of workflow request histories. - :type value: list[~azure.mgmt.logic.models.RequestHistory] + :type value: list[~logic_management_client.models.RequestHistory] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -5602,9 +5666,9 @@ class RequestHistoryProperties(msrest.serialization.Model): :param end_time: The time the request ended. :type end_time: ~datetime.datetime :param request: The request. - :type request: ~azure.mgmt.logic.models.Request + :type request: ~logic_management_client.models.Request :param response: The response. - :type response: ~azure.mgmt.logic.models.Response + :type response: ~logic_management_client.models.Response """ _attribute_map = { @@ -5638,7 +5702,7 @@ class Response(msrest.serialization.Model): :param status_code: The status code of the response. :type status_code: int :param body_link: Details on the location of the body content. - :type body_link: ~azure.mgmt.logic.models.ContentLink + :type body_link: ~logic_management_client.models.ContentLink """ _attribute_map = { @@ -5675,7 +5739,7 @@ class RetryHistory(msrest.serialization.Model): :param service_request_id: Gets the service request Id. :type service_request_id: str :param error: Gets the error response. - :type error: ~azure.mgmt.logic.models.ErrorResponse + :type error: ~logic_management_client.models.ErrorResponse """ _attribute_map = { @@ -5768,7 +5832,7 @@ class SetTriggerStateActionDefinition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param source: Required. The source. - :type source: ~azure.mgmt.logic.models.WorkflowTriggerReference + :type source: ~logic_management_client.models.WorkflowTriggerReference """ _validation = { @@ -5796,9 +5860,9 @@ class Sku(msrest.serialization.Model): :param name: Required. The name. Possible values include: "NotSpecified", "Free", "Shared", "Basic", "Standard", "Premium". - :type name: str or ~azure.mgmt.logic.models.SkuName + :type name: str or ~logic_management_client.models.SkuName :param plan: The reference to plan. - :type plan: ~azure.mgmt.logic.models.ResourceReference + :type plan: ~logic_management_client.models.ResourceReference """ _validation = { @@ -5863,7 +5927,7 @@ class SwaggerCustomDynamicList(msrest.serialization.Model): item. :type item_title_path: str :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] + :type parameters: dict[str, ~logic_management_client.models.SwaggerCustomDynamicProperties] """ _attribute_map = { @@ -5903,7 +5967,7 @@ class SwaggerCustomDynamicProperties(msrest.serialization.Model): :param value_path: Json pointer to the dynamic schema on the response body. :type value_path: str :param parameters: The operation parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] + :type parameters: dict[str, ~logic_management_client.models.SwaggerCustomDynamicProperties] """ _attribute_map = { @@ -5961,11 +6025,11 @@ class SwaggerCustomDynamicTree(msrest.serialization.Model): """The swagger custom dynamic tree. :param settings: The tree settings. - :type settings: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeSettings + :type settings: ~logic_management_client.models.SwaggerCustomDynamicTreeSettings :param open: The tree on-open configuration. - :type open: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand + :type open: ~logic_management_client.models.SwaggerCustomDynamicTreeCommand :param browse: The tree on-browse configuration. - :type browse: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand + :type browse: ~logic_management_client.models.SwaggerCustomDynamicTreeCommand """ _attribute_map = { @@ -6010,7 +6074,7 @@ class SwaggerCustomDynamicTreeCommand(msrest.serialization.Model): item. :type selectable_filter: str :param parameters: Dictionary of :code:``. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeParameter] + :type parameters: dict[str, ~logic_management_client.models.SwaggerCustomDynamicTreeParameter] """ _attribute_map = { @@ -6149,13 +6213,13 @@ class SwaggerSchema(msrest.serialization.Model): :type ref: str :param type: The type. Possible values include: "String", "Number", "Integer", "Boolean", "Array", "File", "Object", "Null". - :type type: str or ~azure.mgmt.logic.models.SwaggerSchemaType + :type type: str or ~logic_management_client.models.SwaggerSchemaType :param title: The title. :type title: str :param items: The items schema. - :type items: ~azure.mgmt.logic.models.SwaggerSchema + :type items: ~logic_management_client.models.SwaggerSchema :param properties: The object properties. - :type properties: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] + :type properties: dict[str, ~logic_management_client.models.SwaggerSchema] :param additional_properties: The additional properties. :type additional_properties: object :param required: The object required properties. @@ -6165,28 +6229,28 @@ class SwaggerSchema(msrest.serialization.Model): :param min_properties: The minimum number of allowed properties. :type min_properties: int :param all_of: The schemas which must pass validation when this schema is used. - :type all_of: list[~azure.mgmt.logic.models.SwaggerSchema] + :type all_of: list[~logic_management_client.models.SwaggerSchema] :param discriminator: The discriminator. :type discriminator: str :param read_only: Indicates whether this property must be present in the a request. :type read_only: bool :param xml: The xml representation format for a property. - :type xml: ~azure.mgmt.logic.models.SwaggerXml + :type xml: ~logic_management_client.models.SwaggerXml :param external_docs: The external documentation. - :type external_docs: ~azure.mgmt.logic.models.SwaggerExternalDocumentation + :type external_docs: ~logic_management_client.models.SwaggerExternalDocumentation :param example: The example value. :type example: object :param notification_url_extension: Indicates the notification url extension. If this is set, the property's value should be a callback url for a webhook. :type notification_url_extension: bool :param dynamic_schema_old: The dynamic schema configuration. - :type dynamic_schema_old: ~azure.mgmt.logic.models.SwaggerCustomDynamicSchema + :type dynamic_schema_old: ~logic_management_client.models.SwaggerCustomDynamicSchema :param dynamic_schema_new: The dynamic schema configuration. - :type dynamic_schema_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties + :type dynamic_schema_new: ~logic_management_client.models.SwaggerCustomDynamicProperties :param dynamic_list_new: The dynamic list. - :type dynamic_list_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicList + :type dynamic_list_new: ~logic_management_client.models.SwaggerCustomDynamicList :param dynamic_tree: The dynamic values tree configuration. - :type dynamic_tree: ~azure.mgmt.logic.models.SwaggerCustomDynamicTree + :type dynamic_tree: ~logic_management_client.models.SwaggerCustomDynamicTree """ _attribute_map = { @@ -6313,7 +6377,7 @@ class TrackingEvent(msrest.serialization.Model): :param event_level: Required. The event level. Possible values include: "LogAlways", "Critical", "Error", "Warning", "Informational", "Verbose". - :type event_level: str or ~azure.mgmt.logic.models.EventLevel + :type event_level: str or ~logic_management_client.models.EventLevel :param event_time: Required. The event time. :type event_time: ~datetime.datetime :param record_type: Required. The record type. Possible values include: "NotSpecified", @@ -6322,11 +6386,11 @@ class TrackingEvent(msrest.serialization.Model): "X12TransactionSetAcknowledgment", "EdifactInterchange", "EdifactFunctionalGroup", "EdifactTransactionSet", "EdifactInterchangeAcknowledgment", "EdifactFunctionalGroupAcknowledgment", "EdifactTransactionSetAcknowledgment". - :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :type record_type: str or ~logic_management_client.models.TrackingRecordType :param record: The record. :type record: object :param error: The error. - :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + :type error: ~logic_management_client.models.TrackingEventErrorInfo """ _validation = { @@ -6396,9 +6460,9 @@ class TrackingEventsDefinition(msrest.serialization.Model): :type source_type: str :param track_events_options: The track events options. Possible values include: "None", "DisableSourceInfoEnrich". - :type track_events_options: str or ~azure.mgmt.logic.models.TrackEventsOperationOptions + :type track_events_options: str or ~logic_management_client.models.TrackEventsOperationOptions :param events: Required. The events. - :type events: list[~azure.mgmt.logic.models.TrackingEvent] + :type events: list[~logic_management_client.models.TrackingEvent] """ _validation = { @@ -6445,32 +6509,32 @@ class Workflow(Resource): "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :vartype provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :ivar created_time: Gets the created time. :vartype created_time: ~datetime.datetime :ivar changed_time: Gets the changed time. :vartype changed_time: ~datetime.datetime :param state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration + :type access_control: ~logic_management_client.models.FlowAccessControlConfiguration :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku + :vartype sku: ~logic_management_client.models.Sku :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :type integration_account: ~logic_management_client.models.ResourceReference :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :type integration_service_environment: ~logic_management_client.models.ResourceReference :param definition: The definition. :type definition: object :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] """ _validation = { @@ -6541,7 +6605,7 @@ class WorkflowFilter(msrest.serialization.Model): :param state: The state of workflows. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState """ _attribute_map = { @@ -6562,7 +6626,7 @@ class WorkflowListResult(msrest.serialization.Model): """The list of workflows. :param value: The list of workflows. - :type value: list[~azure.mgmt.logic.models.Workflow] + :type value: list[~logic_management_client.models.Workflow] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -6589,7 +6653,7 @@ class WorkflowParameter(msrest.serialization.Model): :param type: The type. Possible values include: "NotSpecified", "String", "SecureString", "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :type type: str or ~azure.mgmt.logic.models.ParameterType + :type type: str or ~logic_management_client.models.ParameterType :param value: The value. :type value: object :param metadata: The metadata. @@ -6628,7 +6692,7 @@ class WorkflowOutputParameter(WorkflowParameter): :param type: The type. Possible values include: "NotSpecified", "String", "SecureString", "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :type type: str or ~azure.mgmt.logic.models.ParameterType + :type type: str or ~logic_management_client.models.ParameterType :param value: The value. :type value: object :param metadata: The metadata. @@ -6671,31 +6735,30 @@ class WorkflowReference(ResourceReference): :param id: The resource id. :type id: str + :ivar name: Gets the resource name. + :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param name: The workflow name. - :type name: str """ _validation = { + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, *, id: Optional[str] = None, - name: Optional[str] = None, **kwargs ): super(WorkflowReference, self).__init__(id=id, **kwargs) - self.name = name class WorkflowRun(SubResource): @@ -6718,7 +6781,7 @@ class WorkflowRun(SubResource): :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -6726,15 +6789,15 @@ class WorkflowRun(SubResource): :ivar correlation_id: Gets the correlation id. :vartype correlation_id: str :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation + :type correlation: ~logic_management_client.models.Correlation :ivar workflow: Gets the reference to workflow version. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :vartype workflow: ~logic_management_client.models.ResourceReference :ivar trigger: Gets the fired trigger. - :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger + :vartype trigger: ~logic_management_client.models.WorkflowRunTrigger :ivar outputs: Gets the outputs. - :vartype outputs: dict[str, ~azure.mgmt.logic.models.WorkflowOutputParameter] + :vartype outputs: dict[str, ~logic_management_client.models.WorkflowOutputParameter] :ivar response: Gets the response of the flow run. - :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger + :vartype response: ~logic_management_client.models.WorkflowRunTrigger """ _validation = { @@ -6813,7 +6876,7 @@ class WorkflowRunAction(SubResource): :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -6821,15 +6884,15 @@ class WorkflowRunAction(SubResource): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :type retry_history: list[~logic_management_client.models.RetryHistory] """ _validation = { @@ -6893,7 +6956,7 @@ class WorkflowRunActionFilter(msrest.serialization.Model): :param status: The status of workflow run action. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus """ _attribute_map = { @@ -6914,7 +6977,7 @@ class WorkflowRunActionListResult(msrest.serialization.Model): """The list of workflow run actions. :param value: A list of workflow run actions. - :type value: list[~azure.mgmt.logic.models.WorkflowRunAction] + :type value: list[~logic_management_client.models.WorkflowRunAction] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -6956,11 +7019,11 @@ class WorkflowRunActionRepetitionDefinition(Resource): :param end_time: The end time of the workflow scope repetition. :type end_time: ~datetime.datetime :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :param status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus :param code: The workflow scope repetition code. :type code: str :param error: Any object. @@ -6970,19 +7033,19 @@ class WorkflowRunActionRepetitionDefinition(Resource): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :type retry_history: list[~logic_management_client.models.RetryHistory] :param iteration_count: :type iteration_count: int :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + :type repetition_indexes: list[~logic_management_client.models.RepetitionIndex] """ _validation = { @@ -7060,7 +7123,7 @@ class WorkflowRunActionRepetitionDefinitionCollection(msrest.serialization.Model :param next_link: The link used to get the next page of recommendations. :type next_link: str :param value: - :type value: list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + :type value: list[~logic_management_client.models.WorkflowRunActionRepetitionDefinition] """ _attribute_map = { @@ -7090,11 +7153,11 @@ class WorkflowRunActionRepetitionProperties(OperationResult): :param end_time: The end time of the workflow scope repetition. :type end_time: ~datetime.datetime :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :type correlation: ~logic_management_client.models.RunActionCorrelation :param status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus :param code: The workflow scope repetition code. :type code: str :param error: Any object. @@ -7104,19 +7167,19 @@ class WorkflowRunActionRepetitionProperties(OperationResult): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :type retry_history: list[~logic_management_client.models.RetryHistory] :param iteration_count: :type iteration_count: int :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + :type repetition_indexes: list[~logic_management_client.models.RepetitionIndex] """ _validation = { @@ -7170,7 +7233,7 @@ class WorkflowRunFilter(msrest.serialization.Model): :param status: The status of workflow run. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus """ _attribute_map = { @@ -7191,7 +7254,7 @@ class WorkflowRunListResult(msrest.serialization.Model): """The list of workflow runs. :param value: A list of workflow runs. - :type value: list[~azure.mgmt.logic.models.WorkflowRun] + :type value: list[~logic_management_client.models.WorkflowRun] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -7223,11 +7286,11 @@ class WorkflowRunTrigger(msrest.serialization.Model): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar scheduled_time: Gets the scheduled time. :vartype scheduled_time: ~datetime.datetime :ivar start_time: Gets the start time. @@ -7237,13 +7300,13 @@ class WorkflowRunTrigger(msrest.serialization.Model): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation + :type correlation: ~logic_management_client.models.Correlation :ivar code: Gets the code. :vartype code: str :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar error: Gets the error. :vartype error: object :ivar tracked_properties: Gets the tracked properties. @@ -7321,26 +7384,27 @@ class WorkflowTrigger(SubResource): "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState + :vartype provisioning_state: str or + ~logic_management_client.models.WorkflowTriggerProvisioningState :ivar created_time: Gets the created time. :vartype created_time: ~datetime.datetime :ivar changed_time: Gets the changed time. :vartype changed_time: ~datetime.datetime :ivar state: Gets the state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState + :vartype state: str or ~logic_management_client.models.WorkflowState :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar last_execution_time: Gets the last execution time. :vartype last_execution_time: ~datetime.datetime :ivar next_execution_time: Gets the next execution time. :vartype next_execution_time: ~datetime.datetime :ivar recurrence: Gets the workflow trigger recurrence. - :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + :vartype recurrence: ~logic_management_client.models.WorkflowTriggerRecurrence :ivar workflow: Gets the reference to workflow. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :vartype workflow: ~logic_management_client.models.ResourceReference """ _validation = { @@ -7408,7 +7472,7 @@ class WorkflowTriggerCallbackUrl(msrest.serialization.Model): parameters. :type relative_path_parameters: list[str] :param queries: Gets the workflow trigger callback URL query parameters. - :type queries: ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries + :type queries: ~logic_management_client.models.WorkflowTriggerListCallbackUrlQueries """ _validation = { @@ -7448,7 +7512,7 @@ class WorkflowTriggerFilter(msrest.serialization.Model): :param state: The state of workflow trigger. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState """ _attribute_map = { @@ -7485,7 +7549,7 @@ class WorkflowTriggerHistory(SubResource): :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~logic_management_client.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -7493,15 +7557,15 @@ class WorkflowTriggerHistory(SubResource): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation + :type correlation: ~logic_management_client.models.Correlation :ivar inputs_link: Gets the link to input parameters. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype inputs_link: ~logic_management_client.models.ContentLink :ivar outputs_link: Gets the link to output parameters. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :vartype outputs_link: ~logic_management_client.models.ContentLink :ivar fired: The value indicating whether trigger was fired. :vartype fired: bool :ivar run: Gets the reference to workflow run. - :vartype run: ~azure.mgmt.logic.models.ResourceReference + :vartype run: ~logic_management_client.models.ResourceReference """ _validation = { @@ -7568,7 +7632,7 @@ class WorkflowTriggerHistoryFilter(msrest.serialization.Model): :param status: The status of workflow trigger history. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :type status: str or ~logic_management_client.models.WorkflowStatus """ _attribute_map = { @@ -7589,7 +7653,7 @@ class WorkflowTriggerHistoryListResult(msrest.serialization.Model): """The list of workflow trigger histories. :param value: A list of workflow trigger histories. - :type value: list[~azure.mgmt.logic.models.WorkflowTriggerHistory] + :type value: list[~logic_management_client.models.WorkflowTriggerHistory] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -7656,7 +7720,7 @@ class WorkflowTriggerListResult(msrest.serialization.Model): """The list of workflow triggers. :param value: A list of workflow triggers. - :type value: list[~azure.mgmt.logic.models.WorkflowTrigger] + :type value: list[~logic_management_client.models.WorkflowTrigger] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -7683,7 +7747,7 @@ class WorkflowTriggerRecurrence(msrest.serialization.Model): :param frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", "Hour", "Day", "Week", "Month", "Year". - :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency + :type frequency: str or ~logic_management_client.models.RecurrenceFrequency :param interval: The interval. :type interval: int :param start_time: The start time. @@ -7693,7 +7757,7 @@ class WorkflowTriggerRecurrence(msrest.serialization.Model): :param time_zone: The time zone. :type time_zone: str :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + :type schedule: ~logic_management_client.models.RecurrenceSchedule """ _attribute_map = { @@ -7732,10 +7796,10 @@ class WorkflowTriggerReference(ResourceReference): :param id: The resource id. :type id: str + :ivar name: Gets the resource name. + :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param name: The workflow trigger resource reference name. - :type name: str :param flow_name: The workflow name. :type flow_name: str :param trigger_name: The workflow trigger name. @@ -7743,13 +7807,14 @@ class WorkflowTriggerReference(ResourceReference): """ _validation = { + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'flow_name': {'key': 'flowName', 'type': 'str'}, 'trigger_name': {'key': 'triggerName', 'type': 'str'}, } @@ -7758,13 +7823,11 @@ def __init__( self, *, id: Optional[str] = None, - name: Optional[str] = None, flow_name: Optional[str] = None, trigger_name: Optional[str] = None, **kwargs ): super(WorkflowTriggerReference, self).__init__(id=id, **kwargs) - self.name = name self.flow_name = flow_name self.trigger_name = trigger_name @@ -7788,30 +7851,30 @@ class WorkflowVersion(Resource): "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :vartype provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState :ivar created_time: Gets the created time. :vartype created_time: ~datetime.datetime :ivar changed_time: Gets the changed time. :vartype changed_time: ~datetime.datetime :param state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :type state: str or ~logic_management_client.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration + :type access_control: ~logic_management_client.models.FlowAccessControlConfiguration :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku + :vartype sku: ~logic_management_client.models.Sku :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :type integration_account: ~logic_management_client.models.ResourceReference :param definition: The definition. :type definition: object :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] """ _validation = { @@ -7878,7 +7941,7 @@ class WorkflowVersionListResult(msrest.serialization.Model): """The list of workflow versions. :param value: A list of workflow versions. - :type value: list[~azure.mgmt.logic.models.WorkflowVersion] + :type value: list[~logic_management_client.models.WorkflowVersion] :param next_link: The URL to get the next set of results. :type next_link: str """ @@ -8050,9 +8113,9 @@ class X12AgreementContent(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param receive_agreement: Required. The X12 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :type receive_agreement: ~logic_management_client.models.X12OneWayAgreement :param send_agreement: Required. The X12 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :type send_agreement: ~logic_management_client.models.X12OneWayAgreement """ _validation = { @@ -8094,7 +8157,7 @@ class X12DelimiterOverrides(msrest.serialization.Model): :type segment_terminator: int :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :type segment_terminator_suffix: str or ~logic_management_client.models.SegmentTerminatorSuffix :param replace_character: Required. The replacement character. :type replace_character: int :param replace_separators_in_payload: Required. The value indicating whether to replace @@ -8177,10 +8240,10 @@ class X12EnvelopeOverride(msrest.serialization.Model): :type functional_identifier_code: str :param date_format: Required. The date format. Possible values include: "NotSpecified", "CCYYMMDD", "YYMMDD". - :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :type date_format: str or ~logic_management_client.models.X12DateFormat :param time_format: Required. The time format. Possible values include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + :type time_format: str or ~logic_management_client.models.X12TimeFormat """ _validation = { @@ -8295,13 +8358,13 @@ class X12EnvelopeSettings(msrest.serialization.Model): :type overwrite_existing_transaction_set_control_number: bool :param group_header_date_format: Required. The group header date format. Possible values include: "NotSpecified", "CCYYMMDD", "YYMMDD". - :type group_header_date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :type group_header_date_format: str or ~logic_management_client.models.X12DateFormat :param group_header_time_format: Required. The group header time format. Possible values include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :type group_header_time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + :type group_header_time_format: str or ~logic_management_client.models.X12TimeFormat :param usage_indicator: Required. The usage indicator. Possible values include: "NotSpecified", "Test", "Information", "Production". - :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator + :type usage_indicator: str or ~logic_management_client.models.UsageIndicator """ _validation = { @@ -8429,10 +8492,10 @@ class X12FramingSettings(msrest.serialization.Model): :type segment_terminator: int :param character_set: Required. The X12 character set. Possible values include: "NotSpecified", "Basic", "Extended", "UTF8". - :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :type character_set: str or ~logic_management_client.models.X12CharacterSet :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :type segment_terminator_suffix: str or ~logic_management_client.models.SegmentTerminatorSuffix """ _validation = { @@ -8484,7 +8547,7 @@ class X12MessageFilter(msrest.serialization.Model): :param message_filter_type: Required. The message filter type. Possible values include: "NotSpecified", "Include", "Exclude". - :type message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType + :type message_filter_type: str or ~logic_management_client.models.MessageFilterType """ _validation = { @@ -8538,11 +8601,11 @@ class X12OneWayAgreement(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type sender_business_identity: ~logic_management_client.models.BusinessIdentity :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :type receiver_business_identity: ~logic_management_client.models.BusinessIdentity :param protocol_settings: Required. The X12 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings + :type protocol_settings: ~logic_management_client.models.X12ProtocolSettings """ _validation = { @@ -8638,29 +8701,29 @@ class X12ProtocolSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param validation_settings: Required. The X12 validation settings. - :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :type validation_settings: ~logic_management_client.models.X12ValidationSettings :param framing_settings: Required. The X12 framing settings. - :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :type framing_settings: ~logic_management_client.models.X12FramingSettings :param envelope_settings: Required. The X12 envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :type envelope_settings: ~logic_management_client.models.X12EnvelopeSettings :param acknowledgement_settings: Required. The X12 acknowledgment settings. - :type acknowledgement_settings: ~azure.mgmt.logic.models.X12AcknowledgementSettings + :type acknowledgement_settings: ~logic_management_client.models.X12AcknowledgementSettings :param message_filter: Required. The X12 message filter. - :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :type message_filter: ~logic_management_client.models.X12MessageFilter :param security_settings: Required. The X12 security settings. - :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :type security_settings: ~logic_management_client.models.X12SecuritySettings :param processing_settings: Required. The X12 processing settings. - :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings + :type processing_settings: ~logic_management_client.models.X12ProcessingSettings :param envelope_overrides: The X12 envelope override settings. - :type envelope_overrides: list[~azure.mgmt.logic.models.X12EnvelopeOverride] + :type envelope_overrides: list[~logic_management_client.models.X12EnvelopeOverride] :param validation_overrides: The X12 validation override settings. - :type validation_overrides: list[~azure.mgmt.logic.models.X12ValidationOverride] + :type validation_overrides: list[~logic_management_client.models.X12ValidationOverride] :param message_filter_list: The X12 message filter list. - :type message_filter_list: list[~azure.mgmt.logic.models.X12MessageIdentifier] + :type message_filter_list: list[~logic_management_client.models.X12MessageIdentifier] :param schema_references: Required. The X12 schema references. - :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] + :type schema_references: list[~logic_management_client.models.X12SchemaReference] :param x12_delimiter_overrides: The X12 delimiter override settings. - :type x12_delimiter_overrides: list[~azure.mgmt.logic.models.X12DelimiterOverrides] + :type x12_delimiter_overrides: list[~logic_management_client.models.X12DelimiterOverrides] """ _validation = { @@ -8830,7 +8893,7 @@ class X12ValidationOverride(msrest.serialization.Model): :type trim_leading_and_trailing_spaces_and_zeroes: bool :param trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :type trailing_separator_policy: str or ~logic_management_client.models.TrailingSeparatorPolicy """ _validation = { @@ -8909,7 +8972,7 @@ class X12ValidationSettings(msrest.serialization.Model): :type trim_leading_and_trailing_spaces_and_zeroes: bool :param trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :type trailing_separator_policy: str or ~logic_management_client.models.TrailingSeparatorPolicy """ _validation = { diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py index c3673ac689e..5c557560db0 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py @@ -6,60 +6,60 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._workflow_operations import WorkflowOperations -from ._workflow_version_operations import WorkflowVersionOperations -from ._workflow_trigger_operations import WorkflowTriggerOperations -from ._workflow_version_trigger_operations import WorkflowVersionTriggerOperations -from ._workflow_trigger_history_operations import WorkflowTriggerHistoryOperations -from ._workflow_run_operations import WorkflowRunOperations -from ._workflow_run_action_operations import WorkflowRunActionOperations -from ._workflow_run_action_repetition_operations import WorkflowRunActionRepetitionOperations -from ._workflow_run_action_repetition_request_history_operations import WorkflowRunActionRepetitionRequestHistoryOperations -from ._workflow_run_action_request_history_operations import WorkflowRunActionRequestHistoryOperations -from ._workflow_run_action_scope_repetition_operations import WorkflowRunActionScopeRepetitionOperations -from ._workflow_run_operation_operations import WorkflowRunOperationOperations -from ._integration_account_operations import IntegrationAccountOperations -from ._integration_account_assembly_operations import IntegrationAccountAssemblyOperations -from ._integration_account_batch_configuration_operations import IntegrationAccountBatchConfigurationOperations -from ._integration_account_schema_operations import IntegrationAccountSchemaOperations -from ._integration_account_map_operations import IntegrationAccountMapOperations -from ._integration_account_partner_operations import IntegrationAccountPartnerOperations -from ._integration_account_agreement_operations import IntegrationAccountAgreementOperations -from ._integration_account_certificate_operations import IntegrationAccountCertificateOperations -from ._integration_account_session_operations import IntegrationAccountSessionOperations -from ._integration_service_environment_operations import IntegrationServiceEnvironmentOperations -from ._integration_service_environment_sku_operations import IntegrationServiceEnvironmentSkuOperations +from ._workflows_operations import WorkflowsOperations +from ._workflow_versions_operations import WorkflowVersionsOperations +from ._workflow_triggers_operations import WorkflowTriggersOperations +from ._workflow_version_triggers_operations import WorkflowVersionTriggersOperations +from ._workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations +from ._workflow_runs_operations import WorkflowRunsOperations +from ._workflow_run_actions_operations import WorkflowRunActionsOperations +from ._workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from ._workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from ._workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations +from ._workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations +from ._workflow_run_operations_operations import WorkflowRunOperationsOperations +from ._integration_accounts_operations import IntegrationAccountsOperations +from ._integration_account_assemblies_operations import IntegrationAccountAssembliesOperations +from ._integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations +from ._integration_account_schemas_operations import IntegrationAccountSchemasOperations +from ._integration_account_maps_operations import IntegrationAccountMapsOperations +from ._integration_account_partners_operations import IntegrationAccountPartnersOperations +from ._integration_account_agreements_operations import IntegrationAccountAgreementsOperations +from ._integration_account_certificates_operations import IntegrationAccountCertificatesOperations +from ._integration_account_sessions_operations import IntegrationAccountSessionsOperations +from ._integration_service_environments_operations import IntegrationServiceEnvironmentsOperations +from ._integration_service_environment_skus_operations import IntegrationServiceEnvironmentSkusOperations from ._integration_service_environment_network_health_operations import IntegrationServiceEnvironmentNetworkHealthOperations -from ._integration_service_environment_managed_api_operations import IntegrationServiceEnvironmentManagedApiOperations -from ._integration_service_environment_managed_api_operation_operations import IntegrationServiceEnvironmentManagedApiOperationOperations -from ._operation_operations import OperationOperations +from ._integration_service_environment_managed_apis_operations import IntegrationServiceEnvironmentManagedApisOperations +from ._integration_service_environment_managed_api_operations_operations import IntegrationServiceEnvironmentManagedApiOperationsOperations +from ._operations import Operations __all__ = [ - 'WorkflowOperations', - 'WorkflowVersionOperations', - 'WorkflowTriggerOperations', - 'WorkflowVersionTriggerOperations', - 'WorkflowTriggerHistoryOperations', - 'WorkflowRunOperations', - 'WorkflowRunActionOperations', - 'WorkflowRunActionRepetitionOperations', - 'WorkflowRunActionRepetitionRequestHistoryOperations', - 'WorkflowRunActionRequestHistoryOperations', - 'WorkflowRunActionScopeRepetitionOperations', - 'WorkflowRunOperationOperations', - 'IntegrationAccountOperations', - 'IntegrationAccountAssemblyOperations', - 'IntegrationAccountBatchConfigurationOperations', - 'IntegrationAccountSchemaOperations', - 'IntegrationAccountMapOperations', - 'IntegrationAccountPartnerOperations', - 'IntegrationAccountAgreementOperations', - 'IntegrationAccountCertificateOperations', - 'IntegrationAccountSessionOperations', - 'IntegrationServiceEnvironmentOperations', - 'IntegrationServiceEnvironmentSkuOperations', + 'WorkflowsOperations', + 'WorkflowVersionsOperations', + 'WorkflowTriggersOperations', + 'WorkflowVersionTriggersOperations', + 'WorkflowTriggerHistoriesOperations', + 'WorkflowRunsOperations', + 'WorkflowRunActionsOperations', + 'WorkflowRunActionRepetitionsOperations', + 'WorkflowRunActionRepetitionsRequestHistoriesOperations', + 'WorkflowRunActionRequestHistoriesOperations', + 'WorkflowRunActionScopeRepetitionsOperations', + 'WorkflowRunOperationsOperations', + 'IntegrationAccountsOperations', + 'IntegrationAccountAssembliesOperations', + 'IntegrationAccountBatchConfigurationsOperations', + 'IntegrationAccountSchemasOperations', + 'IntegrationAccountMapsOperations', + 'IntegrationAccountPartnersOperations', + 'IntegrationAccountAgreementsOperations', + 'IntegrationAccountCertificatesOperations', + 'IntegrationAccountSessionsOperations', + 'IntegrationServiceEnvironmentsOperations', + 'IntegrationServiceEnvironmentSkusOperations', 'IntegrationServiceEnvironmentNetworkHealthOperations', - 'IntegrationServiceEnvironmentManagedApiOperations', - 'IntegrationServiceEnvironmentManagedApiOperationOperations', - 'OperationOperations', + 'IntegrationServiceEnvironmentManagedApisOperations', + 'IntegrationServiceEnvironmentManagedApiOperationsOperations', + 'Operations', ] diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreement_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py similarity index 73% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreement_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py index 38198c748a4..31593714cc6 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreement_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py @@ -5,22 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationAccountAgreementOperations(object): - """IntegrationAccountAgreementOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountAgreementsOperations(object): + """IntegrationAccountAgreementsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -49,7 +53,7 @@ def list( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationAccountAgreementListResult" + # type: (...) -> Iterable["models.IntegrationAccountAgreementListResult"] """Gets a list of integration account agreements. :param resource_group_name: The resource group name. @@ -59,44 +63,48 @@ def list( :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: - AgreementType. + AgreementType. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreementListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreementListResult + :return: An iterator like instance of either IntegrationAccountAgreementListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationAccountAgreementListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreementListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -115,14 +123,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} # type: ignore def get( self, @@ -141,16 +149,20 @@ def get( :param agreement_name: The integration account agreement name. :type agreement_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreement or the result of cls(response) + :return: IntegrationAccountAgreement, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountAgreement :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -165,9 +177,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -175,30 +186,22 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str integration_account_name, # type: str agreement_name, # type: str - agreement_type, # type: Union[str, "models.AgreementType"] - host_partner, # type: str - guest_partner, # type: str - host_identity, # type: "models.BusinessIdentity" - guest_identity, # type: "models.BusinessIdentity" - content, # type: "models.AgreementContent" - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - metadata=None, # type: Optional[object] + agreement, # type: "models.IntegrationAccountAgreement" **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccountAgreement" @@ -210,40 +213,24 @@ def create_or_update( :type integration_account_name: str :param agreement_name: The integration account agreement name. :type agreement_name: str - :param agreement_type: The agreement type. - :type agreement_type: str or ~logic_management_client.models.AgreementType - :param host_partner: The integration account partner that is set as host partner for this - agreement. - :type host_partner: str - :param guest_partner: The integration account partner that is set as guest partner for this - agreement. - :type guest_partner: str - :param host_identity: The business identity of the host partner. - :type host_identity: ~logic_management_client.models.BusinessIdentity - :param guest_identity: The business identity of the guest partner. - :type guest_identity: ~logic_management_client.models.BusinessIdentity - :param content: The agreement content. - :type content: ~logic_management_client.models.AgreementContent - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object + :param agreement: The integration account agreement. + :type agreement: ~logic_management_client.models.IntegrationAccountAgreement :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreement or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreement or ~logic_management_client.models.IntegrationAccountAgreement + :return: IntegrationAccountAgreement, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountAgreement :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _agreement = models.IntegrationAccountAgreement(location=location, tags=tags, metadata=metadata, agreement_type=agreement_type, host_partner=host_partner, guest_partner=guest_partner, host_identity=host_identity, guest_identity=guest_identity, content=content) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -259,23 +246,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_agreement, 'IntegrationAccountAgreement') + body_content = self._serialize.body(agreement, 'IntegrationAccountAgreement') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) @@ -283,10 +267,10 @@ def create_or_update( deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} # type: ignore def delete( self, @@ -305,16 +289,20 @@ def delete( :param agreement_name: The integration account agreement name. :type agreement_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -329,8 +317,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -338,20 +326,19 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} # type: ignore def list_content_callback_url( self, resource_group_name, # type: str integration_account_name, # type: str agreement_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] + list_content_callback_url, # type: "models.GetCallbackUrlParameters" **kwargs # type: Any ): # type: (...) -> "models.WorkflowTriggerCallbackUrl" @@ -363,24 +350,24 @@ def list_content_callback_url( :type integration_account_name: str :param agreement_name: The integration account agreement name. :type agreement_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_content_callback_url: + :type list_content_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -396,26 +383,24 @@ def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assembly_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assemblies_operations.py similarity index 77% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assembly_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assemblies_operations.py index c33801e9f97..c3f2843dcf0 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assembly_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assemblies_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationAccountAssemblyOperations(object): - """IntegrationAccountAssemblyOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountAssembliesOperations(object): + """IntegrationAccountAssembliesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,7 +51,7 @@ def list( integration_account_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.AssemblyCollection" + # type: (...) -> Iterable["models.AssemblyCollection"] """List the assemblies for an integration account. :param resource_group_name: The resource group name. @@ -54,37 +59,41 @@ def list( :param integration_account_name: The integration account name. :type integration_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyCollection or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyCollection + :return: An iterator like instance of either AssemblyCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.AssemblyCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -103,14 +112,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} # type: ignore def get( self, @@ -129,16 +138,20 @@ def get( :param assembly_artifact_name: The assembly artifact name. :type assembly_artifact_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition or the result of cls(response) + :return: AssemblyDefinition, or the result of cls(response) :rtype: ~logic_management_client.models.AssemblyDefinition :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -153,9 +166,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -163,24 +175,22 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AssemblyDefinition', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str integration_account_name, # type: str assembly_artifact_name, # type: str - properties, # type: "models.AssemblyProperties" - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] + assembly_artifact, # type: "models.AssemblyDefinition" **kwargs # type: Any ): # type: (...) -> "models.AssemblyDefinition" @@ -192,26 +202,24 @@ def create_or_update( :type integration_account_name: str :param assembly_artifact_name: The assembly artifact name. :type assembly_artifact_name: str - :param properties: The assembly properties. - :type properties: ~logic_management_client.models.AssemblyProperties - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] + :param assembly_artifact: The assembly artifact. + :type assembly_artifact: ~logic_management_client.models.AssemblyDefinition :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyDefinition or ~logic_management_client.models.AssemblyDefinition + :return: AssemblyDefinition, or the result of cls(response) + :rtype: ~logic_management_client.models.AssemblyDefinition :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _assembly_artifact = models.AssemblyDefinition(location=location, tags=tags, properties=properties) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -227,23 +235,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_assembly_artifact, 'AssemblyDefinition') + body_content = self._serialize.body(assembly_artifact, 'AssemblyDefinition') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('AssemblyDefinition', pipeline_response) @@ -251,10 +256,10 @@ def create_or_update( deserialized = self._deserialize('AssemblyDefinition', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} # type: ignore def delete( self, @@ -273,16 +278,20 @@ def delete( :param assembly_artifact_name: The assembly artifact name. :type assembly_artifact_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,8 +306,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -306,12 +315,12 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} # type: ignore def list_content_callback_url( self, @@ -330,16 +339,20 @@ def list_content_callback_url( :param assembly_artifact_name: The assembly artifact name. :type assembly_artifact_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -354,9 +367,8 @@ def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -364,12 +376,12 @@ def list_content_callback_url( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configuration_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configurations_operations.py similarity index 76% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configuration_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configurations_operations.py index acde6505e62..f338be3d866 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configuration_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configurations_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationAccountBatchConfigurationOperations(object): - """IntegrationAccountBatchConfigurationOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountBatchConfigurationsOperations(object): + """IntegrationAccountBatchConfigurationsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,7 +51,7 @@ def list( integration_account_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.BatchConfigurationCollection" + # type: (...) -> Iterable["models.BatchConfigurationCollection"] """List the batch configurations for an integration account. :param resource_group_name: The resource group name. @@ -54,37 +59,41 @@ def list( :param integration_account_name: The integration account name. :type integration_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfigurationCollection or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfigurationCollection + :return: An iterator like instance of either BatchConfigurationCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.BatchConfigurationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfigurationCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -103,14 +112,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} # type: ignore def get( self, @@ -129,16 +138,20 @@ def get( :param batch_configuration_name: The batch configuration name. :type batch_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration or the result of cls(response) + :return: BatchConfiguration, or the result of cls(response) :rtype: ~logic_management_client.models.BatchConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -153,9 +166,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -163,24 +175,22 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BatchConfiguration', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str integration_account_name, # type: str batch_configuration_name, # type: str - properties, # type: "models.BatchConfigurationProperties" - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] + batch_configuration, # type: "models.BatchConfiguration" **kwargs # type: Any ): # type: (...) -> "models.BatchConfiguration" @@ -192,26 +202,24 @@ def create_or_update( :type integration_account_name: str :param batch_configuration_name: The batch configuration name. :type batch_configuration_name: str - :param properties: The batch configuration properties. - :type properties: ~logic_management_client.models.BatchConfigurationProperties - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] + :param batch_configuration: The batch configuration. + :type batch_configuration: ~logic_management_client.models.BatchConfiguration :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfiguration or ~logic_management_client.models.BatchConfiguration + :return: BatchConfiguration, or the result of cls(response) + :rtype: ~logic_management_client.models.BatchConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _batch_configuration = models.BatchConfiguration(location=location, tags=tags, properties=properties) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -227,23 +235,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_batch_configuration, 'BatchConfiguration') + body_content = self._serialize.body(batch_configuration, 'BatchConfiguration') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('BatchConfiguration', pipeline_response) @@ -251,10 +256,10 @@ def create_or_update( deserialized = self._deserialize('BatchConfiguration', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} # type: ignore def delete( self, @@ -273,16 +278,20 @@ def delete( :param batch_configuration_name: The batch configuration name. :type batch_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,8 +306,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -306,9 +315,9 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificate_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificates_operations.py similarity index 75% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificate_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificates_operations.py index 4222becf4b2..6228ccd13a5 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificate_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificates_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationAccountCertificateOperations(object): - """IntegrationAccountCertificateOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountCertificatesOperations(object): + """IntegrationAccountCertificatesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +52,7 @@ def list( top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationAccountCertificateListResult" + # type: (...) -> Iterable["models.IntegrationAccountCertificateListResult"] """Gets a list of integration account certificates. :param resource_group_name: The resource group name. @@ -57,39 +62,43 @@ def list( :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificateListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificateListResult + :return: An iterator like instance of either IntegrationAccountCertificateListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationAccountCertificateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificateListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -108,14 +117,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} # type: ignore def get( self, @@ -134,16 +143,20 @@ def get( :param certificate_name: The integration account certificate name. :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate or the result of cls(response) + :return: IntegrationAccountCertificate, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountCertificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -158,9 +171,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -168,26 +180,22 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str integration_account_name, # type: str certificate_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - metadata=None, # type: Optional[object] - key=None, # type: Optional["models.KeyVaultKeyReference"] - public_certificate=None, # type: Optional[str] + certificate, # type: "models.IntegrationAccountCertificate" **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccountCertificate" @@ -199,30 +207,24 @@ def create_or_update( :type integration_account_name: str :param certificate_name: The integration account certificate name. :type certificate_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object - :param key: The key details in the key vault. - :type key: ~logic_management_client.models.KeyVaultKeyReference - :param public_certificate: The public certificate. - :type public_certificate: str + :param certificate: The integration account certificate. + :type certificate: ~logic_management_client.models.IntegrationAccountCertificate :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificate or ~logic_management_client.models.IntegrationAccountCertificate + :return: IntegrationAccountCertificate, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountCertificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _certificate = models.IntegrationAccountCertificate(location=location, tags=tags, metadata=metadata, key=key, public_certificate=public_certificate) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -238,23 +240,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_certificate, 'IntegrationAccountCertificate') + body_content = self._serialize.body(certificate, 'IntegrationAccountCertificate') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) @@ -262,10 +261,10 @@ def create_or_update( deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} # type: ignore def delete( self, @@ -284,16 +283,20 @@ def delete( :param certificate_name: The integration account certificate name. :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -308,8 +311,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -317,9 +320,9 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_map_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_maps_operations.py similarity index 75% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_map_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_maps_operations.py index 4969a4a989c..d2b8eea6bd2 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_map_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_maps_operations.py @@ -5,22 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationAccountMapOperations(object): - """IntegrationAccountMapOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountMapsOperations(object): + """IntegrationAccountMapsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -49,7 +53,7 @@ def list( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationAccountMapListResult" + # type: (...) -> Iterable["models.IntegrationAccountMapListResult"] """Gets a list of integration account maps. :param resource_group_name: The resource group name. @@ -61,41 +65,45 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: MapType. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMapListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMapListResult + :return: An iterator like instance of either IntegrationAccountMapListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationAccountMapListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMapListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -114,14 +122,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} # type: ignore def get( self, @@ -140,16 +148,20 @@ def get( :param map_name: The integration account map name. :type map_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap or the result of cls(response) + :return: IntegrationAccountMap, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -164,9 +176,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -174,28 +185,22 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str integration_account_name, # type: str map_name, # type: str - map_type, # type: Union[str, "models.MapType"] - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - parameters_schema=None, # type: Optional["models.IntegrationAccountMapPropertiesParametersSchema"] - content=None, # type: Optional[str] - content_type_parameter=None, # type: Optional[str] - metadata=None, # type: Optional[object] + map, # type: "models.IntegrationAccountMap" **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccountMap" @@ -207,34 +212,24 @@ def create_or_update( :type integration_account_name: str :param map_name: The integration account map name. :type map_name: str - :param map_type: The map type. - :type map_type: str or ~logic_management_client.models.MapType - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param parameters_schema: The parameters schema of integration account map. - :type parameters_schema: ~logic_management_client.models.IntegrationAccountMapPropertiesParametersSchema - :param content: The content. - :type content: str - :param content_type_parameter: The content type. - :type content_type_parameter: str - :param metadata: The metadata. - :type metadata: object + :param map: The integration account map. + :type map: ~logic_management_client.models.IntegrationAccountMap :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMap or ~logic_management_client.models.IntegrationAccountMap + :return: IntegrationAccountMap, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _map = models.IntegrationAccountMap(location=location, tags=tags, map_type=map_type, parameters_schema=parameters_schema, content=content, content_type=content_type_parameter, metadata=metadata) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -250,23 +245,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_map, 'IntegrationAccountMap') + body_content = self._serialize.body(map, 'IntegrationAccountMap') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) @@ -274,10 +266,10 @@ def create_or_update( deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} # type: ignore def delete( self, @@ -296,16 +288,20 @@ def delete( :param map_name: The integration account map name. :type map_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -320,8 +316,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -329,20 +325,19 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} # type: ignore def list_content_callback_url( self, resource_group_name, # type: str integration_account_name, # type: str map_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] + list_content_callback_url, # type: "models.GetCallbackUrlParameters" **kwargs # type: Any ): # type: (...) -> "models.WorkflowTriggerCallbackUrl" @@ -354,24 +349,24 @@ def list_content_callback_url( :type integration_account_name: str :param map_name: The integration account map name. :type map_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_content_callback_url: + :type list_content_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -387,26 +382,24 @@ def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partner_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partners_operations.py similarity index 75% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partner_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partners_operations.py index 3919f8083b0..a35aefd6d32 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partner_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partners_operations.py @@ -5,22 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationAccountPartnerOperations(object): - """IntegrationAccountPartnerOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountPartnersOperations(object): + """IntegrationAccountPartnersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -49,7 +53,7 @@ def list( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationAccountPartnerListResult" + # type: (...) -> Iterable["models.IntegrationAccountPartnerListResult"] """Gets a list of integration account partners. :param resource_group_name: The resource group name. @@ -61,41 +65,45 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: PartnerType. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartnerListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartnerListResult + :return: An iterator like instance of either IntegrationAccountPartnerListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationAccountPartnerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartnerListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -114,14 +122,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} # type: ignore def get( self, @@ -140,16 +148,20 @@ def get( :param partner_name: The integration account partner name. :type partner_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner or the result of cls(response) + :return: IntegrationAccountPartner, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountPartner :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -164,9 +176,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -174,26 +185,22 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str integration_account_name, # type: str partner_name, # type: str - partner_type, # type: Union[str, "models.PartnerType"] - content, # type: "models.PartnerContent" - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - metadata=None, # type: Optional[object] + partner, # type: "models.IntegrationAccountPartner" **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccountPartner" @@ -205,30 +212,24 @@ def create_or_update( :type integration_account_name: str :param partner_name: The integration account partner name. :type partner_name: str - :param partner_type: The partner type. - :type partner_type: str or ~logic_management_client.models.PartnerType - :param content: The partner content. - :type content: ~logic_management_client.models.PartnerContent - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object + :param partner: The integration account partner. + :type partner: ~logic_management_client.models.IntegrationAccountPartner :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartner or ~logic_management_client.models.IntegrationAccountPartner + :return: IntegrationAccountPartner, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountPartner :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _partner = models.IntegrationAccountPartner(location=location, tags=tags, partner_type=partner_type, metadata=metadata, content=content) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -244,23 +245,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_partner, 'IntegrationAccountPartner') + body_content = self._serialize.body(partner, 'IntegrationAccountPartner') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) @@ -268,10 +266,10 @@ def create_or_update( deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} # type: ignore def delete( self, @@ -290,16 +288,20 @@ def delete( :param partner_name: The integration account partner name. :type partner_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -314,8 +316,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -323,20 +325,19 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} # type: ignore def list_content_callback_url( self, resource_group_name, # type: str integration_account_name, # type: str partner_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] + list_content_callback_url, # type: "models.GetCallbackUrlParameters" **kwargs # type: Any ): # type: (...) -> "models.WorkflowTriggerCallbackUrl" @@ -348,24 +349,24 @@ def list_content_callback_url( :type integration_account_name: str :param partner_name: The integration account partner name. :type partner_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_content_callback_url: + :type list_content_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -381,26 +382,24 @@ def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schema_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schemas_operations.py similarity index 74% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schema_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schemas_operations.py index 2cc9b609d90..bb162e7d737 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schema_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schemas_operations.py @@ -5,22 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationAccountSchemaOperations(object): - """IntegrationAccountSchemaOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountSchemasOperations(object): + """IntegrationAccountSchemasOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -49,7 +53,7 @@ def list( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationAccountSchemaListResult" + # type: (...) -> Iterable["models.IntegrationAccountSchemaListResult"] """Gets a list of integration account schemas. :param resource_group_name: The resource group name. @@ -61,41 +65,45 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: SchemaType. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchemaListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchemaListResult + :return: An iterator like instance of either IntegrationAccountSchemaListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationAccountSchemaListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchemaListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -114,14 +122,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} # type: ignore def get( self, @@ -140,16 +148,20 @@ def get( :param schema_name: The integration account schema name. :type schema_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema or the result of cls(response) + :return: IntegrationAccountSchema, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountSchema :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -164,9 +176,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -174,30 +185,22 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str integration_account_name, # type: str schema_name, # type: str - schema_type, # type: Union[str, "models.SchemaType"] - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - target_namespace=None, # type: Optional[str] - document_name=None, # type: Optional[str] - file_name=None, # type: Optional[str] - metadata=None, # type: Optional[object] - content=None, # type: Optional[str] - content_type_parameter=None, # type: Optional[str] + schema, # type: "models.IntegrationAccountSchema" **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccountSchema" @@ -209,38 +212,24 @@ def create_or_update( :type integration_account_name: str :param schema_name: The integration account schema name. :type schema_name: str - :param schema_type: The schema type. - :type schema_type: str or ~logic_management_client.models.SchemaType - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param target_namespace: The target namespace of the schema. - :type target_namespace: str - :param document_name: The document name. - :type document_name: str - :param file_name: The file name. - :type file_name: str - :param metadata: The metadata. - :type metadata: object - :param content: The content. - :type content: str - :param content_type_parameter: The content type. - :type content_type_parameter: str + :param schema: The integration account schema. + :type schema: ~logic_management_client.models.IntegrationAccountSchema :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchema or ~logic_management_client.models.IntegrationAccountSchema + :return: IntegrationAccountSchema, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountSchema :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _schema = models.IntegrationAccountSchema(location=location, tags=tags, schema_type=schema_type, target_namespace=target_namespace, document_name=document_name, file_name=file_name, metadata=metadata, content=content, content_type=content_type_parameter) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -256,23 +245,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_schema, 'IntegrationAccountSchema') + body_content = self._serialize.body(schema, 'IntegrationAccountSchema') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) @@ -280,10 +266,10 @@ def create_or_update( deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} # type: ignore def delete( self, @@ -302,16 +288,20 @@ def delete( :param schema_name: The integration account schema name. :type schema_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -326,8 +316,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -335,20 +325,19 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} # type: ignore def list_content_callback_url( self, resource_group_name, # type: str integration_account_name, # type: str schema_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] + list_content_callback_url, # type: "models.GetCallbackUrlParameters" **kwargs # type: Any ): # type: (...) -> "models.WorkflowTriggerCallbackUrl" @@ -360,24 +349,24 @@ def list_content_callback_url( :type integration_account_name: str :param schema_name: The integration account schema name. :type schema_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_content_callback_url: + :type list_content_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_content_callback_url.metadata['url'] + url = self.list_content_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -393,26 +382,24 @@ def list_content_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_session_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_sessions_operations.py similarity index 75% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_session_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_sessions_operations.py index 45c1becc47a..9c8e418ffbf 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_session_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_sessions_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationAccountSessionOperations(object): - """IntegrationAccountSessionOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountSessionsOperations(object): + """IntegrationAccountSessionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +53,7 @@ def list( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationAccountSessionListResult" + # type: (...) -> Iterable["models.IntegrationAccountSessionListResult"] """Gets a list of integration account sessions. :param resource_group_name: The resource group name. @@ -60,41 +65,45 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: ChangedTime. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSessionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSessionListResult + :return: An iterator like instance of either IntegrationAccountSessionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationAccountSessionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSessionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -113,14 +122,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} # type: ignore def get( self, @@ -139,16 +148,20 @@ def get( :param session_name: The integration account session name. :type session_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession or the result of cls(response) + :return: IntegrationAccountSession, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccountSession :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -163,9 +176,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -173,24 +185,22 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str integration_account_name, # type: str session_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - content=None, # type: Optional[object] + session, # type: "models.IntegrationAccountSession" **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccountSession" @@ -202,26 +212,24 @@ def create_or_update( :type integration_account_name: str :param session_name: The integration account session name. :type session_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param content: The session content. - :type content: object + :param session: The integration account session. + :type session: ~logic_management_client.models.IntegrationAccountSession :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSession or ~logic_management_client.models.IntegrationAccountSession + :return: IntegrationAccountSession, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccountSession :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _session = models.IntegrationAccountSession(location=location, tags=tags, content=content) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -237,23 +245,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_session, 'IntegrationAccountSession') + body_content = self._serialize.body(session, 'IntegrationAccountSession') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) @@ -261,10 +266,10 @@ def create_or_update( deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} # type: ignore def delete( self, @@ -283,16 +288,20 @@ def delete( :param session_name: The integration account session name. :type session_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -307,8 +316,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -316,9 +325,9 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_accounts_operations.py similarity index 70% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_accounts_operations.py index c353a90a19d..443c71412ea 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_accounts_operations.py @@ -5,22 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationAccountOperations(object): - """IntegrationAccountOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountsOperations(object): + """IntegrationAccountsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,43 +50,47 @@ def list_by_subscription( top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationAccountListResult" + # type: (...) -> Iterable["models.IntegrationAccountListResult"] """Gets a list of integration accounts by subscription. :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountListResult + :return: An iterator like instance of either IntegrationAccountListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationAccountListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -101,14 +109,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} # type: ignore def list_by_resource_group( self, @@ -116,7 +124,7 @@ def list_by_resource_group( top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationAccountListResult" + # type: (...) -> Iterable["models.IntegrationAccountListResult"] """Gets a list of integration accounts by resource group. :param resource_group_name: The resource group name. @@ -124,38 +132,42 @@ def list_by_resource_group( :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountListResult + :return: An iterator like instance of either IntegrationAccountListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationAccountListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -174,14 +186,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} # type: ignore def get( self, @@ -197,16 +209,20 @@ def get( :param integration_account_name: The integration account name. :type integration_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) + :return: IntegrationAccount, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccount :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -220,9 +236,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -230,25 +245,21 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str integration_account_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - sku=None, # type: Optional["models.IntegrationAccountSku"] - integration_service_environment=None, # type: Optional["models.IntegrationServiceEnvironment"] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] + integration_account, # type: "models.IntegrationAccount" **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccount" @@ -258,30 +269,24 @@ def create_or_update( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment - :param state: The workflow state. - :type state: str or ~logic_management_client.models.WorkflowState + :param integration_account: The integration account. + :type integration_account: ~logic_management_client.models.IntegrationAccount :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount or ~logic_management_client.models.IntegrationAccount + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~logic_management_client.models.IntegrationAccount :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -296,23 +301,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_account, 'IntegrationAccount') + body_content = self._serialize.body(integration_account, 'IntegrationAccount') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationAccount', pipeline_response) @@ -320,20 +322,16 @@ def create_or_update( deserialized = self._deserialize('IntegrationAccount', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore def update( self, resource_group_name, # type: str integration_account_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - sku=None, # type: Optional["models.IntegrationAccountSku"] - integration_service_environment=None, # type: Optional["models.IntegrationServiceEnvironment"] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] + integration_account, # type: "models.IntegrationAccount" **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccount" @@ -343,30 +341,24 @@ def update( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment - :param state: The workflow state. - :type state: str or ~logic_management_client.models.WorkflowState + :param integration_account: The integration account. + :type integration_account: ~logic_management_client.models.IntegrationAccount :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) + :return: IntegrationAccount, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccount :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update.metadata['url'] + url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -381,29 +373,27 @@ def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_account, 'IntegrationAccount') + body_content = self._serialize.body(integration_account, 'IntegrationAccount') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore def delete( self, @@ -419,16 +409,20 @@ def delete( :param integration_account_name: The integration account name. :type integration_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -442,8 +436,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -451,19 +445,18 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore def list_callback_url( self, resource_group_name, # type: str integration_account_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] + parameters, # type: "models.GetCallbackUrlParameters" **kwargs # type: Any ): # type: (...) -> "models.CallbackUrl" @@ -473,24 +466,24 @@ def list_callback_url( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param parameters: The callback URL parameters. + :type parameters: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: CallbackUrl or the result of cls(response) + :return: CallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.CallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_callback_url.metadata['url'] + url = self.list_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -505,88 +498,88 @@ def list_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'GetCallbackUrlParameters') + body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} # type: ignore - def list_key_vault_key( + def list_key_vault_keys( self, resource_group_name, # type: str integration_account_name, # type: str - key_vault, # type: "models.KeyVaultReference" - skip_token=None, # type: Optional[str] + list_key_vault_keys, # type: "models.ListKeyVaultKeysDefinition" **kwargs # type: Any ): - # type: (...) -> "models.KeyVaultKeyCollection" + # type: (...) -> Iterable["models.KeyVaultKeyCollection"] """Gets the integration account's Key Vault keys. :param resource_group_name: The resource group name. :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param key_vault: The key vault reference. - :type key_vault: ~logic_management_client.models.KeyVaultReference - :param skip_token: The skip token. - :type skip_token: str + :param list_key_vault_keys: The key vault parameters. + :type list_key_vault_keys: ~logic_management_client.models.ListKeyVaultKeysDefinition :keyword callable cls: A custom type or function that will be passed the direct response - :return: KeyVaultKeyCollection or the result of cls(response) - :rtype: ~logic_management_client.models.KeyVaultKeyCollection + :return: An iterator like instance of either KeyVaultKeyCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.KeyVaultKeyCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.KeyVaultKeyCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - _list_key_vault_keys = models.ListKeyVaultKeysDefinition(key_vault=key_vault, skip_token=skip_token) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = "application/json" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_key_vault_key.metadata['url'] + url = self.list_key_vault_keys.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_key_vault_keys, 'ListKeyVaultKeysDefinition') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) return request def extract_data(pipeline_response): @@ -605,22 +598,20 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_key_vault_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} + list_key_vault_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} # type: ignore - def log_tracking_event( + def log_tracking_events( self, resource_group_name, # type: str integration_account_name, # type: str - source_type, # type: str - events, # type: List["TrackingEvent"] - track_events_options=None, # type: Optional[Union[str, "models.TrackEventsOperationOptions"]] + log_tracking_events, # type: "models.TrackingEventsDefinition" **kwargs # type: Any ): # type: (...) -> None @@ -630,26 +621,24 @@ def log_tracking_event( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param source_type: The source type. - :type source_type: str - :param events: The events. - :type events: list[~logic_management_client.models.TrackingEvent] - :param track_events_options: The track events options. - :type track_events_options: str or ~logic_management_client.models.TrackEventsOperationOptions + :param log_tracking_events: The callback URL parameters. + :type log_tracking_events: ~logic_management_client.models.TrackingEventsDefinition :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _log_tracking_events = models.TrackingEventsDefinition(source_type=source_type, track_events_options=track_events_options, events=events) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.log_tracking_event.metadata['url'] + url = self.log_tracking_events.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -664,31 +653,30 @@ def log_tracking_event( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_log_tracking_events, 'TrackingEventsDefinition') + body_content = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - log_tracking_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} + log_tracking_events.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} # type: ignore def regenerate_access_key( self, resource_group_name, # type: str integration_account_name, # type: str - key_type=None, # type: Optional[Union[str, "models.KeyType"]] + regenerate_access_key, # type: "models.RegenerateActionParameter" **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccount" @@ -698,22 +686,24 @@ def regenerate_access_key( :type resource_group_name: str :param integration_account_name: The integration account name. :type integration_account_name: str - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param regenerate_access_key: The access key type. + :type regenerate_access_key: ~logic_management_client.models.RegenerateActionParameter :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) + :return: IntegrationAccount, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationAccount :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _regenerate_access_key = models.RegenerateActionParameter(key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.regenerate_access_key.metadata['url'] + url = self.regenerate_access_key.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -728,26 +718,24 @@ def regenerate_access_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_regenerate_access_key, 'RegenerateActionParameter') + body_content = self._serialize.body(regenerate_access_key, 'RegenerateActionParameter') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations_operations.py similarity index 69% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operation_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations_operations.py index 7b803cec812..a7a9ab320bb 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operation_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class IntegrationServiceEnvironmentManagedApiOperationOperations(object): - """IntegrationServiceEnvironmentManagedApiOperationOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationServiceEnvironmentManagedApiOperationsOperations(object): + """IntegrationServiceEnvironmentManagedApiOperationsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +52,7 @@ def list( api_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ApiOperationListResult" + # type: (...) -> Iterable["models.ApiOperationListResult"] """Gets the managed Api operations. :param resource_group: The resource group. @@ -57,18 +62,26 @@ def list( :param api_name: The api name. :type api_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApiOperationListResult or the result of cls(response) - :rtype: ~logic_management_client.models.ApiOperationListResult + :return: An iterator like instance of either ApiOperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.ApiOperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ApiOperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -76,19 +89,15 @@ def prepare_request(next_link=None): 'apiName': self._serialize.url("api_name", api_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -107,11 +116,11 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py similarity index 65% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py index 288f9ca1d56..9ddc198f433 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationServiceEnvironmentManagedApiOperations(object): - """IntegrationServiceEnvironmentManagedApiOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationServiceEnvironmentManagedApisOperations(object): + """IntegrationServiceEnvironmentManagedApisOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +53,7 @@ def list( integration_service_environment_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ManagedApiListResult" + # type: (...) -> Iterable["models.ManagedApiListResult"] """Gets the integration service environment managed Apis. :param resource_group: The resource group. @@ -55,37 +61,41 @@ def list( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedApiListResult or the result of cls(response) - :rtype: ~logic_management_client.models.ManagedApiListResult + :return: An iterator like instance of either ManagedApiListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.ManagedApiListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApiListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -104,14 +114,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis'} # type: ignore def get( self, @@ -130,16 +140,20 @@ def get( :param api_name: The api name. :type api_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedApi or the result of cls(response) + :return: ManagedApi, or the result of cls(response) :rtype: ~logic_management_client.models.ManagedApi :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -154,9 +168,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -164,15 +177,15 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagedApi', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore def _put_initial( self, @@ -183,11 +196,15 @@ def _put_initial( ): # type: (...) -> "models.ManagedApi" cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self._put_initial.metadata['url'] + url = self._put_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -202,9 +219,8 @@ def _put_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.put(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -212,9 +228,8 @@ def _put_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('ManagedApi', pipeline_response) @@ -222,10 +237,10 @@ def _put_initial( deserialized = self._deserialize('ManagedApi', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore def begin_put( self, @@ -234,7 +249,7 @@ def begin_put( api_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ManagedApi" + # type: (...) -> LROPoller["models.ManagedApi"] """Puts the integration service environment managed Api. :param resource_group: The resource group name. @@ -244,23 +259,33 @@ def begin_put( :param api_name: The api name. :type api_name: str :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns ManagedApi + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedApi or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.ManagedApi] - :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - raw_result = self._put_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._put_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): deserialized = self._deserialize('ManagedApi', pipeline_response) @@ -269,15 +294,26 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + 'apiName': self._serialize.url("api_name", api_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore def _delete_initial( self, @@ -288,11 +324,15 @@ def _delete_initial( ): # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -307,8 +347,8 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -316,12 +356,12 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore def begin_delete( self, @@ -330,7 +370,7 @@ def begin_delete( api_name, # type: str **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> LROPoller[None] """Deletes the integration service environment managed Api. :param resource_group: The resource group. @@ -340,34 +380,55 @@ def begin_delete( :param api_name: The api name. :type api_name: str :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns None + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] - raw_result = self._delete_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + 'apiName': self._serialize.url("api_name", api_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_network_health_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_network_health_operations.py index f43562abb72..eef472aae2f 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_network_health_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_network_health_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationServiceEnvironmentNetworkHealthOperations(object): """IntegrationServiceEnvironmentNetworkHealthOperations operations. @@ -45,7 +50,7 @@ def get( integration_service_environment_name, # type: str **kwargs # type: Any ): - # type: (...) -> Dict[str, "IntegrationServiceEnvironmentSubnetNetworkHealth"] + # type: (...) -> Dict[str, "models.IntegrationServiceEnvironmentSubnetNetworkHealth"] """Gets the integration service environment network health. :param resource_group: The resource group. @@ -53,16 +58,20 @@ def get( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: dict or the result of cls(response) + :return: dict mapping str to IntegrationServiceEnvironmentSubnetNetworkHealth, or the result of cls(response) :rtype: dict[str, ~logic_management_client.models.IntegrationServiceEnvironmentSubnetNetworkHealth] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, "IntegrationServiceEnvironmentSubnetNetworkHealth"]] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, "models.IntegrationServiceEnvironmentSubnetNetworkHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -76,9 +85,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -86,12 +94,12 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('{IntegrationServiceEnvironmentSubnetNetworkHealth}', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_sku_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_skus_operations.py similarity index 68% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_sku_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_skus_operations.py index 2a8d954b363..ef34138ff5c 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_sku_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_skus_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class IntegrationServiceEnvironmentSkuOperations(object): - """IntegrationServiceEnvironmentSkuOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationServiceEnvironmentSkusOperations(object): + """IntegrationServiceEnvironmentSkusOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,7 +51,7 @@ def list( integration_service_environment_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.IntegrationServiceEnvironmentSkuList" + # type: (...) -> Iterable["models.IntegrationServiceEnvironmentSkuList"] """Gets a list of integration service environment Skus. :param resource_group: The resource group. @@ -54,37 +59,41 @@ def list( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentSkuList or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentSkuList + :return: An iterator like instance of either IntegrationServiceEnvironmentSkuList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationServiceEnvironmentSkuList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentSkuList"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -103,11 +112,11 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py similarity index 65% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py index 9b2eeda72aa..095dde70d9e 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class IntegrationServiceEnvironmentOperations(object): - """IntegrationServiceEnvironmentOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationServiceEnvironmentsOperations(object): + """IntegrationServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,43 +52,47 @@ def list_by_subscription( top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationServiceEnvironmentListResult" + # type: (...) -> Iterable["models.IntegrationServiceEnvironmentListResult"] """Gets a list of integration service environments by subscription. :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentListResult + :return: An iterator like instance of either IntegrationServiceEnvironmentListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationServiceEnvironmentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -101,14 +111,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments'} + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments'} # type: ignore def list_by_resource_group( self, @@ -116,7 +126,7 @@ def list_by_resource_group( top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationServiceEnvironmentListResult" + # type: (...) -> Iterable["models.IntegrationServiceEnvironmentListResult"] """Gets a list of integration service environments by resource group. :param resource_group: The resource group. @@ -124,38 +134,42 @@ def list_by_resource_group( :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentListResult + :return: An iterator like instance of either IntegrationServiceEnvironmentListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.IntegrationServiceEnvironmentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -174,14 +188,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments'} # type: ignore def get( self, @@ -197,16 +211,20 @@ def get( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironment or the result of cls(response) + :return: IntegrationServiceEnvironment, or the result of cls(response) :rtype: ~logic_management_client.models.IntegrationServiceEnvironment :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -220,9 +238,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -230,36 +247,35 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore def _create_or_update_initial( self, resource_group, # type: str integration_service_environment_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - properties=None, # type: Optional["models.IntegrationServiceEnvironmentProperties"] - sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] + integration_service_environment, # type: "models.IntegrationServiceEnvironment" **kwargs # type: Any ): # type: (...) -> "models.IntegrationServiceEnvironment" cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -274,23 +290,20 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_service_environment, 'IntegrationServiceEnvironment') + body_content = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -298,57 +311,55 @@ def _create_or_update_initial( deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore def begin_create_or_update( self, resource_group, # type: str integration_service_environment_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - properties=None, # type: Optional["models.IntegrationServiceEnvironmentProperties"] - sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] + integration_service_environment, # type: "models.IntegrationServiceEnvironment" **kwargs # type: Any ): - # type: (...) -> "models.IntegrationServiceEnvironment" + # type: (...) -> LROPoller["models.IntegrationServiceEnvironment"] """Creates or updates an integration service environment. :param resource_group: The resource group. :type resource_group: str :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param integration_service_environment: The integration service environment. + :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns IntegrationServiceEnvironment + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either IntegrationServiceEnvironment or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.IntegrationServiceEnvironment] - :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - raw_result = self._create_or_update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - location=location, - tags=tags, - properties=properties, - sku=sku, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -357,36 +368,45 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore def _update_initial( self, resource_group, # type: str integration_service_environment_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - properties=None, # type: Optional["models.IntegrationServiceEnvironmentProperties"] - sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] + integration_service_environment, # type: "models.IntegrationServiceEnvironment" **kwargs # type: Any ): # type: (...) -> "models.IntegrationServiceEnvironment" cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -401,76 +421,72 @@ def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_service_environment, 'IntegrationServiceEnvironment') + body_content = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore def begin_update( self, resource_group, # type: str integration_service_environment_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - properties=None, # type: Optional["models.IntegrationServiceEnvironmentProperties"] - sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] + integration_service_environment, # type: "models.IntegrationServiceEnvironment" **kwargs # type: Any ): - # type: (...) -> "models.IntegrationServiceEnvironment" + # type: (...) -> LROPoller["models.IntegrationServiceEnvironment"] """Updates an integration service environment. :param resource_group: The resource group. :type resource_group: str :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param integration_service_environment: The integration service environment. + :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns IntegrationServiceEnvironment + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either IntegrationServiceEnvironment or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.IntegrationServiceEnvironment] - :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - raw_result = self._update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - location=location, - tags=tags, - properties=properties, - sku=sku, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -479,15 +495,25 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore def delete( self, @@ -503,16 +529,20 @@ def delete( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -526,8 +556,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -535,12 +565,12 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore def restart( self, @@ -556,16 +586,20 @@ def restart( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.restart.metadata['url'] + url = self.restart.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -579,8 +613,8 @@ def restart( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -588,9 +622,9 @@ def restart( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart'} + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_operations.py similarity index 64% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_operations.py index 549f969dc54..03587e0a193 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class OperationOperations(object): - """OperationOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -44,35 +49,39 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> "models.OperationListResult" + # type: (...) -> Iterable["models.OperationListResult"] """Lists all of the available Logic REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationListResult or the result of cls(response) - :rtype: ~logic_management_client.models.OperationListResult + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -91,11 +100,11 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.Logic/operations'} + list.metadata = {'url': '/providers/Microsoft.Logic/operations'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py similarity index 72% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py index 920ba54db8c..57975eba852 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class WorkflowRunActionRepetitionOperations(object): - """WorkflowRunActionRepetitionOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionRepetitionsOperations(object): + """WorkflowRunActionRepetitionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +53,7 @@ def list( action_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.WorkflowRunActionRepetitionDefinitionCollection" + # type: (...) -> Iterable["models.WorkflowRunActionRepetitionDefinitionCollection"] """Get all of a workflow run action repetitions. :param resource_group_name: The resource group name. @@ -60,18 +65,26 @@ def list( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection + :return: An iterator like instance of either WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -80,19 +93,15 @@ def prepare_request(next_link=None): 'actionName': self._serialize.url("action_name", action_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -111,14 +120,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} # type: ignore def get( self, @@ -143,16 +152,20 @@ def get( :param repetition_name: The workflow repetition. :type repetition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinition or the result of cls(response) + :return: WorkflowRunActionRepetitionDefinition, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,9 +182,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -179,17 +191,17 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} # type: ignore - def list_expression_trace( + def list_expression_traces( self, resource_group_name, # type: str workflow_name, # type: str @@ -198,7 +210,7 @@ def list_expression_trace( repetition_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ExpressionTraces" + # type: (...) -> Iterable["models.ExpressionTraces"] """Lists a workflow run expression trace. :param resource_group_name: The resource group name. @@ -212,18 +224,26 @@ def list_expression_trace( :param repetition_name: The workflow repetition. :type repetition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressionTraces or the result of cls(response) - :rtype: ~logic_management_client.models.ExpressionTraces + :return: An iterator like instance of either ExpressionTraces or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.ExpressionTraces] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ExpressionTraces"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_expression_trace.metadata['url'] + url = self.list_expression_traces.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -233,19 +253,15 @@ def prepare_request(next_link=None): 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -264,11 +280,11 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_expression_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_request_history_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py similarity index 76% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_request_history_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py index 86fa5de0eb5..54972718c6d 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_request_history_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class WorkflowRunActionRepetitionRequestHistoryOperations(object): - """WorkflowRunActionRepetitionRequestHistoryOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionRepetitionsRequestHistoriesOperations(object): + """WorkflowRunActionRepetitionsRequestHistoriesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -49,7 +54,7 @@ def list( repetition_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.RequestHistoryListResult" + # type: (...) -> Iterable["models.RequestHistoryListResult"] """List a workflow run repetition request history. :param resource_group_name: The resource group name. @@ -63,18 +68,26 @@ def list( :param repetition_name: The workflow repetition. :type repetition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistoryListResult + :return: An iterator like instance of either RequestHistoryListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.RequestHistoryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -84,19 +97,15 @@ def prepare_request(next_link=None): 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -115,14 +124,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'} # type: ignore def get( self, @@ -150,16 +159,20 @@ def get( :param request_history_name: The request history name. :type request_history_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistory or the result of cls(response) + :return: RequestHistory, or the result of cls(response) :rtype: ~logic_management_client.models.RequestHistory :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -177,9 +190,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -187,12 +199,12 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RequestHistory', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_history_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_histories_operations.py similarity index 75% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_history_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_histories_operations.py index f558cef9f46..c17e34fdea0 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_history_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_histories_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class WorkflowRunActionRequestHistoryOperations(object): - """WorkflowRunActionRequestHistoryOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionRequestHistoriesOperations(object): + """WorkflowRunActionRequestHistoriesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +53,7 @@ def list( action_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.RequestHistoryListResult" + # type: (...) -> Iterable["models.RequestHistoryListResult"] """List a workflow run request history. :param resource_group_name: The resource group name. @@ -60,18 +65,26 @@ def list( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistoryListResult + :return: An iterator like instance of either RequestHistoryListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.RequestHistoryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -80,19 +93,15 @@ def prepare_request(next_link=None): 'actionName': self._serialize.url("action_name", action_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -111,14 +120,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'} # type: ignore def get( self, @@ -143,16 +152,20 @@ def get( :param request_history_name: The request history name. :type request_history_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistory or the result of cls(response) + :return: RequestHistory, or the result of cls(response) :rtype: ~logic_management_client.models.RequestHistory :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,9 +182,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -179,12 +191,12 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RequestHistory', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetition_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetitions_operations.py similarity index 75% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetition_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetitions_operations.py index 8bd48b1fae4..154a57654f7 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetition_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetitions_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class WorkflowRunActionScopeRepetitionOperations(object): - """WorkflowRunActionScopeRepetitionOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionScopeRepetitionsOperations(object): + """WorkflowRunActionScopeRepetitionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +53,7 @@ def list( action_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.WorkflowRunActionRepetitionDefinitionCollection" + # type: (...) -> Iterable["models.WorkflowRunActionRepetitionDefinitionCollection"] """List the workflow run action scoped repetitions. :param resource_group_name: The resource group name. @@ -60,18 +65,26 @@ def list( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection + :return: An iterator like instance of either WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -80,19 +93,15 @@ def prepare_request(next_link=None): 'actionName': self._serialize.url("action_name", action_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -111,14 +120,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} # type: ignore def get( self, @@ -143,16 +152,20 @@ def get( :param repetition_name: The workflow repetition. :type repetition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinition or the result of cls(response) + :return: WorkflowRunActionRepetitionDefinition, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,9 +182,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -179,12 +191,12 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_actions_operations.py similarity index 70% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_actions_operations.py index 98c083e7b5b..3ea54b3479e 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_actions_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class WorkflowRunActionOperations(object): - """WorkflowRunActionOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionsOperations(object): + """WorkflowRunActionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -49,7 +54,7 @@ def list( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.WorkflowRunActionListResult" + # type: (...) -> Iterable["models.WorkflowRunActionListResult"] """Gets a list of workflow run actions. :param resource_group_name: The resource group name. @@ -63,18 +68,26 @@ def list( :param filter: The filter to apply on the operation. Options for filters include: Status. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionListResult + :return: An iterator like instance of either WorkflowRunActionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.WorkflowRunActionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -82,23 +95,19 @@ def prepare_request(next_link=None): 'runName': self._serialize.url("run_name", run_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -117,14 +126,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} # type: ignore def get( self, @@ -146,16 +155,20 @@ def get( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunAction or the result of cls(response) + :return: WorkflowRunAction, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRunAction :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunAction"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -171,9 +184,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -181,17 +193,17 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunAction', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} # type: ignore - def list_expression_trace( + def list_expression_traces( self, resource_group_name, # type: str workflow_name, # type: str @@ -199,7 +211,7 @@ def list_expression_trace( action_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ExpressionTraces" + # type: (...) -> Iterable["models.ExpressionTraces"] """Lists a workflow run expression trace. :param resource_group_name: The resource group name. @@ -211,18 +223,26 @@ def list_expression_trace( :param action_name: The workflow action name. :type action_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressionTraces or the result of cls(response) - :rtype: ~logic_management_client.models.ExpressionTraces + :return: An iterator like instance of either ExpressionTraces or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.ExpressionTraces] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ExpressionTraces"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_expression_trace.metadata['url'] + url = self.list_expression_traces.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -231,19 +251,15 @@ def prepare_request(next_link=None): 'actionName': self._serialize.url("action_name", action_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -262,11 +278,11 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_expression_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py similarity index 77% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operation_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py index c0c609527f9..2a777e91142 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operation_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py @@ -5,20 +5,25 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar -class WorkflowRunOperationOperations(object): - """WorkflowRunOperationOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunOperationsOperations(object): + """WorkflowRunOperationsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -59,16 +64,20 @@ def get( :param operation_id: The workflow operation id. :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRun or the result of cls(response) + :return: WorkflowRun, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRun :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -84,9 +93,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -94,12 +102,12 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRun', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_runs_operations.py similarity index 73% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_runs_operations.py index 44bd25c0029..5e1872465cb 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_runs_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class WorkflowRunOperations(object): - """WorkflowRunOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunsOperations(object): + """WorkflowRunsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +53,7 @@ def list( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.WorkflowRunListResult" + # type: (...) -> Iterable["models.WorkflowRunListResult"] """Gets a list of workflow runs. :param resource_group_name: The resource group name. @@ -58,44 +63,48 @@ def list( :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. + StartTime, and ClientTrackingId. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunListResult + :return: An iterator like instance of either WorkflowRunListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.WorkflowRunListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -114,14 +123,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} # type: ignore def get( self, @@ -140,16 +149,20 @@ def get( :param run_name: The workflow run name. :type run_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRun or the result of cls(response) + :return: WorkflowRun, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowRun :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -164,9 +177,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -174,15 +186,15 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRun', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} # type: ignore def cancel( self, @@ -201,16 +213,20 @@ def cancel( :param run_name: The workflow run name. :type run_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.cancel.metadata['url'] + url = self.cancel.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -225,8 +241,8 @@ def cancel( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -234,9 +250,9 @@ def cancel( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_history_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_histories_operations.py similarity index 75% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_history_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_histories_operations.py index f23446ceddc..791f36b2240 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_history_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_histories_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class WorkflowTriggerHistoryOperations(object): - """WorkflowTriggerHistoryOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowTriggerHistoriesOperations(object): + """WorkflowTriggerHistoriesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -49,7 +54,7 @@ def list( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.WorkflowTriggerHistoryListResult" + # type: (...) -> Iterable["models.WorkflowTriggerHistoryListResult"] """Gets a list of workflow trigger histories. :param resource_group_name: The resource group name. @@ -61,21 +66,29 @@ def list( :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. + StartTime, and ClientTrackingId. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerHistoryListResult + :return: An iterator like instance of either WorkflowTriggerHistoryListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.WorkflowTriggerHistoryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,23 +96,19 @@ def prepare_request(next_link=None): 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -118,14 +127,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} # type: ignore def get( self, @@ -148,16 +157,20 @@ def get( triggers that resulted in a run. :type history_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerHistory or the result of cls(response) + :return: WorkflowTriggerHistory, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerHistory :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -173,9 +186,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -183,15 +195,15 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerHistory', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} # type: ignore def resubmit( self, @@ -214,16 +226,20 @@ def resubmit( triggers that resulted in a run. :type history_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.resubmit.metadata['url'] + url = self.resubmit.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -239,8 +255,8 @@ def resubmit( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -248,9 +264,9 @@ def resubmit( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} + resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_triggers_operations.py similarity index 76% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_triggers_operations.py index b12fbd43f9e..116133eb734 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_triggers_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class WorkflowTriggerOperations(object): - """WorkflowTriggerOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowTriggersOperations(object): + """WorkflowTriggersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,7 +53,7 @@ def list( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.WorkflowTriggerListResult" + # type: (...) -> Iterable["models.WorkflowTriggerListResult"] """Gets a list of workflow triggers. :param resource_group_name: The resource group name. @@ -60,41 +65,45 @@ def list( :param filter: The filter to apply on the operation. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerListResult + :return: An iterator like instance of either WorkflowTriggerListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.WorkflowTriggerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -113,14 +122,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers'} # type: ignore def get( self, @@ -139,16 +148,20 @@ def get( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTrigger or the result of cls(response) + :return: WorkflowTrigger, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTrigger :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTrigger"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -163,9 +176,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -173,15 +185,15 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTrigger', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} # type: ignore def reset( self, @@ -200,16 +212,20 @@ def reset( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.reset.metadata['url'] + url = self.reset.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -224,8 +240,8 @@ def reset( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -233,12 +249,12 @@ def reset( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} + reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} # type: ignore def run( self, @@ -257,16 +273,20 @@ def run( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.run.metadata['url'] + url = self.run.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -281,21 +301,21 @@ def run( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in []: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize('object', response) - raise HttpResponseError(response=response, model=error) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} + run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} # type: ignore def get_schema_json( self, @@ -314,16 +334,20 @@ def get_schema_json( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: JsonSchema or the result of cls(response) + :return: JsonSchema, or the result of cls(response) :rtype: ~logic_management_client.models.JsonSchema :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.JsonSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get_schema_json.metadata['url'] + url = self.get_schema_json.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -338,9 +362,8 @@ def get_schema_json( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -348,22 +371,22 @@ def get_schema_json( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JsonSchema', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} + get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} # type: ignore def set_state( self, resource_group_name, # type: str workflow_name, # type: str trigger_name, # type: str - source, # type: "models.WorkflowTrigger" + set_state, # type: "models.SetTriggerStateActionDefinition" **kwargs # type: Any ): # type: (...) -> None @@ -375,22 +398,24 @@ def set_state( :type workflow_name: str :param trigger_name: The workflow trigger name. :type trigger_name: str - :param source: The source. - :type source: ~logic_management_client.models.WorkflowTrigger + :param set_state: The workflow trigger state. + :type set_state: ~logic_management_client.models.SetTriggerStateActionDefinition :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _set_state = models.SetTriggerStateActionDefinition(source=source) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.set_state.metadata['url'] + url = self.set_state.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -406,25 +431,24 @@ def set_state( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_set_state, 'SetTriggerStateActionDefinition') + body_content = self._serialize.body(set_state, 'SetTriggerStateActionDefinition') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} + set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} # type: ignore def list_callback_url( self, @@ -443,16 +467,20 @@ def list_callback_url( :param trigger_name: The workflow trigger name. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.list_callback_url.metadata['url'] + url = self.list_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -467,9 +495,8 @@ def list_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -477,12 +504,12 @@ def list_callback_url( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_trigger_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_triggers_operations.py similarity index 74% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_trigger_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_triggers_operations.py index 6a3515447af..17a255937a7 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_trigger_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_triggers_operations.py @@ -5,21 +5,25 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar -class WorkflowVersionTriggerOperations(object): - """WorkflowVersionTriggerOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowVersionTriggersOperations(object): + """WorkflowVersionTriggersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -46,8 +50,7 @@ def list_callback_url( workflow_name, # type: str version_id, # type: str trigger_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] + parameters=None, # type: Optional["models.GetCallbackUrlParameters"] **kwargs # type: Any ): # type: (...) -> "models.WorkflowTriggerCallbackUrl" @@ -61,24 +64,24 @@ def list_callback_url( :type version_id: str :param trigger_name: The workflow trigger name. :type trigger_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param parameters: The callback URL parameters. + :type parameters: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_callback_url.metadata['url'] + url = self.list_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -95,29 +98,27 @@ def list_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - if _parameters is not None: - body_content = self._serialize.body(_parameters, 'GetCallbackUrlParameters') + if parameters is not None: + body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') else: body_content = None body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_versions_operations.py similarity index 72% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_versions_operations.py index f6a72051320..772d36d0dec 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_versions_operations.py @@ -5,21 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -class WorkflowVersionOperations(object): - """WorkflowVersionOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowVersionsOperations(object): + """WorkflowVersionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -47,7 +52,7 @@ def list( top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> "models.WorkflowVersionListResult" + # type: (...) -> Iterable["models.WorkflowVersionListResult"] """Gets a list of workflow versions. :param resource_group_name: The resource group name. @@ -57,39 +62,43 @@ def list( :param top: The number of items to be included in the result. :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowVersionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowVersionListResult + :return: An iterator like instance of either WorkflowVersionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.WorkflowVersionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowVersionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -108,14 +117,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} # type: ignore def get( self, @@ -134,16 +143,20 @@ def get( :param version_id: The workflow versionId. :type version_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowVersion or the result of cls(response) + :return: WorkflowVersion, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowVersion :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowVersion"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -158,9 +171,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -168,12 +180,12 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowVersion', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflows_operations.py similarity index 68% rename from src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py rename to src/logic/azext_logic/vendored_sdks/logic/operations/_workflows_operations.py index 51d901031df..4e1b1b41e56 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflows_operations.py @@ -5,23 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -class WorkflowOperations(object): - """WorkflowOperations operations. + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowsOperations(object): + """WorkflowsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -48,48 +53,52 @@ def list_by_subscription( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.WorkflowListResult" + # type: (...) -> Iterable["models.WorkflowListResult"] """Gets a list of workflows by subscription. :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. + Trigger, and ReferencedResourceId. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowListResult + :return: An iterator like instance of either WorkflowListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.WorkflowListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -108,14 +117,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} # type: ignore def list_by_resource_group( self, @@ -124,7 +133,7 @@ def list_by_resource_group( filter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.WorkflowListResult" + # type: (...) -> Iterable["models.WorkflowListResult"] """Gets a list of workflows by resource group. :param resource_group_name: The resource group name. @@ -132,43 +141,47 @@ def list_by_resource_group( :param top: The number of items to be included in the result. :type top: int :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. + Trigger, and ReferencedResourceId. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowListResult + :return: An iterator like instance of either WorkflowListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~logic_management_client.models.WorkflowListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -187,14 +200,14 @@ def get_next(next_link=None): if response.status_code not in [200]: error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} # type: ignore def get( self, @@ -210,16 +223,20 @@ def get( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) + :return: Workflow, or the result of cls(response) :rtype: ~logic_management_client.models.Workflow :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -233,9 +250,8 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -243,29 +259,21 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workflow', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore def create_or_update( self, resource_group_name, # type: str workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - access_control=None, # type: Optional["models.FlowAccessControlConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] + workflow, # type: "models.Workflow" **kwargs # type: Any ): # type: (...) -> "models.Workflow" @@ -275,37 +283,24 @@ def create_or_update( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param workflow: The workflow. + :type workflow: ~logic_management_client.models.Workflow :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) - :rtype: ~logic_management_client.models.Workflow or ~logic_management_client.models.Workflow + :return: Workflow, or the result of cls(response) + :rtype: ~logic_management_client.models.Workflow :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _workflow = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, access_control=access_control, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -320,23 +315,20 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_workflow, 'Workflow') + body_content = self._serialize.body(workflow, 'Workflow') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('Workflow', pipeline_response) @@ -344,23 +336,15 @@ def create_or_update( deserialized = self._deserialize('Workflow', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore def update( self, resource_group_name, # type: str workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] **kwargs # type: Any ): # type: (...) -> "models.Workflow" @@ -370,36 +354,21 @@ def update( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) + :return: Workflow, or the result of cls(response) :rtype: ~logic_management_client.models.Workflow :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _workflow = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update.metadata['url'] + url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -413,30 +382,24 @@ def update( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_workflow, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.patch(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workflow', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore def delete( self, @@ -452,16 +415,20 @@ def delete( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -475,8 +442,8 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -484,12 +451,12 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore def disable( self, @@ -505,16 +472,20 @@ def disable( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.disable.metadata['url'] + url = self.disable.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -528,8 +499,8 @@ def disable( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -537,12 +508,12 @@ def disable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} + disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} # type: ignore def enable( self, @@ -558,16 +529,20 @@ def enable( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.enable.metadata['url'] + url = self.enable.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -581,8 +556,8 @@ def enable( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -590,18 +565,18 @@ def enable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} + enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} # type: ignore def generate_upgraded_definition( self, resource_group_name, # type: str workflow_name, # type: str - target_schema_version=None, # type: Optional[str] + parameters, # type: "models.GenerateUpgradedDefinitionParameters" **kwargs # type: Any ): # type: (...) -> object @@ -611,22 +586,24 @@ def generate_upgraded_definition( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param target_schema_version: The target schema version. - :type target_schema_version: str + :param parameters: Parameters for generating an upgraded definition. + :type parameters: ~logic_management_client.models.GenerateUpgradedDefinitionParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: object or the result of cls(response) + :return: object, or the result of cls(response) :rtype: object :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[object] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.generate_upgraded_definition.metadata['url'] + url = self.generate_upgraded_definition.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -641,36 +618,33 @@ def generate_upgraded_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'GenerateUpgradedDefinitionParameters') + body_content = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} + generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} # type: ignore def list_callback_url( self, resource_group_name, # type: str workflow_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] + list_callback_url, # type: "models.GetCallbackUrlParameters" **kwargs # type: Any ): # type: (...) -> "models.WorkflowTriggerCallbackUrl" @@ -680,24 +654,24 @@ def list_callback_url( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param list_callback_url: Which callback url to list. + :type list_callback_url: ~logic_management_client.models.GetCallbackUrlParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.list_callback_url.metadata['url'] + url = self.list_callback_url.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -712,29 +686,27 @@ def list_callback_url( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_callback_url, 'GetCallbackUrlParameters') + body_content = self._serialize.body(list_callback_url, 'GetCallbackUrlParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} # type: ignore def list_swagger( self, @@ -750,16 +722,20 @@ def list_swagger( :param workflow_name: The workflow name. :type workflow_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: object or the result of cls(response) + :return: object, or the result of cls(response) :rtype: object :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[object] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + accept = "application/json" # Construct URL - url = self.list_swagger.metadata['url'] + url = self.list_swagger.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -773,9 +749,8 @@ def list_swagger( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -783,40 +758,35 @@ def list_swagger( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} + list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} # type: ignore def _move_initial( self, resource_group_name, # type: str workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] + move, # type: "models.WorkflowReference" **kwargs # type: Any ): # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _move = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._move_initial.metadata['url'] + url = self._move_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -831,108 +801,99 @@ def _move_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_move, 'Workflow') + body_content = self._serialize.body(move, 'WorkflowReference') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - _move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} + _move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} # type: ignore def begin_move( self, resource_group_name, # type: str workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] + move, # type: "models.WorkflowReference" **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> LROPoller[None] """Moves an existing workflow. :param resource_group_name: The resource group name. :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param move: The workflow to move. + :type move: ~logic_management_client.models.WorkflowReference :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns None + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] - raw_result = self._move_initial( - resource_group_name=resource_group_name, - workflow_name=workflow_name, - location=location, - tags=tags, - state=state, - endpoints_configuration=endpoints_configuration, - integration_account=integration_account, - integration_service_environment=integration_service_environment, - definition=definition, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._move_initial( + resource_group_name=resource_group_name, + workflow_name=workflow_name, + move=move, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} # type: ignore def regenerate_access_key( self, resource_group_name, # type: str workflow_name, # type: str - key_type=None, # type: Optional[Union[str, "models.KeyType"]] + key_type, # type: "models.RegenerateActionParameter" **kwargs # type: Any ): # type: (...) -> None @@ -942,22 +903,24 @@ def regenerate_access_key( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType + :param key_type: The access key type. + :type key_type: ~logic_management_client.models.RegenerateActionParameter :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _key_type = models.RegenerateActionParameter(key_type=key_type) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.regenerate_access_key.metadata['url'] + url = self.regenerate_access_key.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -972,38 +935,30 @@ def regenerate_access_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_key_type, 'RegenerateActionParameter') + body_content = self._serialize.body(key_type, 'RegenerateActionParameter') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} # type: ignore def validate_by_resource_group( self, resource_group_name, # type: str workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] + validate, # type: "models.Workflow" **kwargs # type: Any ): # type: (...) -> None @@ -1013,36 +968,24 @@ def validate_by_resource_group( :type resource_group_name: str :param workflow_name: The workflow name. :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param validate: The workflow. + :type validate: ~logic_management_client.models.Workflow :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _validate = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.validate_by_resource_group.metadata['url'] + url = self.validate_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -1057,31 +1000,31 @@ def validate_by_resource_group( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_validate, 'Workflow') + body_content = self._serialize.body(validate, 'Workflow') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - validate_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} + validate_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} # type: ignore def validate_by_location( self, resource_group_name, # type: str location, # type: str workflow_name, # type: str + validate, # type: "models.Workflow" **kwargs # type: Any ): # type: (...) -> None @@ -1093,17 +1036,24 @@ def validate_by_location( :type location: str :param workflow_name: The workflow name. :type workflow_name: str + :param validate: The workflow. + :type validate: ~logic_management_client.models.Workflow :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) + :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) api_version = "2019-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.validate_by_location.metadata['url'] + url = self.validate_by_location.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -1118,18 +1068,22 @@ def validate_by_location( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate, 'Workflow') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) - validate_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} + validate_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} # type: ignore diff --git a/src/logic/report.md b/src/logic/report.md index 249fe951e66..3e5c74703d2 100644 --- a/src/logic/report.md +++ b/src/logic/report.md @@ -1,242 +1,2210 @@ # Azure CLI Module Creation Report -### logic integration-account create +## EXTENSION +|CLI Extension|Command Groups| +|---------|------------| +|az logic|[groups](#CommandGroups) -create a logic integration-account. +## GROUPS +### Command groups in `az logic` extension +|CLI Command Group|Group Swagger name|Commands| +|---------|------------|--------| +|az logic workflow|Workflows|[commands](#CommandsInWorkflows)| +|az logic workflow-version|WorkflowVersions|[commands](#CommandsInWorkflowVersions)| +|az logic workflow-trigger|WorkflowTriggers|[commands](#CommandsInWorkflowTriggers)| +|az logic workflow-version-trigger|WorkflowVersionTriggers|[commands](#CommandsInWorkflowVersionTriggers)| +|az logic workflow-trigger-history|WorkflowTriggerHistories|[commands](#CommandsInWorkflowTriggerHistories)| +|az logic workflow-run|WorkflowRuns|[commands](#CommandsInWorkflowRuns)| +|az logic workflow-run-action|WorkflowRunActions|[commands](#CommandsInWorkflowRunActions)| +|az logic workflow-run-action-repetition|WorkflowRunActionRepetitions|[commands](#CommandsInWorkflowRunActionRepetitions)| +|az logic workflow-run-action-repetition-request-history|WorkflowRunActionRepetitionsRequestHistories|[commands](#CommandsInWorkflowRunActionRepetitionsRequestHistories)| +|az logic workflow-run-action-request-history|WorkflowRunActionRequestHistories|[commands](#CommandsInWorkflowRunActionRequestHistories)| +|az logic workflow-run-action-scope-repetition|WorkflowRunActionScopeRepetitions|[commands](#CommandsInWorkflowRunActionScopeRepetitions)| +|az logic workflow-run-operation|WorkflowRunOperations|[commands](#CommandsInWorkflowRunOperations)| +|az logic integration-account|IntegrationAccounts|[commands](#CommandsInIntegrationAccounts)| +|az logic integration-account-assembly|IntegrationAccountAssemblies|[commands](#CommandsInIntegrationAccountAssemblies)| +|az logic integration-account-batch-configuration|IntegrationAccountBatchConfigurations|[commands](#CommandsInIntegrationAccountBatchConfigurations)| +|az logic integration-account-schema|IntegrationAccountSchemas|[commands](#CommandsInIntegrationAccountSchemas)| +|az logic integration-account-map|IntegrationAccountMaps|[commands](#CommandsInIntegrationAccountMaps)| +|az logic integration-account-partner|IntegrationAccountPartners|[commands](#CommandsInIntegrationAccountPartners)| +|az logic integration-account-agreement|IntegrationAccountAgreements|[commands](#CommandsInIntegrationAccountAgreements)| +|az logic integration-account-certificate|IntegrationAccountCertificates|[commands](#CommandsInIntegrationAccountCertificates)| +|az logic integration-account-session|IntegrationAccountSessions|[commands](#CommandsInIntegrationAccountSessions)| +|az logic integration-service-environment|IntegrationServiceEnvironments|[commands](#CommandsInIntegrationServiceEnvironments)| +|az logic integration-service-environment-sku|IntegrationServiceEnvironmentSkus|[commands](#CommandsInIntegrationServiceEnvironmentSkus)| +|az logic integration-service-environment-network-health|IntegrationServiceEnvironmentNetworkHealth|[commands](#CommandsInIntegrationServiceEnvironmentNetworkHealth)| +|az logic integration-service-environment-managed-api|IntegrationServiceEnvironmentManagedApis|[commands](#CommandsInIntegrationServiceEnvironmentManagedApis)| +|az logic integration-service-environment-managed-api-operation|IntegrationServiceEnvironmentManagedApiOperations|[commands](#CommandsInIntegrationServiceEnvironmentManagedApiOperations)| -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--integration_account_name**|string|The integration account name.|integration_account_name|integration_account_name| +## COMMANDS +### Commands in `az logic integration-account` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-account list](#IntegrationAccountsListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersIntegrationAccountsListByResourceGroup)|[Example](#ExamplesIntegrationAccountsListByResourceGroup)| +|[az logic integration-account list](#IntegrationAccountsListBySubscription)|ListBySubscription|[Parameters](#ParametersIntegrationAccountsListBySubscription)|[Example](#ExamplesIntegrationAccountsListBySubscription)| +|[az logic integration-account show](#IntegrationAccountsGet)|Get|[Parameters](#ParametersIntegrationAccountsGet)|[Example](#ExamplesIntegrationAccountsGet)| +|[az logic integration-account create](#IntegrationAccountsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationAccountsCreateOrUpdate#Create)|[Example](#ExamplesIntegrationAccountsCreateOrUpdate#Create)| +|[az logic integration-account update](#IntegrationAccountsUpdate)|Update|[Parameters](#ParametersIntegrationAccountsUpdate)|[Example](#ExamplesIntegrationAccountsUpdate)| +|[az logic integration-account delete](#IntegrationAccountsDelete)|Delete|[Parameters](#ParametersIntegrationAccountsDelete)|[Example](#ExamplesIntegrationAccountsDelete)| +|[az logic integration-account list-callback-url](#IntegrationAccountsListCallbackUrl)|ListCallbackUrl|[Parameters](#ParametersIntegrationAccountsListCallbackUrl)|[Example](#ExamplesIntegrationAccountsListCallbackUrl)| +|[az logic integration-account list-key-vault-key](#IntegrationAccountsListKeyVaultKeys)|ListKeyVaultKeys|[Parameters](#ParametersIntegrationAccountsListKeyVaultKeys)|[Example](#ExamplesIntegrationAccountsListKeyVaultKeys)| +|[az logic integration-account log-tracking-event](#IntegrationAccountsLogTrackingEvents)|LogTrackingEvents|[Parameters](#ParametersIntegrationAccountsLogTrackingEvents)|[Example](#ExamplesIntegrationAccountsLogTrackingEvents)| +|[az logic integration-account regenerate-access-key](#IntegrationAccountsRegenerateAccessKey)|RegenerateAccessKey|[Parameters](#ParametersIntegrationAccountsRegenerateAccessKey)|[Example](#ExamplesIntegrationAccountsRegenerateAccessKey)| + +### Commands in `az logic integration-account-agreement` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-account-agreement list](#IntegrationAccountAgreementsList)|List|[Parameters](#ParametersIntegrationAccountAgreementsList)|[Example](#ExamplesIntegrationAccountAgreementsList)| +|[az logic integration-account-agreement show](#IntegrationAccountAgreementsGet)|Get|[Parameters](#ParametersIntegrationAccountAgreementsGet)|[Example](#ExamplesIntegrationAccountAgreementsGet)| +|[az logic integration-account-agreement create](#IntegrationAccountAgreementsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationAccountAgreementsCreateOrUpdate#Create)|[Example](#ExamplesIntegrationAccountAgreementsCreateOrUpdate#Create)| +|[az logic integration-account-agreement update](#IntegrationAccountAgreementsCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersIntegrationAccountAgreementsCreateOrUpdate#Update)|Not Found| +|[az logic integration-account-agreement delete](#IntegrationAccountAgreementsDelete)|Delete|[Parameters](#ParametersIntegrationAccountAgreementsDelete)|[Example](#ExamplesIntegrationAccountAgreementsDelete)| +|[az logic integration-account-agreement list-content-callback-url](#IntegrationAccountAgreementsListContentCallbackUrl)|ListContentCallbackUrl|[Parameters](#ParametersIntegrationAccountAgreementsListContentCallbackUrl)|[Example](#ExamplesIntegrationAccountAgreementsListContentCallbackUrl)| + +### Commands in `az logic integration-account-assembly` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-account-assembly list](#IntegrationAccountAssembliesList)|List|[Parameters](#ParametersIntegrationAccountAssembliesList)|[Example](#ExamplesIntegrationAccountAssembliesList)| +|[az logic integration-account-assembly show](#IntegrationAccountAssembliesGet)|Get|[Parameters](#ParametersIntegrationAccountAssembliesGet)|[Example](#ExamplesIntegrationAccountAssembliesGet)| +|[az logic integration-account-assembly create](#IntegrationAccountAssembliesCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationAccountAssembliesCreateOrUpdate#Create)|[Example](#ExamplesIntegrationAccountAssembliesCreateOrUpdate#Create)| +|[az logic integration-account-assembly update](#IntegrationAccountAssembliesCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersIntegrationAccountAssembliesCreateOrUpdate#Update)|Not Found| +|[az logic integration-account-assembly delete](#IntegrationAccountAssembliesDelete)|Delete|[Parameters](#ParametersIntegrationAccountAssembliesDelete)|[Example](#ExamplesIntegrationAccountAssembliesDelete)| +|[az logic integration-account-assembly list-content-callback-url](#IntegrationAccountAssembliesListContentCallbackUrl)|ListContentCallbackUrl|[Parameters](#ParametersIntegrationAccountAssembliesListContentCallbackUrl)|[Example](#ExamplesIntegrationAccountAssembliesListContentCallbackUrl)| + +### Commands in `az logic integration-account-batch-configuration` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-account-batch-configuration list](#IntegrationAccountBatchConfigurationsList)|List|[Parameters](#ParametersIntegrationAccountBatchConfigurationsList)|[Example](#ExamplesIntegrationAccountBatchConfigurationsList)| +|[az logic integration-account-batch-configuration show](#IntegrationAccountBatchConfigurationsGet)|Get|[Parameters](#ParametersIntegrationAccountBatchConfigurationsGet)|[Example](#ExamplesIntegrationAccountBatchConfigurationsGet)| +|[az logic integration-account-batch-configuration create](#IntegrationAccountBatchConfigurationsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationAccountBatchConfigurationsCreateOrUpdate#Create)|[Example](#ExamplesIntegrationAccountBatchConfigurationsCreateOrUpdate#Create)| +|[az logic integration-account-batch-configuration update](#IntegrationAccountBatchConfigurationsCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersIntegrationAccountBatchConfigurationsCreateOrUpdate#Update)|Not Found| +|[az logic integration-account-batch-configuration delete](#IntegrationAccountBatchConfigurationsDelete)|Delete|[Parameters](#ParametersIntegrationAccountBatchConfigurationsDelete)|[Example](#ExamplesIntegrationAccountBatchConfigurationsDelete)| + +### Commands in `az logic integration-account-certificate` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-account-certificate list](#IntegrationAccountCertificatesList)|List|[Parameters](#ParametersIntegrationAccountCertificatesList)|[Example](#ExamplesIntegrationAccountCertificatesList)| +|[az logic integration-account-certificate show](#IntegrationAccountCertificatesGet)|Get|[Parameters](#ParametersIntegrationAccountCertificatesGet)|[Example](#ExamplesIntegrationAccountCertificatesGet)| +|[az logic integration-account-certificate create](#IntegrationAccountCertificatesCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationAccountCertificatesCreateOrUpdate#Create)|[Example](#ExamplesIntegrationAccountCertificatesCreateOrUpdate#Create)| +|[az logic integration-account-certificate update](#IntegrationAccountCertificatesCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersIntegrationAccountCertificatesCreateOrUpdate#Update)|Not Found| +|[az logic integration-account-certificate delete](#IntegrationAccountCertificatesDelete)|Delete|[Parameters](#ParametersIntegrationAccountCertificatesDelete)|[Example](#ExamplesIntegrationAccountCertificatesDelete)| + +### Commands in `az logic integration-account-map` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-account-map list](#IntegrationAccountMapsList)|List|[Parameters](#ParametersIntegrationAccountMapsList)|[Example](#ExamplesIntegrationAccountMapsList)| +|[az logic integration-account-map show](#IntegrationAccountMapsGet)|Get|[Parameters](#ParametersIntegrationAccountMapsGet)|[Example](#ExamplesIntegrationAccountMapsGet)| +|[az logic integration-account-map create](#IntegrationAccountMapsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationAccountMapsCreateOrUpdate#Create)|[Example](#ExamplesIntegrationAccountMapsCreateOrUpdate#Create)| +|[az logic integration-account-map update](#IntegrationAccountMapsCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersIntegrationAccountMapsCreateOrUpdate#Update)|Not Found| +|[az logic integration-account-map delete](#IntegrationAccountMapsDelete)|Delete|[Parameters](#ParametersIntegrationAccountMapsDelete)|[Example](#ExamplesIntegrationAccountMapsDelete)| +|[az logic integration-account-map list-content-callback-url](#IntegrationAccountMapsListContentCallbackUrl)|ListContentCallbackUrl|[Parameters](#ParametersIntegrationAccountMapsListContentCallbackUrl)|[Example](#ExamplesIntegrationAccountMapsListContentCallbackUrl)| + +### Commands in `az logic integration-account-partner` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-account-partner list](#IntegrationAccountPartnersList)|List|[Parameters](#ParametersIntegrationAccountPartnersList)|[Example](#ExamplesIntegrationAccountPartnersList)| +|[az logic integration-account-partner show](#IntegrationAccountPartnersGet)|Get|[Parameters](#ParametersIntegrationAccountPartnersGet)|[Example](#ExamplesIntegrationAccountPartnersGet)| +|[az logic integration-account-partner create](#IntegrationAccountPartnersCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationAccountPartnersCreateOrUpdate#Create)|[Example](#ExamplesIntegrationAccountPartnersCreateOrUpdate#Create)| +|[az logic integration-account-partner update](#IntegrationAccountPartnersCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersIntegrationAccountPartnersCreateOrUpdate#Update)|Not Found| +|[az logic integration-account-partner delete](#IntegrationAccountPartnersDelete)|Delete|[Parameters](#ParametersIntegrationAccountPartnersDelete)|[Example](#ExamplesIntegrationAccountPartnersDelete)| +|[az logic integration-account-partner list-content-callback-url](#IntegrationAccountPartnersListContentCallbackUrl)|ListContentCallbackUrl|[Parameters](#ParametersIntegrationAccountPartnersListContentCallbackUrl)|[Example](#ExamplesIntegrationAccountPartnersListContentCallbackUrl)| + +### Commands in `az logic integration-account-schema` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-account-schema list](#IntegrationAccountSchemasList)|List|[Parameters](#ParametersIntegrationAccountSchemasList)|[Example](#ExamplesIntegrationAccountSchemasList)| +|[az logic integration-account-schema show](#IntegrationAccountSchemasGet)|Get|[Parameters](#ParametersIntegrationAccountSchemasGet)|[Example](#ExamplesIntegrationAccountSchemasGet)| +|[az logic integration-account-schema create](#IntegrationAccountSchemasCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationAccountSchemasCreateOrUpdate#Create)|[Example](#ExamplesIntegrationAccountSchemasCreateOrUpdate#Create)| +|[az logic integration-account-schema update](#IntegrationAccountSchemasCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersIntegrationAccountSchemasCreateOrUpdate#Update)|Not Found| +|[az logic integration-account-schema delete](#IntegrationAccountSchemasDelete)|Delete|[Parameters](#ParametersIntegrationAccountSchemasDelete)|[Example](#ExamplesIntegrationAccountSchemasDelete)| +|[az logic integration-account-schema list-content-callback-url](#IntegrationAccountSchemasListContentCallbackUrl)|ListContentCallbackUrl|[Parameters](#ParametersIntegrationAccountSchemasListContentCallbackUrl)|[Example](#ExamplesIntegrationAccountSchemasListContentCallbackUrl)| + +### Commands in `az logic integration-account-session` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-account-session list](#IntegrationAccountSessionsList)|List|[Parameters](#ParametersIntegrationAccountSessionsList)|[Example](#ExamplesIntegrationAccountSessionsList)| +|[az logic integration-account-session show](#IntegrationAccountSessionsGet)|Get|[Parameters](#ParametersIntegrationAccountSessionsGet)|[Example](#ExamplesIntegrationAccountSessionsGet)| +|[az logic integration-account-session create](#IntegrationAccountSessionsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationAccountSessionsCreateOrUpdate#Create)|[Example](#ExamplesIntegrationAccountSessionsCreateOrUpdate#Create)| +|[az logic integration-account-session update](#IntegrationAccountSessionsCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersIntegrationAccountSessionsCreateOrUpdate#Update)|Not Found| +|[az logic integration-account-session delete](#IntegrationAccountSessionsDelete)|Delete|[Parameters](#ParametersIntegrationAccountSessionsDelete)|[Example](#ExamplesIntegrationAccountSessionsDelete)| + +### Commands in `az logic integration-service-environment` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-service-environment list](#IntegrationServiceEnvironmentsListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersIntegrationServiceEnvironmentsListByResourceGroup)|[Example](#ExamplesIntegrationServiceEnvironmentsListByResourceGroup)| +|[az logic integration-service-environment list](#IntegrationServiceEnvironmentsListBySubscription)|ListBySubscription|[Parameters](#ParametersIntegrationServiceEnvironmentsListBySubscription)|[Example](#ExamplesIntegrationServiceEnvironmentsListBySubscription)| +|[az logic integration-service-environment show](#IntegrationServiceEnvironmentsGet)|Get|[Parameters](#ParametersIntegrationServiceEnvironmentsGet)|[Example](#ExamplesIntegrationServiceEnvironmentsGet)| +|[az logic integration-service-environment create](#IntegrationServiceEnvironmentsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersIntegrationServiceEnvironmentsCreateOrUpdate#Create)|[Example](#ExamplesIntegrationServiceEnvironmentsCreateOrUpdate#Create)| +|[az logic integration-service-environment update](#IntegrationServiceEnvironmentsUpdate)|Update|[Parameters](#ParametersIntegrationServiceEnvironmentsUpdate)|[Example](#ExamplesIntegrationServiceEnvironmentsUpdate)| +|[az logic integration-service-environment delete](#IntegrationServiceEnvironmentsDelete)|Delete|[Parameters](#ParametersIntegrationServiceEnvironmentsDelete)|[Example](#ExamplesIntegrationServiceEnvironmentsDelete)| +|[az logic integration-service-environment restart](#IntegrationServiceEnvironmentsRestart)|Restart|[Parameters](#ParametersIntegrationServiceEnvironmentsRestart)|[Example](#ExamplesIntegrationServiceEnvironmentsRestart)| + +### Commands in `az logic integration-service-environment-managed-api` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-service-environment-managed-api list](#IntegrationServiceEnvironmentManagedApisList)|List|[Parameters](#ParametersIntegrationServiceEnvironmentManagedApisList)|[Example](#ExamplesIntegrationServiceEnvironmentManagedApisList)| +|[az logic integration-service-environment-managed-api show](#IntegrationServiceEnvironmentManagedApisGet)|Get|[Parameters](#ParametersIntegrationServiceEnvironmentManagedApisGet)|[Example](#ExamplesIntegrationServiceEnvironmentManagedApisGet)| +|[az logic integration-service-environment-managed-api delete](#IntegrationServiceEnvironmentManagedApisDelete)|Delete|[Parameters](#ParametersIntegrationServiceEnvironmentManagedApisDelete)|[Example](#ExamplesIntegrationServiceEnvironmentManagedApisDelete)| +|[az logic integration-service-environment-managed-api put](#IntegrationServiceEnvironmentManagedApisPut)|Put|[Parameters](#ParametersIntegrationServiceEnvironmentManagedApisPut)|[Example](#ExamplesIntegrationServiceEnvironmentManagedApisPut)| + +### Commands in `az logic integration-service-environment-managed-api-operation` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-service-environment-managed-api-operation list](#IntegrationServiceEnvironmentManagedApiOperationsList)|List|[Parameters](#ParametersIntegrationServiceEnvironmentManagedApiOperationsList)|[Example](#ExamplesIntegrationServiceEnvironmentManagedApiOperationsList)| + +### Commands in `az logic integration-service-environment-network-health` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-service-environment-network-health show](#IntegrationServiceEnvironmentNetworkHealthGet)|Get|[Parameters](#ParametersIntegrationServiceEnvironmentNetworkHealthGet)|[Example](#ExamplesIntegrationServiceEnvironmentNetworkHealthGet)| + +### Commands in `az logic integration-service-environment-sku` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic integration-service-environment-sku list](#IntegrationServiceEnvironmentSkusList)|List|[Parameters](#ParametersIntegrationServiceEnvironmentSkusList)|[Example](#ExamplesIntegrationServiceEnvironmentSkusList)| + +### Commands in `az logic workflow` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow list](#WorkflowsListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersWorkflowsListByResourceGroup)|[Example](#ExamplesWorkflowsListByResourceGroup)| +|[az logic workflow list](#WorkflowsListBySubscription)|ListBySubscription|[Parameters](#ParametersWorkflowsListBySubscription)|[Example](#ExamplesWorkflowsListBySubscription)| +|[az logic workflow show](#WorkflowsGet)|Get|[Parameters](#ParametersWorkflowsGet)|[Example](#ExamplesWorkflowsGet)| +|[az logic workflow create](#WorkflowsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersWorkflowsCreateOrUpdate#Create)|[Example](#ExamplesWorkflowsCreateOrUpdate#Create)| +|[az logic workflow update](#WorkflowsUpdate)|Update|[Parameters](#ParametersWorkflowsUpdate)|[Example](#ExamplesWorkflowsUpdate)| +|[az logic workflow delete](#WorkflowsDelete)|Delete|[Parameters](#ParametersWorkflowsDelete)|[Example](#ExamplesWorkflowsDelete)| +|[az logic workflow disable](#WorkflowsDisable)|Disable|[Parameters](#ParametersWorkflowsDisable)|[Example](#ExamplesWorkflowsDisable)| +|[az logic workflow enable](#WorkflowsEnable)|Enable|[Parameters](#ParametersWorkflowsEnable)|[Example](#ExamplesWorkflowsEnable)| +|[az logic workflow generate-upgraded-definition](#WorkflowsGenerateUpgradedDefinition)|GenerateUpgradedDefinition|[Parameters](#ParametersWorkflowsGenerateUpgradedDefinition)|[Example](#ExamplesWorkflowsGenerateUpgradedDefinition)| +|[az logic workflow list-callback-url](#WorkflowsListCallbackUrl)|ListCallbackUrl|[Parameters](#ParametersWorkflowsListCallbackUrl)|[Example](#ExamplesWorkflowsListCallbackUrl)| +|[az logic workflow list-swagger](#WorkflowsListSwagger)|ListSwagger|[Parameters](#ParametersWorkflowsListSwagger)|[Example](#ExamplesWorkflowsListSwagger)| +|[az logic workflow move](#WorkflowsMove)|Move|[Parameters](#ParametersWorkflowsMove)|[Example](#ExamplesWorkflowsMove)| +|[az logic workflow regenerate-access-key](#WorkflowsRegenerateAccessKey)|RegenerateAccessKey|[Parameters](#ParametersWorkflowsRegenerateAccessKey)|[Example](#ExamplesWorkflowsRegenerateAccessKey)| +|[az logic workflow validate-by-location](#WorkflowsValidateByLocation)|ValidateByLocation|[Parameters](#ParametersWorkflowsValidateByLocation)|[Example](#ExamplesWorkflowsValidateByLocation)| +|[az logic workflow validate-by-resource-group](#WorkflowsValidateByResourceGroup)|ValidateByResourceGroup|[Parameters](#ParametersWorkflowsValidateByResourceGroup)|[Example](#ExamplesWorkflowsValidateByResourceGroup)| + +### Commands in `az logic workflow-run` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-run list](#WorkflowRunsList)|List|[Parameters](#ParametersWorkflowRunsList)|[Example](#ExamplesWorkflowRunsList)| +|[az logic workflow-run show](#WorkflowRunsGet)|Get|[Parameters](#ParametersWorkflowRunsGet)|[Example](#ExamplesWorkflowRunsGet)| +|[az logic workflow-run cancel](#WorkflowRunsCancel)|Cancel|[Parameters](#ParametersWorkflowRunsCancel)|[Example](#ExamplesWorkflowRunsCancel)| + +### Commands in `az logic workflow-run-action` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-run-action list](#WorkflowRunActionsList)|List|[Parameters](#ParametersWorkflowRunActionsList)|[Example](#ExamplesWorkflowRunActionsList)| +|[az logic workflow-run-action show](#WorkflowRunActionsGet)|Get|[Parameters](#ParametersWorkflowRunActionsGet)|[Example](#ExamplesWorkflowRunActionsGet)| +|[az logic workflow-run-action list-expression-trace](#WorkflowRunActionsListExpressionTraces)|ListExpressionTraces|[Parameters](#ParametersWorkflowRunActionsListExpressionTraces)|[Example](#ExamplesWorkflowRunActionsListExpressionTraces)| + +### Commands in `az logic workflow-run-action-repetition` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-run-action-repetition list](#WorkflowRunActionRepetitionsList)|List|[Parameters](#ParametersWorkflowRunActionRepetitionsList)|[Example](#ExamplesWorkflowRunActionRepetitionsList)| +|[az logic workflow-run-action-repetition show](#WorkflowRunActionRepetitionsGet)|Get|[Parameters](#ParametersWorkflowRunActionRepetitionsGet)|[Example](#ExamplesWorkflowRunActionRepetitionsGet)| +|[az logic workflow-run-action-repetition list-expression-trace](#WorkflowRunActionRepetitionsListExpressionTraces)|ListExpressionTraces|[Parameters](#ParametersWorkflowRunActionRepetitionsListExpressionTraces)|[Example](#ExamplesWorkflowRunActionRepetitionsListExpressionTraces)| + +### Commands in `az logic workflow-run-action-repetition-request-history` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-run-action-repetition-request-history list](#WorkflowRunActionRepetitionsRequestHistoriesList)|List|[Parameters](#ParametersWorkflowRunActionRepetitionsRequestHistoriesList)|[Example](#ExamplesWorkflowRunActionRepetitionsRequestHistoriesList)| +|[az logic workflow-run-action-repetition-request-history show](#WorkflowRunActionRepetitionsRequestHistoriesGet)|Get|[Parameters](#ParametersWorkflowRunActionRepetitionsRequestHistoriesGet)|[Example](#ExamplesWorkflowRunActionRepetitionsRequestHistoriesGet)| + +### Commands in `az logic workflow-run-action-request-history` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-run-action-request-history list](#WorkflowRunActionRequestHistoriesList)|List|[Parameters](#ParametersWorkflowRunActionRequestHistoriesList)|[Example](#ExamplesWorkflowRunActionRequestHistoriesList)| +|[az logic workflow-run-action-request-history show](#WorkflowRunActionRequestHistoriesGet)|Get|[Parameters](#ParametersWorkflowRunActionRequestHistoriesGet)|[Example](#ExamplesWorkflowRunActionRequestHistoriesGet)| + +### Commands in `az logic workflow-run-action-scope-repetition` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-run-action-scope-repetition list](#WorkflowRunActionScopeRepetitionsList)|List|[Parameters](#ParametersWorkflowRunActionScopeRepetitionsList)|[Example](#ExamplesWorkflowRunActionScopeRepetitionsList)| +|[az logic workflow-run-action-scope-repetition show](#WorkflowRunActionScopeRepetitionsGet)|Get|[Parameters](#ParametersWorkflowRunActionScopeRepetitionsGet)|[Example](#ExamplesWorkflowRunActionScopeRepetitionsGet)| + +### Commands in `az logic workflow-run-operation` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-run-operation show](#WorkflowRunOperationsGet)|Get|[Parameters](#ParametersWorkflowRunOperationsGet)|[Example](#ExamplesWorkflowRunOperationsGet)| + +### Commands in `az logic workflow-trigger` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-trigger list](#WorkflowTriggersList)|List|[Parameters](#ParametersWorkflowTriggersList)|[Example](#ExamplesWorkflowTriggersList)| +|[az logic workflow-trigger show](#WorkflowTriggersGet)|Get|[Parameters](#ParametersWorkflowTriggersGet)|[Example](#ExamplesWorkflowTriggersGet)| +|[az logic workflow-trigger list-callback-url](#WorkflowTriggersListCallbackUrl)|ListCallbackUrl|[Parameters](#ParametersWorkflowTriggersListCallbackUrl)|[Example](#ExamplesWorkflowTriggersListCallbackUrl)| +|[az logic workflow-trigger reset](#WorkflowTriggersReset)|Reset|[Parameters](#ParametersWorkflowTriggersReset)|[Example](#ExamplesWorkflowTriggersReset)| +|[az logic workflow-trigger run](#WorkflowTriggersRun)|Run|[Parameters](#ParametersWorkflowTriggersRun)|[Example](#ExamplesWorkflowTriggersRun)| +|[az logic workflow-trigger set-state](#WorkflowTriggersSetState)|SetState|[Parameters](#ParametersWorkflowTriggersSetState)|[Example](#ExamplesWorkflowTriggersSetState)| +|[az logic workflow-trigger show-schema-json](#WorkflowTriggersGetSchemaJson)|GetSchemaJson|[Parameters](#ParametersWorkflowTriggersGetSchemaJson)|[Example](#ExamplesWorkflowTriggersGetSchemaJson)| + +### Commands in `az logic workflow-trigger-history` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-trigger-history list](#WorkflowTriggerHistoriesList)|List|[Parameters](#ParametersWorkflowTriggerHistoriesList)|[Example](#ExamplesWorkflowTriggerHistoriesList)| +|[az logic workflow-trigger-history show](#WorkflowTriggerHistoriesGet)|Get|[Parameters](#ParametersWorkflowTriggerHistoriesGet)|[Example](#ExamplesWorkflowTriggerHistoriesGet)| +|[az logic workflow-trigger-history resubmit](#WorkflowTriggerHistoriesResubmit)|Resubmit|[Parameters](#ParametersWorkflowTriggerHistoriesResubmit)|[Example](#ExamplesWorkflowTriggerHistoriesResubmit)| + +### Commands in `az logic workflow-version` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-version list](#WorkflowVersionsList)|List|[Parameters](#ParametersWorkflowVersionsList)|[Example](#ExamplesWorkflowVersionsList)| +|[az logic workflow-version show](#WorkflowVersionsGet)|Get|[Parameters](#ParametersWorkflowVersionsGet)|[Example](#ExamplesWorkflowVersionsGet)| + +### Commands in `az logic workflow-version-trigger` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az logic workflow-version-trigger list-callback-url](#WorkflowVersionTriggersListCallbackUrl)|ListCallbackUrl|[Parameters](#ParametersWorkflowVersionTriggersListCallbackUrl)|[Example](#ExamplesWorkflowVersionTriggersListCallbackUrl)| + + +## COMMAND DETAILS + +### group `az logic integration-account` +#### Command `az logic integration-account list` + +##### Example +``` +az logic integration-account list --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--top**|integer|The number of items to be included in the result.|top|$top| + +#### Command `az logic integration-account list` + +##### Example +``` +az logic integration-account list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +#### Command `az logic integration-account show` + +##### Example +``` +az logic integration-account show --name "testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| + +#### Command `az logic integration-account create` + +##### Example +``` +az logic integration-account create --location "westus" --sku name="Standard" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| |**--location**|string|The resource location.|location|location| |**--tags**|dictionary|The resource tags.|tags|tags| +|**--state**|choice|The workflow state.|state|state| +|**--resource-location**|string|The resource location.|resource_location|location| +|**--resource-tags**|dictionary|The resource tags.|resource_tags|tags| |**--sku**|object|The sku.|sku|sku| -|**--integration_service_environment**|object|The integration service environment.|integration_service_environment|integration_service_environment| +|**--provisioning-state**|choice|The provisioning state.|provisioning_state|provisioningState| +|**--workflow-state**|choice|The integration service environment state.|workflow_state|state| +|**--integration-service-environment-id**|string|Gets the tracking id.|integration_service_environment_id|integrationServiceEnvironmentId| +|**--endpoints-configuration**|object|The endpoints configuration.|endpoints_configuration|endpointsConfiguration| +|**--network-configuration**|object|The network configuration.|network_configuration|networkConfiguration| +|**--encryption-configuration**|object|The encryption configuration.|encryption_configuration|encryptionConfiguration| +|**--name**|choice|The sku name.|name|name| + +#### Command `az logic integration-account update` + +##### Example +``` +az logic integration-account update --location "westus" --sku name="Standard" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| |**--state**|choice|The workflow state.|state|state| -### logic integration-account delete - -delete a logic integration-account. - -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--integration_account_name**|string|The integration account name.|integration_account_name|integration_account_name| -### logic integration-account list - -list a logic integration-account. - -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--top**|integer|The number of items to be included in the result.|top|top| -### logic integration-account list-callback-url - -list-callback-url a logic integration-account. - -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--integration_account_name**|string|The integration account name.|integration_account_name|integration_account_name| -|**--not_after**|date-time|The expiry time.|not_after|not_after| -|**--key_type**|choice|The key type.|key_type|key_type| -### logic integration-account list-key-vault-key - -list-key-vault-key a logic integration-account. - -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--integration_account_name**|string|The integration account name.|integration_account_name|integration_account_name| -|**--key_vault**|object|The key vault reference.|key_vault|key_vault| -|**--skip_token**|string|The skip token.|skip_token|skip_token| -### logic integration-account log-tracking-event - -log-tracking-event a logic integration-account. - -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--integration_account_name**|string|The integration account name.|integration_account_name|integration_account_name| -|**--source_type**|string|The source type.|source_type|source_type| +|**--resource-location**|string|The resource location.|resource_location|location| +|**--resource-tags**|dictionary|The resource tags.|resource_tags|tags| +|**--sku**|object|The sku.|sku|sku| +|**--provisioning-state**|choice|The provisioning state.|provisioning_state|provisioningState| +|**--workflow-state**|choice|The integration service environment state.|workflow_state|state| +|**--integration-service-environment-id**|string|Gets the tracking id.|integration_service_environment_id|integrationServiceEnvironmentId| +|**--endpoints-configuration**|object|The endpoints configuration.|endpoints_configuration|endpointsConfiguration| +|**--network-configuration**|object|The network configuration.|network_configuration|networkConfiguration| +|**--encryption-configuration**|object|The encryption configuration.|encryption_configuration|encryptionConfiguration| +|**--name**|choice|The sku name.|name|name| + +#### Command `az logic integration-account delete` + +##### Example +``` +az logic integration-account delete --name "testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| + +#### Command `az logic integration-account list-callback-url` + +##### Example +``` +az logic integration-account list-callback-url --name "testIntegrationAccount" --key-type "Primary" --not-after \ +"2017-03-05T08:00:00Z" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--not-after**|date-time|The expiry time.|not_after|notAfter| +|**--key-type**|choice|The key type.|key_type|keyType| + +#### Command `az logic integration-account list-key-vault-key` + +##### Example +``` +az logic integration-account list-key-vault-key --name "testIntegrationAccount" --id "subscriptions/34adfa4f-cedf-4dc0-\ +ba29-b6d1a69ab345/resourceGroups/testResourceGroup/providers/Microsoft.KeyVault/vaults/testKeyVault" --skip-token \ +"testSkipToken" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--skip-token**|string|The skip token.|skip_token|skipToken| +|**--id**|string|The resource id.|id|id| + +#### Command `az logic integration-account log-tracking-event` + +##### Example +``` +az logic integration-account log-tracking-event --name "testIntegrationAccount" --events \ +"[{\\"error\\":{\\"code\\":\\"NotFound\\",\\"message\\":\\"Some error occurred\\"},\\"eventLevel\\":\\"Informational\\"\ +,\\"eventTime\\":\\"2016-08-05T01:54:49.505567Z\\",\\"record\\":{\\"agreementProperties\\":{\\"agreementName\\":\\"test\ +Agreement\\",\\"as2From\\":\\"testas2from\\",\\"as2To\\":\\"testas2to\\",\\"receiverPartnerName\\":\\"testPartner2\\",\ +\\"senderPartnerName\\":\\"testPartner1\\"},\\"messageProperties\\":{\\"IsMessageEncrypted\\":false,\\"IsMessageSigned\ +\\":false,\\"correlationMessageId\\":\\"Unique message identifier\\",\\"direction\\":\\"Receive\\",\\"dispositionType\\\ +":\\"received-success\\",\\"fileName\\":\\"test\\",\\"isMdnExpected\\":true,\\"isMessageCompressed\\":false,\\"isMessag\ +eFailed\\":false,\\"isNrrEnabled\\":true,\\"mdnType\\":\\"Async\\",\\"messageId\\":\\"12345\\"}},\\"recordType\\":\\"AS\ +2Message\\"}]" --source-type "Microsoft.Logic/workflows" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--source-type**|string|The source type.|source_type|sourceType| |**--events**|array|The events.|events|events| -|**--track_events_options**|choice|The track events options.|track_events_options|track_events_options| -### logic integration-account regenerate-access-key +|**--track-events-options**|choice|The track events options.|track_events_options|trackEventsOptions| + +#### Command `az logic integration-account regenerate-access-key` + +##### Example +``` +az logic integration-account regenerate-access-key --name "testIntegrationAccount" --key-type "Primary" \ +--resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--key-type**|choice|The key type.|key_type|keyType| -regenerate-access-key a logic integration-account. +### group `az logic integration-account-agreement` +#### Command `az logic integration-account-agreement list` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--integration_account_name**|string|The integration account name.|integration_account_name|integration_account_name| -|**--key_type**|choice|The key type.|key_type|key_type| -### logic integration-account show +##### Example +``` +az logic integration-account-agreement list --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation. Options for filters include: AgreementType.|filter|$filter| -show a logic integration-account. +#### Command `az logic integration-account-agreement show` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--integration_account_name**|string|The integration account name.|integration_account_name|integration_account_name| -### logic integration-account update +##### Example +``` +az logic integration-account-agreement show --agreement-name "testAgreement" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--agreement-name**|string|The integration account agreement name.|agreement_name|agreementName| -update a logic integration-account. +#### Command `az logic integration-account-agreement create` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--integration_account_name**|string|The integration account name.|integration_account_name|integration_account_name| +##### Example +``` +az logic integration-account-agreement create --agreement "{\\"location\\":\\"westus\\",\\"tags\\":{\\"IntegrationAccou\ +ntAgreement\\":\\"\\"},\\"metadata\\":{},\\"agreementType\\":\\"AS2\\",\\"hostPartner\ +\\":\\"HostPartner\\",\\"guestPartner\\":\\"GuestPartner\\",\\"hostIdentity\\":{\\"qualifier\\":\\"ZZ\\",\\"value\\":\\\ +"ZZ\\"},\\"guestIdentity\\":{\\"qualifier\\":\\"AA\\",\\"value\\":\\"AA\\"},\\"content\\":{\\"aS2\\":{\\"receiveAgreeme\ +nt\\":{\\"protocolSettings\\":{\\"acknowledgementConnectionSettings\\":{\\"ignoreCertificateNameMismatch\\":true,\\"kee\ +pHttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true},\\"envelopeSettings\ +\\":{\\"autogenerateFileName\\":true,\\"fileNameTemplate\\":\\"Test\\",\\"messageContentType\\":\\"text/plain\\",\\"sus\ +pendMessageOnFileNameGenerationError\\":true,\\"transmitFileNameInMimeHeader\\":true},\\"errorSettings\\":{\\"resendIfM\ +DNNotReceived\\":true,\\"suspendDuplicateMessage\\":true},\\"mdnSettings\\":{\\"dispositionNotificationTo\\":\\"http://\ +tempuri.org\\",\\"mdnText\\":\\"Sample\\",\\"micHashingAlgorithm\\":\\"SHA1\\",\\"needMDN\\":true,\\"receiptDeliveryUrl\ +\\":\\"http://tempuri.org\\",\\"sendInboundMDNToMessageBox\\":true,\\"sendMDNAsynchronously\\":true,\\"signMDN\\":true,\ +\\"signOutboundMDNIfOptional\\":true},\\"messageConnectionSettings\\":{\\"ignoreCertificateNameMismatch\\":true,\\"keep\ +HttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true},\\"securitySettings\ +\\":{\\"enableNRRForInboundDecodedMessages\\":true,\\"enableNRRForInboundEncodedMessages\\":true,\\"enableNRRForInbound\ +MDN\\":true,\\"enableNRRForOutboundDecodedMessages\\":true,\\"enableNRRForOutboundEncodedMessages\\":true,\\"enableNRRF\ +orOutboundMDN\\":true,\\"overrideGroupSigningCertificate\\":false},\\"validationSettings\\":{\\"checkCertificateRevocat\ +ionListOnReceive\\":true,\\"checkCertificateRevocationListOnSend\\":true,\\"checkDuplicateMessage\\":true,\\"compressMe\ +ssage\\":true,\\"encryptMessage\\":false,\\"encryptionAlgorithm\\":\\"AES128\\",\\"interchangeDuplicatesValidityDays\\"\ +:100,\\"overrideMessageProperties\\":true,\\"signMessage\\":false}},\\"receiverBusinessIdentity\\":{\\"qualifier\\":\\"\ +ZZ\\",\\"value\\":\\"ZZ\\"},\\"senderBusinessIdentity\\":{\\"qualifier\\":\\"AA\\",\\"value\\":\\"AA\\"}},\\"sendAgreem\ +ent\\":{\\"protocolSettings\\":{\\"acknowledgementConnectionSettings\\":{\\"ignoreCertificateNameMismatch\\":true,\\"ke\ +epHttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true},\\"envelopeSetting\ +s\\":{\\"autogenerateFileName\\":true,\\"fileNameTemplate\\":\\"Test\\",\\"messageContentType\\":\\"text/plain\\",\\"su\ +spendMessageOnFileNameGenerationError\\":true,\\"transmitFileNameInMimeHeader\\":true},\\"errorSettings\\":{\\"resendIf\ +MDNNotReceived\\":true,\\"suspendDuplicateMessage\\":true},\\"mdnSettings\\":{\\"dispositionNotificationTo\\":\\"http:/\ +/tempuri.org\\",\\"mdnText\\":\\"Sample\\",\\"micHashingAlgorithm\\":\\"SHA1\\",\\"needMDN\\":true,\\"receiptDeliveryUr\ +l\\":\\"http://tempuri.org\\",\\"sendInboundMDNToMessageBox\\":true,\\"sendMDNAsynchronously\\":true,\\"signMDN\\":true\ +,\\"signOutboundMDNIfOptional\\":true},\\"messageConnectionSettings\\":{\\"ignoreCertificateNameMismatch\\":true,\\"kee\ +pHttpConnectionAlive\\":true,\\"supportHttpStatusCodeContinue\\":true,\\"unfoldHttpHeaders\\":true},\\"securitySettings\ +\\":{\\"enableNRRForInboundDecodedMessages\\":true,\\"enableNRRForInboundEncodedMessages\\":true,\\"enableNRRForInbound\ +MDN\\":true,\\"enableNRRForOutboundDecodedMessages\\":true,\\"enableNRRForOutboundEncodedMessages\\":true,\\"enableNRRF\ +orOutboundMDN\\":true,\\"overrideGroupSigningCertificate\\":false},\\"validationSettings\\":{\\"checkCertificateRevocat\ +ionListOnReceive\\":true,\\"checkCertificateRevocationListOnSend\\":true,\\"checkDuplicateMessage\\":true,\\"compressMe\ +ssage\\":true,\\"encryptMessage\\":false,\\"encryptionAlgorithm\\":\\"AES128\\",\\"interchangeDuplicatesValidityDays\\"\ +:100,\\"overrideMessageProperties\\":true,\\"signMessage\\":false}},\\"receiverBusinessIdentity\\":{\\"qualifier\\":\\"\ +AA\\",\\"value\\":\\"AA\\"},\\"senderBusinessIdentity\\":{\\"qualifier\\":\\"ZZ\\",\\"value\\":\\"ZZ\\"}}}}}" \ +--agreement-name "testAgreement" --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--agreement-name**|string|The integration account agreement name.|agreement_name|agreementName| +|**--agreement**|object|The integration account agreement.|agreement|agreement| + +#### Command `az logic integration-account-agreement update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--agreement-name**|string|The integration account agreement name.|agreement_name|agreementName| +|**--agreement**|object|The integration account agreement.|agreement|agreement| + +#### Command `az logic integration-account-agreement delete` + +##### Example +``` +az logic integration-account-agreement delete --agreement-name "testAgreement" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--agreement-name**|string|The integration account agreement name.|agreement_name|agreementName| + +#### Command `az logic integration-account-agreement list-content-callback-url` + +##### Example +``` +az logic integration-account-agreement list-content-callback-url --agreement-name "testAgreement" \ +--integration-account-name "testIntegrationAccount" --key-type "Primary" --not-after "2018-04-19T16:00:00Z" \ +--resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--agreement-name**|string|The integration account agreement name.|agreement_name|agreementName| +|**--not-after**|date-time|The expiry time.|not_after|notAfter| +|**--key-type**|choice|The key type.|key_type|keyType| + +### group `az logic integration-account-assembly` +#### Command `az logic integration-account-assembly list` + +##### Example +``` +az logic integration-account-assembly list --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| + +#### Command `az logic integration-account-assembly show` + +##### Example +``` +az logic integration-account-assembly show --assembly-artifact-name "testAssembly" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--assembly-artifact-name**|string|The assembly artifact name.|assembly_artifact_name|assemblyArtifactName| + +#### Command `az logic integration-account-assembly create` + +##### Example +``` +az logic integration-account-assembly create --location "westus" --properties assembly-name="System.IdentityModel.Token\ +s.Jwt" content="Base64 encoded Assembly Content" metadata={} --assembly-artifact-name "testAssembly" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--assembly-artifact-name**|string|The assembly artifact name.|assembly_artifact_name|assemblyArtifactName| +|**--properties**|object|The assembly properties.|properties|properties| |**--location**|string|The resource location.|location|location| |**--tags**|dictionary|The resource tags.|tags|tags| -|**--sku**|object|The sku.|sku|sku| -|**--integration_service_environment**|object|The integration service environment.|integration_service_environment|integration_service_environment| -|**--state**|choice|The workflow state.|state|state| -### logic workflow create -create a logic workflow. +#### Command `az logic integration-account-assembly update` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--assembly-artifact-name**|string|The assembly artifact name.|assembly_artifact_name|assemblyArtifactName| +|**--properties**|object|The assembly properties.|properties|properties| |**--location**|string|The resource location.|location|location| |**--tags**|dictionary|The resource tags.|tags|tags| -|**--state**|choice|The state.|state|state| -|**--endpoints_configuration**|object|The endpoints configuration.|endpoints_configuration|endpoints_configuration| -|**--integration_account**|object|The integration account.|integration_account|integration_account| -|**--integration_service_environment**|object|The integration service environment.|integration_service_environment|integration_service_environment| -|**--definition**|any|The definition.|definition|definition| -|**--parameters**|dictionary|The parameters.|parameters|parameters| -### logic workflow delete -delete a logic workflow. +#### Command `az logic integration-account-assembly delete` + +##### Example +``` +az logic integration-account-assembly delete --assembly-artifact-name "testAssembly" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--assembly-artifact-name**|string|The assembly artifact name.|assembly_artifact_name|assemblyArtifactName| + +#### Command `az logic integration-account-assembly list-content-callback-url` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| -### logic workflow disable +##### Example +``` +az logic integration-account-assembly list-content-callback-url --assembly-artifact-name "testAssembly" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--assembly-artifact-name**|string|The assembly artifact name.|assembly_artifact_name|assemblyArtifactName| -disable a logic workflow. +### group `az logic integration-account-batch-configuration` +#### Command `az logic integration-account-batch-configuration list` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| -### logic workflow enable +##### Example +``` +az logic integration-account-batch-configuration list --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| -enable a logic workflow. +#### Command `az logic integration-account-batch-configuration show` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| -### logic workflow generate-upgraded-definition +##### Example +``` +az logic integration-account-batch-configuration show --batch-configuration-name "testBatchConfiguration" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--batch-configuration-name**|string|The batch configuration name.|batch_configuration_name|batchConfigurationName| -generate-upgraded-definition a logic workflow. +#### Command `az logic integration-account-batch-configuration create` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| -|**--target_schema_version**|string|The target schema version.|target_schema_version|target_schema_version| -### logic workflow list +##### Example +``` +az logic integration-account-batch-configuration create --location "westus" --batch-group-name "DEFAULT" --batch-size \ +234567 --message-count 10 --frequency "Minute" --interval 1 --start-time "2017-03-24T11:43:00" --time-zone "India \ +Standard Time" --batch-configuration-name "testBatchConfiguration" --integration-account-name "testIntegrationAccount" \ +--resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--batch-configuration-name**|string|The batch configuration name.|batch_configuration_name|batchConfigurationName| +|**--batch-group-name**|string|The name of the batch group.|batch_group_name|batchGroupName| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--created-time**|date-time|The artifact creation time.|created_time|createdTime| +|**--changed-time**|date-time|The artifact changed time.|changed_time|changedTime| +|**--metadata**|any|Any object|metadata|metadata| +|**--message-count**|integer|The message count.|message_count|messageCount| +|**--batch-size**|integer|The batch size in bytes.|batch_size|batchSize| +|**--frequency**|choice|The frequency.|frequency|frequency| +|**--interval**|integer|The interval.|interval|interval| +|**--start-time**|string|The start time.|start_time|startTime| +|**--end-time**|string|The end time.|end_time|endTime| +|**--time-zone**|string|The time zone.|time_zone|timeZone| +|**--minutes**|array|The minutes.|minutes|minutes| +|**--hours**|array|The hours.|hours|hours| +|**--week-days**|array|The days of the week.|week_days|weekDays| +|**--month-days**|array|The month days.|month_days|monthDays| +|**--monthly-occurrences**|array|The monthly occurrences.|monthly_occurrences|monthlyOccurrences| + +#### Command `az logic integration-account-batch-configuration update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--batch-configuration-name**|string|The batch configuration name.|batch_configuration_name|batchConfigurationName| +|**--batch-group-name**|string|The name of the batch group.|batch_group_name|batchGroupName| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--created-time**|date-time|The artifact creation time.|created_time|createdTime| +|**--changed-time**|date-time|The artifact changed time.|changed_time|changedTime| +|**--metadata**|any|Any object|metadata|metadata| +|**--message-count**|integer|The message count.|message_count|messageCount| +|**--batch-size**|integer|The batch size in bytes.|batch_size|batchSize| +|**--frequency**|choice|The frequency.|frequency|frequency| +|**--interval**|integer|The interval.|interval|interval| +|**--start-time**|string|The start time.|start_time|startTime| +|**--end-time**|string|The end time.|end_time|endTime| +|**--time-zone**|string|The time zone.|time_zone|timeZone| +|**--minutes**|array|The minutes.|minutes|minutes| +|**--hours**|array|The hours.|hours|hours| +|**--week-days**|array|The days of the week.|week_days|weekDays| +|**--month-days**|array|The month days.|month_days|monthDays| +|**--monthly-occurrences**|array|The monthly occurrences.|monthly_occurrences|monthlyOccurrences| -list a logic workflow. +#### Command `az logic integration-account-batch-configuration delete` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--top**|integer|The number of items to be included in the result.|top|top| -|**--filter**|string|The filter to apply on the operation. Options for filters include: State, Trigger, and ReferencedResourceId.|filter|filter| -### logic workflow list-callback-url +##### Example +``` +az logic integration-account-batch-configuration delete --batch-configuration-name "testBatchConfiguration" \ +--integration-account-name "testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--batch-configuration-name**|string|The batch configuration name.|batch_configuration_name|batchConfigurationName| -list-callback-url a logic workflow. +### group `az logic integration-account-certificate` +#### Command `az logic integration-account-certificate list` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| -|**--not_after**|date-time|The expiry time.|not_after|not_after| -|**--key_type**|choice|The key type.|key_type|key_type| -### logic workflow list-swagger +##### Example +``` +az logic integration-account-certificate list --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--top**|integer|The number of items to be included in the result.|top|$top| -list-swagger a logic workflow. +#### Command `az logic integration-account-certificate show` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| -### logic workflow move +##### Example +``` +az logic integration-account-certificate show --certificate-name "testCertificate" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--certificate-name**|string|The integration account certificate name.|certificate_name|certificateName| -move a logic workflow. +#### Command `az logic integration-account-certificate create` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| +##### Example +``` +az logic integration-account-certificate create --location "brazilsouth" --key-name "" --key-vault \ +id="/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testResourceGroup/providers/microsoft.keyvault/v\ +aults/" --key-version "87d9764197604449b9b8eb7bd8710868" --public-certificate "" \ +--certificate-name "testCertificate" --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--certificate-name**|string|The integration account certificate name.|certificate_name|certificateName| |**--location**|string|The resource location.|location|location| |**--tags**|dictionary|The resource tags.|tags|tags| -|**--state**|choice|The state.|state|state| -|**--endpoints_configuration**|object|The endpoints configuration.|endpoints_configuration|endpoints_configuration| -|**--integration_account**|object|The integration account.|integration_account|integration_account| -|**--integration_service_environment**|object|The integration service environment.|integration_service_environment|integration_service_environment| -|**--definition**|any|The definition.|definition|definition| -|**--parameters**|dictionary|The parameters.|parameters|parameters| -### logic workflow regenerate-access-key +|**--metadata**|any|The metadata.|metadata|metadata| +|**--public-certificate**|string|The public certificate.|public_certificate|publicCertificate| +|**--key-vault**|object|The key vault reference.|key_vault|keyVault| +|**--key-name**|string|The private key name in key vault.|key_name|keyName| +|**--key-version**|string|The private key version in key vault.|key_version|keyVersion| + +#### Command `az logic integration-account-certificate update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--certificate-name**|string|The integration account certificate name.|certificate_name|certificateName| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--metadata**|any|The metadata.|metadata|metadata| +|**--public-certificate**|string|The public certificate.|public_certificate|publicCertificate| +|**--key-vault**|object|The key vault reference.|key_vault|keyVault| +|**--key-name**|string|The private key name in key vault.|key_name|keyName| +|**--key-version**|string|The private key version in key vault.|key_version|keyVersion| + +#### Command `az logic integration-account-certificate delete` -regenerate-access-key a logic workflow. +##### Example +``` +az logic integration-account-certificate delete --certificate-name "testCertificate" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--certificate-name**|string|The integration account certificate name.|certificate_name|certificateName| -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| -|**--key_type**|choice|The key type.|key_type|key_type| -### logic workflow show +### group `az logic integration-account-map` +#### Command `az logic integration-account-map list` -show a logic workflow. +##### Example +``` +az logic integration-account-map list --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation. Options for filters include: MapType.|filter|$filter| -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| -### logic workflow update +#### Command `az logic integration-account-map show` -update a logic workflow. +##### Example +``` +az logic integration-account-map show --integration-account-name "testIntegrationAccount" --map-name "testMap" \ +--resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--map-name**|string|The integration account map name.|map_name|mapName| -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| +#### Command `az logic integration-account-map create` + +##### Example +``` +az logic integration-account-map create --integration-account-name "testIntegrationAccount" --location "westus" \ +--content "\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \ +\\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n\ + \\r\\n \\r\\n \ +\\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n" \ +--properties-content-type "application/xml" --map-type "Xslt" --metadata "{}" --map-name "testMap" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--map-name**|string|The integration account map name.|map_name|mapName| +|**--map-type**|choice|The map type.|map_type|mapType| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--content**|string|The content.|content|content| +|**--properties-content-type**|string|The content type.|content_type|contentType| +|**--metadata**|any|The metadata.|metadata|metadata| +|**--ref**|string|The reference name.|ref|ref| + +#### Command `az logic integration-account-map update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--map-name**|string|The integration account map name.|map_name|mapName| +|**--map-type**|choice|The map type.|map_type|mapType| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--content**|string|The content.|content|content| +|**--properties-content-type**|string|The content type.|content_type|contentType| +|**--metadata**|any|The metadata.|metadata|metadata| +|**--ref**|string|The reference name.|ref|ref| + +#### Command `az logic integration-account-map delete` + +##### Example +``` +az logic integration-account-map delete --integration-account-name "testIntegrationAccount" --map-name "testMap" \ +--resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--map-name**|string|The integration account map name.|map_name|mapName| + +#### Command `az logic integration-account-map list-content-callback-url` + +##### Example +``` +az logic integration-account-map list-content-callback-url --integration-account-name "testIntegrationAccount" \ +--key-type "Primary" --not-after "2018-04-19T16:00:00Z" --map-name "testMap" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--map-name**|string|The integration account map name.|map_name|mapName| +|**--not-after**|date-time|The expiry time.|not_after|notAfter| +|**--key-type**|choice|The key type.|key_type|keyType| + +### group `az logic integration-account-partner` +#### Command `az logic integration-account-partner list` + +##### Example +``` +az logic integration-account-partner list --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation. Options for filters include: PartnerType.|filter|$filter| + +#### Command `az logic integration-account-partner show` + +##### Example +``` +az logic integration-account-partner show --integration-account-name "testIntegrationAccount" --partner-name \ +"testPartner" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--partner-name**|string|The integration account partner name.|partner_name|partnerName| + +#### Command `az logic integration-account-partner create` + +##### Example +``` +az logic integration-account-partner create --integration-account-name "testIntegrationAccount" --location "westus" \ +--business-identities qualifier="AA" value="ZZ" --metadata "{}" --partner-type "B2B" --partner-name "testPartner" \ +--resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--partner-name**|string|The integration account partner name.|partner_name|partnerName| +|**--partner-type**|choice|The partner type.|partner_type|partnerType| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--metadata**|any|The metadata.|metadata|metadata| +|**--business-identities**|array|The list of partner business identities.|business_identities|businessIdentities| + +#### Command `az logic integration-account-partner update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--partner-name**|string|The integration account partner name.|partner_name|partnerName| +|**--partner-type**|choice|The partner type.|partner_type|partnerType| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--metadata**|any|The metadata.|metadata|metadata| +|**--business-identities**|array|The list of partner business identities.|business_identities|businessIdentities| + +#### Command `az logic integration-account-partner delete` + +##### Example +``` +az logic integration-account-partner delete --integration-account-name "testIntegrationAccount" --partner-name \ +"testPartner" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--partner-name**|string|The integration account partner name.|partner_name|partnerName| + +#### Command `az logic integration-account-partner list-content-callback-url` + +##### Example +``` +az logic integration-account-partner list-content-callback-url --integration-account-name "testIntegrationAccount" \ +--key-type "Primary" --not-after "2018-04-19T16:00:00Z" --partner-name "testPartner" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--partner-name**|string|The integration account partner name.|partner_name|partnerName| +|**--not-after**|date-time|The expiry time.|not_after|notAfter| +|**--key-type**|choice|The key type.|key_type|keyType| + +### group `az logic integration-account-schema` +#### Command `az logic integration-account-schema list` + +##### Example +``` +az logic integration-account-schema list --integration-account-name "" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation. Options for filters include: SchemaType.|filter|$filter| + +#### Command `az logic integration-account-schema show` + +##### Example +``` +az logic integration-account-schema show --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" --schema-name "testSchema" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--schema-name**|string|The integration account schema name.|schema_name|schemaName| + +#### Command `az logic integration-account-schema create` + +##### Example +``` +az logic integration-account-schema create --location "westus" --content "\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \ + \\r\\n \ +\\r\\n \\r\\n \\r\\n \ + \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n \\r\\n \\r\\n \ +\\r\\n \\r\\n" --properties-content-type "application/xml" --metadata "{}" \ +--schema-type "Xml" --tags integrationAccountSchemaName="IntegrationAccountSchema8120" --integration-account-name \ +"testIntegrationAccount" --resource-group "testResourceGroup" --schema-name "testSchema" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--schema-name**|string|The integration account schema name.|schema_name|schemaName| +|**--schema-type**|choice|The schema type.|schema_type|schemaType| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--target-namespace**|string|The target namespace of the schema.|target_namespace|targetNamespace| +|**--document-name**|string|The document name.|document_name|documentName| +|**--file-name**|string|The file name.|file_name|fileName| +|**--metadata**|any|The metadata.|metadata|metadata| +|**--content**|string|The content.|content|content| +|**--properties-content-type**|string|The content type.|content_type|contentType| + +#### Command `az logic integration-account-schema update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--schema-name**|string|The integration account schema name.|schema_name|schemaName| +|**--schema-type**|choice|The schema type.|schema_type|schemaType| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--target-namespace**|string|The target namespace of the schema.|target_namespace|targetNamespace| +|**--document-name**|string|The document name.|document_name|documentName| +|**--file-name**|string|The file name.|file_name|fileName| +|**--metadata**|any|The metadata.|metadata|metadata| +|**--content**|string|The content.|content|content| +|**--properties-content-type**|string|The content type.|content_type|contentType| + +#### Command `az logic integration-account-schema delete` + +##### Example +``` +az logic integration-account-schema delete --integration-account-name "testIntegrationAccount" --resource-group \ +"testResourceGroup" --schema-name "testSchema" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--schema-name**|string|The integration account schema name.|schema_name|schemaName| + +#### Command `az logic integration-account-schema list-content-callback-url` + +##### Example +``` +az logic integration-account-schema list-content-callback-url --integration-account-name "testIntegrationAccount" \ +--key-type "Primary" --not-after "2018-04-19T16:00:00Z" --resource-group "testResourceGroup" --schema-name \ +"testSchema" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--schema-name**|string|The integration account schema name.|schema_name|schemaName| +|**--not-after**|date-time|The expiry time.|not_after|notAfter| +|**--key-type**|choice|The key type.|key_type|keyType| + +### group `az logic integration-account-session` +#### Command `az logic integration-account-session list` + +##### Example +``` +az logic integration-account-session list --integration-account-name "testia123" --resource-group "testrg123" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation. Options for filters include: ChangedTime.|filter|$filter| + +#### Command `az logic integration-account-session show` + +##### Example +``` +az logic integration-account-session show --integration-account-name "testia123" --resource-group "testrg123" \ +--session-name "testsession123-ICN" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--session-name**|string|The integration account session name.|session_name|sessionName| + +#### Command `az logic integration-account-session create` + +##### Example +``` +az logic integration-account-session create --integration-account-name "testia123" --resource-group "testrg123" \ +--content "{\\"controlNumber\\":\\"1234\\",\\"controlNumberChangedTime\\":\\"2017-02-21T22:30:11.9923759Z\\"}" \ +--session-name "testsession123-ICN" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--session-name**|string|The integration account session name.|session_name|sessionName| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--content**|any|The session content.|content|content| + +#### Command `az logic integration-account-session update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--session-name**|string|The integration account session name.|session_name|sessionName| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--content**|any|The session content.|content|content| + +#### Command `az logic integration-account-session delete` + +##### Example +``` +az logic integration-account-session delete --integration-account-name "testia123" --resource-group "testrg123" \ +--session-name "testsession123-ICN" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--integration-account-name**|string|The integration account name.|integration_account_name|integrationAccountName| +|**--session-name**|string|The integration account session name.|session_name|sessionName| + +### group `az logic integration-service-environment` +#### Command `az logic integration-service-environment list` + +##### Example +``` +az logic integration-service-environment list --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--top**|integer|The number of items to be included in the result.|top|$top| + +#### Command `az logic integration-service-environment list` + +##### Example +``` +az logic integration-service-environment list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +#### Command `az logic integration-service-environment show` + +##### Example +``` +az logic integration-service-environment show --name "testIntegrationServiceEnvironment" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| + +#### Command `az logic integration-service-environment create` + +##### Example +``` +az logic integration-service-environment create --location "brazilsouth" --encryption-configuration \ +"{\\"encryptionKeyReference\\":{\\"keyName\\":\\"testKeyName\\",\\"keyVault\\":{\\"id\\":\\"/subscriptions/f34b22a3-220\ +2-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.KeyVault/vaults/testKeyVault\\"},\\"keyVe\ +rsion\\":\\"13b261d30b984753869902d7f47f4d55\\"}}" --network-configuration "{\\"accessEndpoint\\":{\\"type\\":\\"Intern\ +al\\"},\\"subnets\\":[{\\"id\\":\\"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup\ +/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s1\\"},{\\"id\\":\\"/subscriptions/f34b22a3-2202-4fb1-b04\ +0-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s2\\"},{\\\ +"id\\":\\"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.Netw\ +ork/virtualNetworks/testVNET/subnets/s3\\"},{\\"id\\":\\"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGr\ +oups/testResourceGroup/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s4\\"}]}" --sku name="Premium" \ +capacity=2 --name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--sku**|object|The sku.|sku|sku| +|**--provisioning-state**|choice|The provisioning state.|provisioning_state|provisioningState| +|**--state**|choice|The integration service environment state.|state|state| +|**--integration-service-environment-id**|string|Gets the tracking id.|integration_service_environment_id|integrationServiceEnvironmentId| +|**--endpoints-configuration**|object|The endpoints configuration.|endpoints_configuration|endpointsConfiguration| +|**--network-configuration**|object|The network configuration.|network_configuration|networkConfiguration| +|**--encryption-configuration**|object|The encryption configuration.|encryption_configuration|encryptionConfiguration| + +#### Command `az logic integration-service-environment update` + +##### Example +``` +az logic integration-service-environment update --sku name="Developer" capacity=0 --tags tag1="value1" --name \ +"testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| +|**--location**|string|The resource location.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--sku**|object|The sku.|sku|sku| +|**--provisioning-state**|choice|The provisioning state.|provisioning_state|provisioningState| +|**--state**|choice|The integration service environment state.|state|state| +|**--integration-service-environment-id**|string|Gets the tracking id.|integration_service_environment_id|integrationServiceEnvironmentId| +|**--endpoints-configuration**|object|The endpoints configuration.|endpoints_configuration|endpointsConfiguration| +|**--network-configuration**|object|The network configuration.|network_configuration|networkConfiguration| +|**--encryption-configuration**|object|The encryption configuration.|encryption_configuration|encryptionConfiguration| + +#### Command `az logic integration-service-environment delete` + +##### Example +``` +az logic integration-service-environment delete --name "testIntegrationServiceEnvironment" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| + +#### Command `az logic integration-service-environment restart` + +##### Example +``` +az logic integration-service-environment restart --name "testIntegrationServiceEnvironment" --resource-group \ +"testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| + +### group `az logic integration-service-environment-managed-api` +#### Command `az logic integration-service-environment-managed-api list` + +##### Example +``` +az logic integration-service-environment-managed-api list --integration-service-environment-name \ +"testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| + +#### Command `az logic integration-service-environment-managed-api show` + +##### Example +``` +az logic integration-service-environment-managed-api show --api-name "servicebus" --integration-service-environment-nam\ +e "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group name.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| +|**--api-name**|string|The api name.|api_name|apiName| + +#### Command `az logic integration-service-environment-managed-api delete` + +##### Example +``` +az logic integration-service-environment-managed-api delete --api-name "servicebus" --integration-service-environment-n\ +ame "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| +|**--api-name**|string|The api name.|api_name|apiName| + +#### Command `az logic integration-service-environment-managed-api put` + +##### Example +``` +az logic integration-service-environment-managed-api put --api-name "servicebus" --integration-service-environment-name\ + "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group name.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| +|**--api-name**|string|The api name.|api_name|apiName| + +### group `az logic integration-service-environment-managed-api-operation` +#### Command `az logic integration-service-environment-managed-api-operation list` + +##### Example +``` +az logic integration-service-environment-managed-api-operation list --api-name "servicebus" \ +--integration-service-environment-name "testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| +|**--api-name**|string|The api name.|api_name|apiName| + +### group `az logic integration-service-environment-network-health` +#### Command `az logic integration-service-environment-network-health show` + +##### Example +``` +az logic integration-service-environment-network-health show --integration-service-environment-name \ +"testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| + +### group `az logic integration-service-environment-sku` +#### Command `az logic integration-service-environment-sku list` + +##### Example +``` +az logic integration-service-environment-sku list --integration-service-environment-name \ +"testIntegrationServiceEnvironment" --resource-group "testResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group**|string|The resource group.|resource_group|resourceGroup| +|**--integration-service-environment-name**|string|The integration service environment name.|integration_service_environment_name|integrationServiceEnvironmentName| + +### group `az logic workflow` +#### Command `az logic workflow list` + +##### Example +``` +az logic workflow list --resource-group "test-resource-group" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation. Options for filters include: State, Trigger, and ReferencedResourceId.|filter|$filter| + +#### Command `az logic workflow list` + +##### Example +``` +az logic workflow list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +#### Command `az logic workflow show` + +##### Example +``` +az logic workflow show --resource-group "test-resource-group" --name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| + +#### Command `az logic workflow create` + +##### Example +``` +az logic workflow create --resource-group "test-resource-group" --location "brazilsouth" --definition \ +"{\\"$schema\\":\\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.\ +json#\\",\\"actions\\":{\\"Find_pet_by_ID\\":{\\"type\\":\\"ApiConnection\\",\\"inputs\\":{\\"path\\":\\"/pet/@{encodeU\ +RIComponent(\'1\')}\\",\\"method\\":\\"get\\",\\"host\\":{\\"connection\\":{\\"name\\":\\"@parameters(\'$connections\')\ +[\'test-custom-connector\'][\'connectionId\']\\"}}},\\"runAfter\\":{}}},\\"contentVersion\\":\\"1.0.0.0\\",\\"outputs\\\ +":{},\\"parameters\\":{\\"$connections\\":{\\"type\\":\\"Object\\",\\"defaultValue\\":{}}},\\"triggers\\":{\\"manual\\"\ +:{\\"type\\":\\"Request\\",\\"inputs\\":{\\"schema\\":{}},\\"kind\\":\\"Http\\"}}}" --resource-reference-id \ +"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integ\ +rationAccounts/test-integration-account" --parameters "{\\"$connections\\":{\\"value\\":{\\"test-custom-connector\\":{\ +\\"connectionId\\":\\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/\ +Microsoft.Web/connections/test-custom-connector\\",\\"connectionName\\":\\"test-custom-connector\\",\\"id\\":\\"/subscr\ +iptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-conn\ +ector\\"}}}}" --name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| |**--location**|string|The resource location.|location|location| |**--tags**|dictionary|The resource tags.|tags|tags| |**--state**|choice|The state.|state|state| -|**--endpoints_configuration**|object|The endpoints configuration.|endpoints_configuration|endpoints_configuration| -|**--integration_account**|object|The integration account.|integration_account|integration_account| -|**--integration_service_environment**|object|The integration service environment.|integration_service_environment|integration_service_environment| |**--definition**|any|The definition.|definition|definition| |**--parameters**|dictionary|The parameters.|parameters|parameters| -### logic workflow validate-by-location +|**--id**|string|The resource id.|id|id| +|**--resource-reference-id**|string|The resource id.|resource_reference_id|id| +|**--triggers**|object|The access control configuration for invoking workflow triggers.|triggers|triggers| +|**--contents**|object|The access control configuration for accessing workflow run contents.|contents|contents| +|**--actions**|object|The access control configuration for workflow actions.|actions|actions| +|**--workflow-management**|object|The access control configuration for workflow management.|workflow_management|workflowManagement| +|**--properties-endpoints-configuration-workflow**|object|The workflow endpoints.|workflow|workflow| +|**--connector**|object|The connector endpoints.|connector|connector| + +#### Command `az logic workflow update` + +##### Example +``` +az logic workflow update --resource-group "test-resource-group" --name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| + +#### Command `az logic workflow delete` + +##### Example +``` +az logic workflow delete --resource-group "test-resource-group" --name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| + +#### Command `az logic workflow disable` + +##### Example +``` +az logic workflow disable --resource-group "test-resource-group" --name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| + +#### Command `az logic workflow enable` + +##### Example +``` +az logic workflow enable --resource-group "test-resource-group" --name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| + +#### Command `az logic workflow generate-upgraded-definition` + +##### Example +``` +az logic workflow generate-upgraded-definition --target-schema-version "2016-06-01" --resource-group \ +"test-resource-group" --name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--target-schema-version**|string|The target schema version.|target_schema_version|targetSchemaVersion| + +#### Command `az logic workflow list-callback-url` + +##### Example +``` +az logic workflow list-callback-url --key-type "Primary" --not-after "2018-04-19T16:00:00Z" --resource-group \ +"testResourceGroup" --name "testWorkflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--not-after**|date-time|The expiry time.|not_after|notAfter| +|**--key-type**|choice|The key type.|key_type|keyType| + +#### Command `az logic workflow list-swagger` + +##### Example +``` +az logic workflow list-swagger --resource-group "testResourceGroup" --name "testWorkflowName" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| + +#### Command `az logic workflow move` + +##### Example +``` +az logic workflow move --id "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/newResourceGroup/provide\ +rs/Microsoft.Logic/workflows/newWorkflowName" --resource-group "testResourceGroup" --name "testWorkflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--id**|string|The resource id.|id|id| -validate-by-location a logic workflow. +#### Command `az logic workflow regenerate-access-key` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +##### Example +``` +az logic workflow regenerate-access-key --key-type "Primary" --resource-group "testResourceGroup" --name \ +"testWorkflowName" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--key-type**|choice|The key type.|key_type|keyType| + +#### Command `az logic workflow validate-by-location` + +##### Example +``` +az logic workflow validate-by-location --location "brazilsouth" --resource-group "test-resource-group" \ +--resource-location "brazilsouth" --definition "{\\"$schema\\":\\"https://schema.management.azure.com/providers/Microso\ +ft.Logic/schemas/2016-06-01/workflowdefinition.json#\\",\\"actions\\":{},\\"contentVersion\\":\\"1.0.0.0\\",\\"outputs\ +\\":{},\\"parameters\\":{},\\"triggers\\":{}}" --resource-reference-id "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69a\ +b345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account" --name \ +"test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| |**--location**|string|The workflow location.|location|location| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| -### logic workflow validate-by-resource-group +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--resource-location**|string|The resource location.|resource_location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--state**|choice|The state.|state|state| +|**--definition**|any|The definition.|definition|definition| +|**--parameters**|dictionary|The parameters.|parameters|parameters| +|**--id**|string|The resource id.|id|id| +|**--resource-reference-id**|string|The resource id.|resource_reference_id|id| +|**--triggers**|object|The access control configuration for invoking workflow triggers.|triggers|triggers| +|**--contents**|object|The access control configuration for accessing workflow run contents.|contents|contents| +|**--actions**|object|The access control configuration for workflow actions.|actions|actions| +|**--workflow-management**|object|The access control configuration for workflow management.|workflow_management|workflowManagement| +|**--workflow**|object|The workflow endpoints.|workflow|workflow| +|**--connector**|object|The connector endpoints.|connector|connector| -validate-by-resource-group a logic workflow. +#### Command `az logic workflow validate-by-resource-group` -|Option|Type|Description|Path (SDK)|Path (swagger)| -|------|----|-----------|----------|--------------| -|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| -|**--workflow_name**|string|The workflow name.|workflow_name|workflow_name| +##### Example +``` +az logic workflow validate-by-resource-group --resource-group "test-resource-group" --location "brazilsouth" \ +--definition "{\\"$schema\\":\\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workfl\ +owdefinition.json#\\",\\"actions\\":{},\\"contentVersion\\":\\"1.0.0.0\\",\\"outputs\\":{},\\"parameters\\":{},\\"trigg\ +ers\\":{}}" --resource-reference-id "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-g\ +roup/providers/Microsoft.Logic/integrationAccounts/test-integration-account" --name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| |**--location**|string|The resource location.|location|location| |**--tags**|dictionary|The resource tags.|tags|tags| |**--state**|choice|The state.|state|state| -|**--endpoints_configuration**|object|The endpoints configuration.|endpoints_configuration|endpoints_configuration| -|**--integration_account**|object|The integration account.|integration_account|integration_account| -|**--integration_service_environment**|object|The integration service environment.|integration_service_environment|integration_service_environment| |**--definition**|any|The definition.|definition|definition| -|**--parameters**|dictionary|The parameters.|parameters|parameters| \ No newline at end of file +|**--parameters**|dictionary|The parameters.|parameters|parameters| +|**--id**|string|The resource id.|id|id| +|**--resource-reference-id**|string|The resource id.|resource_reference_id|id| +|**--triggers**|object|The access control configuration for invoking workflow triggers.|triggers|triggers| +|**--contents**|object|The access control configuration for accessing workflow run contents.|contents|contents| +|**--actions**|object|The access control configuration for workflow actions.|actions|actions| +|**--workflow-management**|object|The access control configuration for workflow management.|workflow_management|workflowManagement| +|**--workflow**|object|The workflow endpoints.|workflow|workflow| +|**--connector**|object|The connector endpoints.|connector|connector| + +### group `az logic workflow-run` +#### Command `az logic workflow-run list` + +##### Example +``` +az logic workflow-run list --resource-group "test-resource-group" --workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId.|filter|$filter| + +#### Command `az logic workflow-run show` + +##### Example +``` +az logic workflow-run show --resource-group "test-resource-group" --run-name "08586676746934337772206998657CU22" \ +--workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| + +#### Command `az logic workflow-run cancel` + +##### Example +``` +az logic workflow-run cancel --resource-group "test-resource-group" --run-name "08586676746934337772206998657CU22" \ +--workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| + +### group `az logic workflow-run-action` +#### Command `az logic workflow-run-action list` + +##### Example +``` +az logic workflow-run-action list --resource-group "test-resource-group" --run-name "08586676746934337772206998657CU22"\ + --workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation. Options for filters include: Status.|filter|$filter| + +#### Command `az logic workflow-run-action show` + +##### Example +``` +az logic workflow-run-action show --action-name "HTTP" --resource-group "test-resource-group" --run-name \ +"08586676746934337772206998657CU22" --workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| + +#### Command `az logic workflow-run-action list-expression-trace` + +##### Example +``` +az logic workflow-run-action list-expression-trace --action-name "testAction" --resource-group "testResourceGroup" \ +--run-name "08586776228332053161046300351" --workflow-name "testFlow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| + +### group `az logic workflow-run-action-repetition` +#### Command `az logic workflow-run-action-repetition list` + +##### Example +``` +az logic workflow-run-action-repetition list --action-name "testAction" --resource-group "testResourceGroup" \ +--run-name "08586776228332053161046300351" --workflow-name "testFlow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| + +#### Command `az logic workflow-run-action-repetition show` + +##### Example +``` +az logic workflow-run-action-repetition show --action-name "testAction" --repetition-name "000001" --resource-group \ +"testResourceGroup" --run-name "08586776228332053161046300351" --workflow-name "testFlow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| +|**--repetition-name**|string|The workflow repetition.|repetition_name|repetitionName| + +#### Command `az logic workflow-run-action-repetition list-expression-trace` + +##### Example +``` +az logic workflow-run-action-repetition list-expression-trace --action-name "testAction" --repetition-name "000001" \ +--resource-group "testResourceGroup" --run-name "08586776228332053161046300351" --workflow-name "testFlow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| +|**--repetition-name**|string|The workflow repetition.|repetition_name|repetitionName| + +### group `az logic workflow-run-action-repetition-request-history` +#### Command `az logic workflow-run-action-repetition-request-history list` + +##### Example +``` +az logic workflow-run-action-repetition-request-history list --action-name "HTTP_Webhook" --repetition-name "000001" \ +--resource-group "test-resource-group" --run-name "08586776228332053161046300351" --workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| +|**--repetition-name**|string|The workflow repetition.|repetition_name|repetitionName| + +#### Command `az logic workflow-run-action-repetition-request-history show` + +##### Example +``` +az logic workflow-run-action-repetition-request-history show --action-name "HTTP_Webhook" --repetition-name "000001" \ +--request-history-name "08586611142732800686" --resource-group "test-resource-group" --run-name \ +"08586776228332053161046300351" --workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| +|**--repetition-name**|string|The workflow repetition.|repetition_name|repetitionName| +|**--request-history-name**|string|The request history name.|request_history_name|requestHistoryName| + +### group `az logic workflow-run-action-request-history` +#### Command `az logic workflow-run-action-request-history list` + +##### Example +``` +az logic workflow-run-action-request-history list --action-name "HTTP_Webhook" --resource-group "test-resource-group" \ +--run-name "08586776228332053161046300351" --workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| + +#### Command `az logic workflow-run-action-request-history show` + +##### Example +``` +az logic workflow-run-action-request-history show --action-name "HTTP_Webhook" --request-history-name \ +"08586611142732800686" --resource-group "test-resource-group" --run-name "08586776228332053161046300351" \ +--workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| +|**--request-history-name**|string|The request history name.|request_history_name|requestHistoryName| + +### group `az logic workflow-run-action-scope-repetition` +#### Command `az logic workflow-run-action-scope-repetition list` + +##### Example +``` +az logic workflow-run-action-scope-repetition list --action-name "for_each" --resource-group "testResourceGroup" \ +--run-name "08586776228332053161046300351" --workflow-name "testFlow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| + +#### Command `az logic workflow-run-action-scope-repetition show` + +##### Example +``` +az logic workflow-run-action-scope-repetition show --action-name "for_each" --repetition-name "000000" \ +--resource-group "testResourceGroup" --run-name "08586776228332053161046300351" --workflow-name "testFlow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--action-name**|string|The workflow action name.|action_name|actionName| +|**--repetition-name**|string|The workflow repetition.|repetition_name|repetitionName| + +### group `az logic workflow-run-operation` +#### Command `az logic workflow-run-operation show` + +##### Example +``` +az logic workflow-run-operation show --operation-id "ebdcbbde-c4db-43ec-987c-fd0f7726f43b" --resource-group \ +"testResourceGroup" --run-name "08586774142730039209110422528" --workflow-name "testFlow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--run-name**|string|The workflow run name.|run_name|runName| +|**--operation-id**|string|The workflow operation id.|operation_id|operationId| + +### group `az logic workflow-trigger` +#### Command `az logic workflow-trigger list` + +##### Example +``` +az logic workflow-trigger list --resource-group "test-resource-group" --workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation.|filter|$filter| + +#### Command `az logic workflow-trigger show` + +##### Example +``` +az logic workflow-trigger show --resource-group "test-resource-group" --trigger-name "manual" --workflow-name \ +"test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| + +#### Command `az logic workflow-trigger list-callback-url` + +##### Example +``` +az logic workflow-trigger list-callback-url --resource-group "test-resource-group" --trigger-name "manual" \ +--workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| + +#### Command `az logic workflow-trigger reset` + +##### Example +``` +az logic workflow-trigger reset --resource-group "testResourceGroup" --trigger-name "testTrigger" --workflow-name \ +"testWorkflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| + +#### Command `az logic workflow-trigger run` + +##### Example +``` +az logic workflow-trigger run --resource-group "test-resource-group" --trigger-name "manual" --workflow-name \ +"test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| + +#### Command `az logic workflow-trigger set-state` + +##### Example +``` +az logic workflow-trigger set-state --resource-group "testResourceGroup" --source id="subscriptions/34adfa4f-cedf-4dc0-\ +ba29-b6d1a69ab345/resourceGroups/sourceResGroup/providers/Microsoft.Logic/workflows/sourceWorkflow/triggers/sourceTrigg\ +er" --trigger-name "testTrigger" --workflow-name "testWorkflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| +|**--source**|object|The source.|source|source| + +#### Command `az logic workflow-trigger show-schema-json` + +##### Example +``` +az logic workflow-trigger show-schema-json --resource-group "testResourceGroup" --trigger-name "testTrigger" \ +--workflow-name "testWorkflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| + +### group `az logic workflow-trigger-history` +#### Command `az logic workflow-trigger-history list` + +##### Example +``` +az logic workflow-trigger-history list --resource-group "testResourceGroup" --trigger-name "testTriggerName" \ +--workflow-name "testWorkflowName" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| +|**--top**|integer|The number of items to be included in the result.|top|$top| +|**--filter**|string|The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId.|filter|$filter| + +#### Command `az logic workflow-trigger-history show` + +##### Example +``` +az logic workflow-trigger-history show --history-name "08586676746934337772206998657CU22" --resource-group \ +"testResourceGroup" --trigger-name "testTriggerName" --workflow-name "testWorkflowName" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| +|**--history-name**|string|The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run.|history_name|historyName| + +#### Command `az logic workflow-trigger-history resubmit` + +##### Example +``` +az logic workflow-trigger-history resubmit --history-name "testHistoryName" --resource-group "testResourceGroup" \ +--trigger-name "testTriggerName" --workflow-name "testWorkflowName" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| +|**--history-name**|string|The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run.|history_name|historyName| + +### group `az logic workflow-version` +#### Command `az logic workflow-version list` + +##### Example +``` +az logic workflow-version list --resource-group "test-resource-group" --workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--top**|integer|The number of items to be included in the result.|top|$top| + +#### Command `az logic workflow-version show` + +##### Example +``` +az logic workflow-version show --resource-group "test-resource-group" --version-id "08586676824806722526" \ +--workflow-name "test-workflow" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--version-id**|string|The workflow versionId.|version_id|versionId| + +### group `az logic workflow-version-trigger` +#### Command `az logic workflow-version-trigger list-callback-url` + +##### Example +``` +az logic workflow-version-trigger list-callback-url --key-type "Primary" --not-after "2017-03-05T08:00:00Z" \ +--resource-group "testResourceGroup" --trigger-name "testTriggerName" --version-id "testWorkflowVersionId" \ +--workflow-name "testWorkflowName" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName| +|**--workflow-name**|string|The workflow name.|workflow_name|workflowName| +|**--version-id**|string|The workflow versionId.|version_id|versionId| +|**--trigger-name**|string|The workflow trigger name.|trigger_name|triggerName| +|**--not-after**|date-time|The expiry time.|not_after|notAfter| +|**--key-type**|choice|The key type.|key_type|keyType| diff --git a/src/logic/setup.cfg b/src/logic/setup.cfg index e69de29bb2d..2fdd96e5d39 100644 --- a/src/logic/setup.cfg +++ b/src/logic/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/logic/setup.py b/src/logic/setup.py index e28fe182837..bee041ba7df 100644 --- a/src/logic/setup.py +++ b/src/logic/setup.py @@ -8,15 +8,13 @@ from codecs import open from setuptools import setup, find_packages -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") -# TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.3' +VERSION = '0.1.0' +try: + from azext_logic.manual.version import VERSION +except ImportError: + pass # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers @@ -32,9 +30,13 @@ 'License :: OSI Approved :: MIT License', ] -# TODO: Add any additional SDK dependencies here DEPENDENCIES = [] +try: + from azext_logic.manual.dependency import DEPENDENCIES +except ImportError: + pass + with open('README.md', 'r', encoding='utf-8') as f: README = f.read() with open('HISTORY.rst', 'r', encoding='utf-8') as f: @@ -44,7 +46,6 @@ name='logic', version=VERSION, description='Microsoft Azure Command-Line Tools LogicManagementClient Extension', - # TODO: Update author and email, if applicable author='Microsoft Corporation', author_email='azpycli@microsoft.com', url='https://github.com/Azure/azure-cli-extensions/tree/master/src/logic',