From c39e06b5ae66dc03467ce7b0f06d6eca47fb06ff Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 25 Nov 2020 00:42:39 +0000 Subject: [PATCH] CodeGen from PR 11627 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.Logic to add version stable/2019-05-01 (#11627) * Adding integration service environment encryption configuration details to Logic spec * Correcting json format errors * Correcting json formats * Updating examples * Fixing encryption key properties definition Co-authored-by: Rama Krishna Rayudu --- src/logic/HISTORY.rst | 4 - 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/custom.py | 11 +- .../azext_logic/generated/_client_factory.py | 116 +- src/logic/azext_logic/generated/_help.py | 1560 ++++++++++- src/logic/azext_logic/generated/_params.py | 1073 +++++++- .../azext_logic/generated/_validators.py | 9 + src/logic/azext_logic/generated/action.py | 178 +- src/logic/azext_logic/generated/commands.py | 328 ++- src/logic/azext_logic/generated/custom.py | 1482 ++++++++++- src/logic/azext_logic/tests/__init__.py | 102 + .../azext_logic/tests/latest/preparers.py | 159 ++ .../tests/latest/test_logic_scenario.py | 1581 ++++++++++- .../azext_logic/vendored_sdks/__init__.py | 2 +- .../vendored_sdks/logic/__init__.py | 6 + .../vendored_sdks/logic/_configuration.py | 15 +- .../logic/_logic_management_client.py | 15 +- .../vendored_sdks/logic/aio/__init__.py | 2 +- .../vendored_sdks/logic/aio/_configuration.py | 66 + .../logic/aio/_logic_management_client.py | 193 ++ .../logic/aio/operations/__init__.py | 65 + ...ntegration_account_agreement_operations.py | 403 +++ ...integration_account_assembly_operations.py | 386 +++ ..._account_batch_configuration_operations.py | 369 +++ ...egration_account_certificate_operations.py | 340 +++ .../_integration_account_map_operations.py | 422 +++ .../_integration_account_operations.py | 805 ++++++ ..._integration_account_partner_operations.py | 416 +++ .../_integration_account_schema_operations.py | 428 +++ ..._integration_account_session_operations.py | 333 +++ ...onment_managed_api_operation_operations.py | 121 + ...vice_environment_managed_api_operations.py | 424 +++ ...e_environment_network_health_operations.py | 100 + ...egration_service_environment_operations.py | 701 +++++ ...tion_service_environment_sku_operations.py | 117 + .../aio/operations/_operation_operations.py | 105 + .../aio/operations/_workflow_operations.py | 1186 +++++++++ .../_workflow_run_action_operations.py | 281 ++ ...rkflow_run_action_repetition_operations.py | 283 ++ ...n_repetition_request_history_operations.py | 204 ++ ...w_run_action_request_history_operations.py | 196 ++ ..._run_action_scope_repetition_operations.py | 196 ++ .../_workflow_run_operation_operations.py | 108 + .../operations/_workflow_run_operations.py | 251 ++ .../_workflow_trigger_history_operations.py | 265 ++ .../_workflow_trigger_operations.py | 506 ++++ .../_workflow_version_operations.py | 185 ++ .../_workflow_version_trigger_operations.py | 125 + .../vendored_sdks/logic/models/__init__.py | 56 +- .../models/_logic_management_client_enums.py | 750 +++--- .../vendored_sdks/logic/models/_models.py | 1213 +++++---- .../vendored_sdks/logic/models/_models_py3.py | 1331 +++++----- ...ntegration_account_agreement_operations.py | 183 +- ...integration_account_assembly_operations.py | 136 +- ..._account_batch_configuration_operations.py | 169 +- ...egration_account_certificate_operations.py | 133 +- .../_integration_account_map_operations.py | 155 +- .../_integration_account_operations.py | 376 +-- ..._integration_account_partner_operations.py | 155 +- .../_integration_account_schema_operations.py | 149 +- ..._integration_account_session_operations.py | 125 +- ...onment_managed_api_operation_operations.py | 53 +- ...vice_environment_managed_api_operations.py | 217 +- ...e_environment_network_health_operations.py | 36 +- ...egration_service_environment_operations.py | 388 ++- ...tion_service_environment_sku_operations.py | 53 +- .../logic/operations/_operation_operations.py | 53 +- .../logic/operations/_workflow_operations.py | 627 +++-- .../_workflow_run_action_operations.py | 120 +- ...rkflow_run_action_repetition_operations.py | 112 +- ...n_repetition_request_history_operations.py | 72 +- ...w_run_action_request_history_operations.py | 72 +- ..._run_action_scope_repetition_operations.py | 72 +- .../_workflow_run_operation_operations.py | 32 +- .../operations/_workflow_run_operations.py | 100 +- .../_workflow_trigger_history_operations.py | 100 +- .../_workflow_trigger_operations.py | 185 +- .../_workflow_version_operations.py | 76 +- .../_workflow_version_trigger_operations.py | 39 +- src/logic/report.md | 2321 +++++++++++++++-- src/logic/setup.cfg | 1 + src/logic/setup.py | 19 +- 84 files changed, 22132 insertions(+), 3808 deletions(-) create mode 100644 src/logic/azext_logic/generated/_validators.py create mode 100644 src/logic/azext_logic/tests/latest/preparers.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreement_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assembly_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configuration_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificate_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_map_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partner_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schema_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_session_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operation_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_sku_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operation_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetition_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetition_request_history_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_history_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetition_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operation_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_history_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_trigger_operations.py diff --git a/src/logic/HISTORY.rst b/src/logic/HISTORY.rst index 94abe39e365..1c139576ba0 100644 --- a/src/logic/HISTORY.rst +++ b/src/logic/HISTORY.rst @@ -3,10 +3,6 @@ Release History =============== -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 27e30487444..4f48fa652a5 100644 --- a/src/logic/azext_logic/azext_metadata.json +++ b/src/logic/azext_logic/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isExperimental": true, - "azext.minCliCoreVersion": "2.3.1" -} + "azext.minCliCoreVersion": "2.11.0" +} \ No newline at end of file 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..20beef0b2ad 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) + 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).workflow + + +def cf_workflow_version(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_version + + +def cf_workflow_trigger(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_trigger + + +def cf_workflow_version_trigger(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_version_trigger + + +def cf_workflow_trigger_history(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_trigger_history + + +def cf_workflow_run(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run + + +def cf_workflow_run_action(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_action + + +def cf_workflow_run_action_repetition(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_action_repetition + + +def cf_workflow_run_action_repetition_request_history(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_action_repetition_request_history + + +def cf_workflow_run_action_request_history(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_action_request_history + + +def cf_workflow_run_action_scope_repetition(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_action_scope_repetition + + +def cf_workflow_run_operation(cli_ctx, *_): + return cf_logic_cl(cli_ctx).workflow_run_operation def cf_integration_account(cli_ctx, *_): - return cf_logic(cli_ctx).integration_account + return cf_logic_cl(cli_ctx).integration_account + + +def cf_integration_account_assembly(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_assembly + + +def cf_integration_account_batch_configuration(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_batch_configuration + + +def cf_integration_account_schema(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_schema + + +def cf_integration_account_map(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_map + + +def cf_integration_account_partner(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_partner + + +def cf_integration_account_agreement(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_agreement + + +def cf_integration_account_certificate(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_certificate + + +def cf_integration_account_session(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_account_session + + +def cf_integration_service_environment(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_service_environment + + +def cf_integration_service_environment_sku(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_service_environment_sku + + +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_api + + +def cf_integration_service_environment_managed_api_operation(cli_ctx, *_): + return cf_logic_cl(cli_ctx).integration_service_environment_managed_api_operation diff --git a/src/logic/azext_logic/generated/_help.py b/src/logic/azext_logic/generated/_help.py index b5772ab8f22..0daf977b20b 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 @@ -15,11 +19,11 @@ 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,38 +31,552 @@ 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: --endpoints-configuration-workflow + short-summary: "The workflow endpoints." + long-summary: | + Usage: --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: --endpoints-configuration-connector + short-summary: "The connector endpoints." + long-summary: | + Usage: --endpoints-configuration-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" --endpoints-configuration-workflow \ +location="brazilsouth" properties={"definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Log\ +ic/schemas/2016-06-01/workflowdefinition.json#","actions":{"Find_pet_by_ID":{"type":"ApiConnection","inputs":{"path":"/\ +pet/@{encodeURIComponent(\'1\')}","method":"get","host":{"connection":{"name":"@parameters(\'$connections\')[\'test-cus\ +tom-connector\'][\'connectionId\']"}}},"runAfter":{}}},"contentVersion":"1.0.0.0","outputs":{},"parameters":{"$connecti\ +ons":{"type":"Object","defaultValue":{}}},"triggers":{"manual":{"type":"Request","inputs":{"schema":{}},"kind":"Http"}}\ +},"integrationAccount":{"id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/pr\ +oviders/Microsoft.Logic/integrationAccounts/test-integration-account"},"parameters":{"$connections":{"value":{"test-cus\ +tom-connector":{"connectionId":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/\ +providers/Microsoft.Web/connections/test-custom-connector","connectionName":"test-custom-connector","id":"/subscription\ +s/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-connector"\ +}}}}} tags={} --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: --endpoints-configuration-workflow + short-summary: "The workflow endpoints." + long-summary: | + Usage: --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: --endpoints-configuration-connector + short-summary: "The connector endpoints." + long-summary: | + Usage: --endpoints-configuration-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\\":{}}" --name "test-workflow" +""" + +helps['logic workflow validate-by-resource-group'] = """ + type: command + short-summary: "Validates the workflow." + parameters: + - name: --endpoints-configuration-workflow + short-summary: "The workflow endpoints." + long-summary: | + Usage: --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: --endpoints-configuration-connector + short-summary: "The connector endpoints." + long-summary: | + Usage: --endpoints-configuration-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\\":{}}" --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: logic workflow-version +""" + +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: logic workflow-trigger +""" + +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 get-schema-json'] = """ + type: command + short-summary: "Get the trigger schema as JSON." + examples: + - name: Get trigger schema + text: |- + az logic workflow-trigger get-schema-json --resource-group "testResourceGroup" --trigger-name \ +"testTrigger" --workflow-name "testWorkflow" +""" + +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-version-trigger'] = """ + type: group + short-summary: logic workflow-version-trigger +""" + +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: logic workflow-trigger-history +""" + +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: logic workflow-run +""" + +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: logic workflow-run-action +""" + +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: logic workflow-run-action-repetition +""" + +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: logic workflow-run-action-repetition-request-history +""" + +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: logic workflow-run-action-request-history +""" + +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: logic workflow-run-action-scope-repetition +""" + +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: logic workflow-run-operation +""" + +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'] = """ @@ -68,55 +586,1037 @@ 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: --integration-service-environment-sku + short-summary: "The sku." + long-summary: | + Usage: --integration-service-environment-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" --integration-service-environment-sku \ +name="Standard" --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: --integration-service-environment-sku + short-summary: "The sku." + long-summary: | + Usage: --integration-service-environment-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" --integration-service-environment-sku \ +name="Standard" --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" --key-vault-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: logic integration-account-assembly +""" + +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: logic integration-account-batch-configuration +""" + +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: --release-criteria-recurrence-schedule-monthly-occurrences + short-summary: "The monthly occurrences." + long-summary: | + Usage: --release-criteria-recurrence-schedule-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 --release-criteria-recurrence-schedule-monthly-occ\ +urrences argument. + examples: + - name: Create or update a batch configuration + text: |- + az logic integration-account-batch-configuration create --location "westus" --batch-group-name \ +"DEFAULT" --release-criteria-batch-size 234567 --release-criteria-message-count 10 --release-criteria-recurrence-freque\ +ncy "Minute" --release-criteria-recurrence-interval 1 --release-criteria-recurrence-start-time "2017-03-24T11:43:00" \ +--release-criteria-recurrence-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: --release-criteria-recurrence-schedule-monthly-occurrences + short-summary: "The monthly occurrences." + long-summary: | + Usage: --release-criteria-recurrence-schedule-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 --release-criteria-recurrence-schedule-monthly-occ\ +urrences 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: logic integration-account-schema +""" + +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: logic integration-account-map +""" + +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: logic integration-account-partner +""" + +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: --content-b2b-business-identities + short-summary: "The list of partner business identities." + long-summary: | + Usage: --content-b2b-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 --content-b2b-business-identities argument. + examples: + - name: Create or update a partner + text: |- + az logic integration-account-partner create --integration-account-name "testIntegrationAccount" \ +--location "westus" --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: --content-b2b-business-identities + short-summary: "The list of partner business identities." + long-summary: | + Usage: --content-b2b-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 --content-b2b-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: logic integration-account-agreement +""" + +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: logic integration-account-certificate +""" + +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-key-vault + short-summary: "The key vault reference." + long-summary: | + Usage: --key-key-vault id=XX + + id: The resource id. + examples: + - name: Create or update a certificate + text: |- + az logic integration-account-certificate create --location "brazilsouth" --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-key-vault + short-summary: "The key vault reference." + long-summary: | + Usage: --key-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: logic integration-account-session +""" + +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: logic integration-service-environment +""" + +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: logic integration-service-environment-sku +""" + +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: logic integration-service-environment-network-health +""" + +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: logic integration-service-environment-managed-api +""" + +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: logic integration-service-environment-managed-api-operation +""" + +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..53a7965f6c1 100644 --- a/src/logic/azext_logic/generated/_params.py +++ b/src/logic/azext_logic/generated/_params.py @@ -1,130 +1,1009 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # 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=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 ( + AddEndpointsConfigurationWorkflow, + AddSource, + AddIntegrationServiceEnvironmentSku, + AddProperties, + AddReleaseCriteriaRecurrenceScheduleMonthlyOccurrences, + AddContentB2bBusinessIdentities, + AddKeyKeyVault +) 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), + 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('integration_service_environment_id', type=str, help='The resource id.') + c.argument('access_control_triggers', type=validate_file_or_dict, help='The access control configuration for ' + 'invoking workflow triggers. Expected value: json-string/@json-file.') + c.argument('access_control_contents', type=validate_file_or_dict, help='The access control configuration for ' + 'accessing workflow run contents. Expected value: json-string/@json-file.') + c.argument('access_control_actions', type=validate_file_or_dict, help='The access control configuration for ' + 'workflow actions. Expected value: json-string/@json-file.') + c.argument('access_control_workflow_management', type=validate_file_or_dict, help='The access control ' + 'configuration for workflow management. Expected value: json-string/@json-file.') + c.argument('endpoints_configuration_workflow', action=AddEndpointsConfigurationWorkflow, nargs='*', help='The ' + 'workflow endpoints.') + c.argument('endpoints_configuration_connector', action=AddEndpointsConfigurationWorkflow, nargs='*', help='The ' + 'connector endpoints.') 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), + 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('integration_service_environment_id', type=str, help='The resource id.') + c.argument('access_control_triggers', type=validate_file_or_dict, help='The access control configuration for ' + 'invoking workflow triggers. Expected value: json-string/@json-file.') + c.argument('access_control_contents', type=validate_file_or_dict, help='The access control configuration for ' + 'accessing workflow run contents. Expected value: json-string/@json-file.') + c.argument('access_control_actions', type=validate_file_or_dict, help='The access control configuration for ' + 'workflow actions. Expected value: json-string/@json-file.') + c.argument('access_control_workflow_management', type=validate_file_or_dict, help='The access control ' + 'configuration for workflow management. Expected value: json-string/@json-file.') + c.argument('endpoints_configuration_workflow', action=AddEndpointsConfigurationWorkflow, nargs='*', help='The ' + 'workflow endpoints.') + c.argument('endpoints_configuration_connector', action=AddEndpointsConfigurationWorkflow, nargs='*', help='The ' + 'connector endpoints.') + + 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), + 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('integration_service_environment_id', type=str, help='The resource id.') + c.argument('access_control_triggers', type=validate_file_or_dict, help='The access control configuration for ' + 'invoking workflow triggers. Expected value: json-string/@json-file.') + c.argument('access_control_contents', type=validate_file_or_dict, help='The access control configuration for ' + 'accessing workflow run contents. Expected value: json-string/@json-file.') + c.argument('access_control_actions', type=validate_file_or_dict, help='The access control configuration for ' + 'workflow actions. Expected value: json-string/@json-file.') + c.argument('access_control_workflow_management', type=validate_file_or_dict, help='The access control ' + 'configuration for workflow management. Expected value: json-string/@json-file.') + c.argument('endpoints_configuration_workflow', action=AddEndpointsConfigurationWorkflow, nargs='*', help='The ' + 'workflow endpoints.') + c.argument('endpoints_configuration_connector', action=AddEndpointsConfigurationWorkflow, nargs='*', help='The ' + 'connector endpoints.') + + 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 get-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-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-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', options_list=['--name', '-n', '--integration-account-name'], type=str, + 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) + c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', '' + 'Suspended']), help='The workflow state.') + c.argument('integration_service_environment_sku', action=AddIntegrationServiceEnvironmentSku, nargs='*', help='' + 'The sku.') + c.argument('integration_service_environment_properties_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('integration_service_environment_properties_integration_service_environment_id', type=str, help='' + 'Gets the tracking id.') + c.argument('integration_service_environment_properties_endpoints_configuration', type=validate_file_or_dict, + help='The endpoints configuration. Expected value: json-string/@json-file.') + c.argument('integration_service_environment_properties_network_configuration', type=validate_file_or_dict, + help='The network configuration. Expected value: json-string/@json-file.') + c.argument('integration_service_environment_properties_encryption_configuration', type=validate_file_or_dict, + help='The encryption configuration. Expected value: json-string/@json-file.') + c.argument('sku_name', arg_type=get_enum_type(['NotSpecified', 'Free', 'Basic', 'Standard']), help='The sku ' + 'name.') 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', options_list=['--name', '-n', '--integration-account-name'], type=str, + help='The integration account name.', id_part='name') + c.argument('location', arg_type=get_location_type(self.cli_ctx), + 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('integration_service_environment_sku', action=AddIntegrationServiceEnvironmentSku, nargs='*', help='' + 'The sku.') + c.argument('integration_service_environment_properties_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('integration_service_environment_properties_integration_service_environment_id', type=str, help='' + 'Gets the tracking id.') + c.argument('integration_service_environment_properties_endpoints_configuration', type=validate_file_or_dict, + help='The endpoints configuration. Expected value: json-string/@json-file.') + c.argument('integration_service_environment_properties_network_configuration', type=validate_file_or_dict, + help='The network configuration. Expected value: json-string/@json-file.') + c.argument('integration_service_environment_properties_encryption_configuration', type=validate_file_or_dict, + help='The encryption configuration. Expected value: json-string/@json-file.') + c.argument('sku_name', arg_type=get_enum_type(['NotSpecified', 'Free', 'Basic', 'Standard']), help='The sku ' + 'name.') 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('key_vault_id', type=str, help='The resource id.') + + 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), + 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), + 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 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), + 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('release_criteria_message_count', type=int, help='The message count.') + c.argument('release_criteria_batch_size', type=int, help='The batch size in bytes.') + c.argument('release_criteria_recurrence_frequency', arg_type=get_enum_type(['NotSpecified', 'Second', 'Minute', + 'Hour', 'Day', 'Week', 'Month', '' + 'Year']), help='The frequency.') + c.argument('release_criteria_recurrence_interval', type=int, help='The interval.') + c.argument('release_criteria_recurrence_start_time', type=str, help='The start time.') + c.argument('release_criteria_recurrence_end_time', type=str, help='The end time.') + c.argument('release_criteria_recurrence_time_zone', type=str, help='The time zone.') + c.argument('release_criteria_recurrence_schedule_minutes', nargs='*', help='The minutes.') + c.argument('release_criteria_recurrence_schedule_hours', nargs='*', help='The hours.') + c.argument('release_criteria_recurrence_schedule_week_days', nargs='*', help='The days of the week.') + c.argument('release_criteria_recurrence_schedule_month_days', nargs='*', help='The month days.') + c.argument('release_criteria_recurrence_schedule_monthly_occurrences', + action=AddReleaseCriteriaRecurrenceScheduleMonthlyOccurrences, nargs='*', help='The monthly ' + 'occurrences.') + + 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), + 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('release_criteria_message_count', type=int, help='The message count.') + c.argument('release_criteria_batch_size', type=int, help='The batch size in bytes.') + c.argument('release_criteria_recurrence_frequency', arg_type=get_enum_type(['NotSpecified', 'Second', 'Minute', + 'Hour', 'Day', 'Week', 'Month', '' + 'Year']), help='The frequency.') + c.argument('release_criteria_recurrence_interval', type=int, help='The interval.') + c.argument('release_criteria_recurrence_start_time', type=str, help='The start time.') + c.argument('release_criteria_recurrence_end_time', type=str, help='The end time.') + c.argument('release_criteria_recurrence_time_zone', type=str, help='The time zone.') + c.argument('release_criteria_recurrence_schedule_minutes', nargs='*', help='The minutes.') + c.argument('release_criteria_recurrence_schedule_hours', nargs='*', help='The hours.') + c.argument('release_criteria_recurrence_schedule_week_days', nargs='*', help='The days of the week.') + c.argument('release_criteria_recurrence_schedule_month_days', nargs='*', help='The month days.') + c.argument('release_criteria_recurrence_schedule_monthly_occurrences', + action=AddReleaseCriteriaRecurrenceScheduleMonthlyOccurrences, nargs='*', help='The monthly ' + 'occurrences.') + + 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), + 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), + 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 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), + 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('parameters_schema_ref', type=str, help='The reference name.') + + 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), + 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('parameters_schema_ref', type=str, help='The reference name.') + + 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), + 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('content_b2b_business_identities', action=AddContentB2bBusinessIdentities, nargs='*', help='The ' + 'list of partner business identities.') + + 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), + 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('content_b2b_business_identities', action=AddContentB2bBusinessIdentities, nargs='*', help='The ' + 'list of partner business identities.') + + 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), + 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_key_vault', action=AddKeyKeyVault, nargs='*', help='The key vault reference.') + c.argument('key_key_name', type=str, help='The private key name in key vault.') + c.argument('key_key_version', type=str, help='The private key version in key vault.') + + 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), + 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_key_vault', action=AddKeyKeyVault, nargs='*', help='The key vault reference.') + c.argument('key_key_name', type=str, help='The private key name in key vault.') + c.argument('key_key_version', type=str, help='The private key version in key vault.') + + 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), + 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), + 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 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=AddIntegrationServiceEnvironmentSku, 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=AddIntegrationServiceEnvironmentSku, 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..819a8c3218a 100644 --- a/src/logic/azext_logic/generated/action.py +++ b/src/logic/azext_logic/generated/action.py @@ -1,70 +1,198 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # 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 AddEndpointsConfigurationWorkflow(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) - namespace.integration_account = action + namespace.endpoints_configuration_workflow = 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 == 'outgoing-ip-addresses': + d['outgoing_ip_addresses'] = v + elif kl == 'access-endpoint-ip-addresses': + d['access_endpoint_ip_addresses'] = v 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] return d -class AddKeyVault(argparse.Action): +class AddIntegrationServiceEnvironmentSku(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) - namespace.key_vault = action + namespace.integration_service_environment_sku = 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 == 'name': - d['name'] = v - elif kl == 'id': - d['id'] = v + d['name'] = v[0] + elif kl == 'capacity': + d['capacity'] = v[0] + 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] + return d + + +class AddReleaseCriteriaRecurrenceScheduleMonthlyOccurrences(argparse._AppendAction): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + super(AddReleaseCriteriaRecurrenceScheduleMonthlyOccurrences, 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] + return d + + +class AddContentB2bBusinessIdentities(argparse._AppendAction): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + super(AddContentB2bBusinessIdentities, 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] + return d + + +class AddKeyKeyVault(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.key_key_vault = 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[0] return d diff --git a/src/logic/azext_logic/generated/commands.py b/src/logic/azext_logic/generated/commands.py index cba2532585f..cce1c49b2fb 100644 --- a/src/logic/azext_logic/generated/commands.py +++ b/src/logic/azext_logic/generated/commands.py @@ -1,26 +1,158 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # 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_experimental=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.{}', client_factory=cf_workflow) - with self.command_group('logic workflow', logic_workflow, client_factory=cf_workflow) as g: + with self.command_group('logic workflow', logic_workflow, client_factory=cf_workflow, is_experimental=True) as g: g.custom_command('list', 'logic_workflow_list') g.custom_show_command('show', 'logic_workflow_show') 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_version_operations#WorkflowVersionOperati' + 'ons.{}', + client_factory=cf_workflow_version) + with self.command_group('logic workflow-version', logic_workflow_version, client_factory=cf_workflow_version, + is_experimental=True) 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_trigger_operations#WorkflowTriggerOperati' + 'ons.{}', + client_factory=cf_workflow_trigger) + with self.command_group('logic workflow-trigger', logic_workflow_trigger, client_factory=cf_workflow_trigger, + is_experimental=True) as g: + g.custom_command('list', 'logic_workflow_trigger_list') + g.custom_show_command('show', 'logic_workflow_trigger_show') + g.custom_command('get-schema-json', 'logic_workflow_trigger_get_schema_json') + 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') + + 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_trigger_operations#WorkflowVersio' + 'nTriggerOperations.{}', + client_factory=cf_workflow_version_trigger) + with self.command_group('logic workflow-version-trigger', logic_workflow_version_trigger, + client_factory=cf_workflow_version_trigger, is_experimental=True) 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_history_operations#WorkflowTrigge' + 'rHistoryOperations.{}', + client_factory=cf_workflow_trigger_history) + with self.command_group('logic workflow-trigger-history', logic_workflow_trigger_history, + client_factory=cf_workflow_trigger_history, is_experimental=True) 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_run_operations#WorkflowRunOperations.{}', + client_factory=cf_workflow_run) + with self.command_group('logic workflow-run', logic_workflow_run, client_factory=cf_workflow_run, + is_experimental=True) 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_action_operations#WorkflowRunActionOp' + 'erations.{}', + client_factory=cf_workflow_run_action) + with self.command_group('logic workflow-run-action', logic_workflow_run_action, + client_factory=cf_workflow_run_action, is_experimental=True) 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_repetition_operations#Workflow' + 'RunActionRepetitionOperations.{}', + 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, is_experimental=True) 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_repetition_request_history_ope' + 'rations#WorkflowRunActionRepetitionRequestHistoryOperations.{}', + 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, + is_experimental=True) 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_history_operations#Wor' + 'kflowRunActionRequestHistoryOperations.{}', + 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, is_experimental=True) 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_repetition_operations#Wo' + 'rkflowRunActionScopeRepetitionOperations.{}', + 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, is_experimental=True) 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_operation_operations#WorkflowRunOpera' + 'tionOperations.{}', + client_factory=cf_workflow_run_operation) + with self.command_group('logic workflow-run-operation', logic_workflow_run_operation, + client_factory=cf_workflow_run_operation, is_experimental=True) 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( @@ -28,11 +160,185 @@ def load_command_table(self, _): 'perations.{}', client_factory=cf_integration_account) with self.command_group('logic integration-account', logic_integration_account, - client_factory=cf_integration_account) as g: + client_factory=cf_integration_account, is_experimental=True) as g: g.custom_command('list', 'logic_integration_account_list') 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_assembly_operations#Integratio' + 'nAccountAssemblyOperations.{}', + client_factory=cf_integration_account_assembly) + with self.command_group('logic integration-account-assembly', logic_integration_account_assembly, + client_factory=cf_integration_account_assembly, is_experimental=True) 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.custom_command('update', '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_configuration_operations' + '#IntegrationAccountBatchConfigurationOperations.{}', + 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, is_experimental=True) 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.custom_command('update', '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_schema_operations#IntegrationA' + 'ccountSchemaOperations.{}', + client_factory=cf_integration_account_schema) + with self.command_group('logic integration-account-schema', logic_integration_account_schema, + client_factory=cf_integration_account_schema, is_experimental=True) 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.custom_command('update', '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_map_operations#IntegrationAcco' + 'untMapOperations.{}', + client_factory=cf_integration_account_map) + with self.command_group('logic integration-account-map', logic_integration_account_map, + client_factory=cf_integration_account_map, is_experimental=True) 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.custom_command('update', 'logic_integration_account_map_update') + 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_partner_operations#Integration' + 'AccountPartnerOperations.{}', + client_factory=cf_integration_account_partner) + with self.command_group('logic integration-account-partner', logic_integration_account_partner, + client_factory=cf_integration_account_partner, is_experimental=True) 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.custom_command('update', 'logic_integration_account_partner_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_agreement_operations#Integrati' + 'onAccountAgreementOperations.{}', + client_factory=cf_integration_account_agreement) + with self.command_group('logic integration-account-agreement', logic_integration_account_agreement, + client_factory=cf_integration_account_agreement, is_experimental=True) 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.generic_update_command('update', setter_arg_name='agreement', custom_func_name='' + '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_certificate_operations#Integra' + 'tionAccountCertificateOperations.{}', + client_factory=cf_integration_account_certificate) + with self.command_group('logic integration-account-certificate', logic_integration_account_certificate, + client_factory=cf_integration_account_certificate, is_experimental=True) 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.custom_command('update', '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_session_operations#Integration' + 'AccountSessionOperations.{}', + client_factory=cf_integration_account_session) + with self.command_group('logic integration-account-session', logic_integration_account_session, + client_factory=cf_integration_account_session, is_experimental=True) 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.custom_command('update', 'logic_integration_account_session_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_environment_operations#Integra' + 'tionServiceEnvironmentOperations.{}', + client_factory=cf_integration_service_environment) + with self.command_group('logic integration-service-environment', logic_integration_service_environment, + client_factory=cf_integration_service_environment, is_experimental=True) 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_sku_operations#Int' + 'egrationServiceEnvironmentSkuOperations.{}', + 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, is_experimental=True) 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, + is_experimental=True) 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_api_operat' + 'ions#IntegrationServiceEnvironmentManagedApiOperations.{}', + 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, is_experimental=True) 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' + 'ion_operations#IntegrationServiceEnvironmentManagedApiOperationOperations.{}', + 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, + is_experimental=True) as g: + g.custom_command('list', 'logic_integration_service_environment_managed_api_operation_list') diff --git a/src/logic/azext_logic/generated/custom.py b/src/logic/azext_logic/generated/custom.py index 3fbf50d7677..199115cbf88 100644 --- a/src/logic/azext_logic/generated/custom.py +++ b/src/logic/azext_logic/generated/custom.py @@ -1,91 +1,533 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # 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, + endpoints_configuration_workflow, + location=None, tags=None, state=None, - endpoints_configuration=None, - access_control=None, - integration_account=None, - integration_service_environment=None): - - if 'definition' not in definition: - raise CLIError(str(definition) + - " does not contain a 'definition' key") - + definition=None, + parameters=None, + integration_service_environment_id=None, + access_control_triggers=None, + access_control_contents=None, + access_control_actions=None, + access_control_workflow_management=None, + endpoints_configuration_connector=None): return client.create_or_update(resource_group_name=resource_group_name, - workflow_name=name, + workflow_name=workflow_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)) + definition=definition, + parameters=parameters, + id=integration_service_environment_id, + triggers=access_control_triggers, + contents=access_control_contents, + actions=access_control_actions, + workflow_management=access_control_workflow_management, + workflow=endpoints_configuration_workflow, + connector=endpoints_configuration_connector) -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): + return client.generate_upgraded_definition(resource_group_name=resource_group_name, + workflow_name=workflow_name, + target_schema_version=target_schema_version) + + +def logic_workflow_list_callback_url(client, + resource_group_name, + workflow_name, + not_after=None, + key_type=None): + return client.list_callback_url(resource_group_name=resource_group_name, + workflow_name=workflow_name, + not_after=not_after, + key_type=key_type) + + +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): + return sdk_no_wait(no_wait, + client.begin_move, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + id=id_) + + +def logic_workflow_regenerate_access_key(client, + resource_group_name, + workflow_name, + 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, + integration_service_environment_id=None, + access_control_triggers=None, + access_control_contents=None, + access_control_actions=None, + access_control_workflow_management=None, + endpoints_configuration_workflow=None, + endpoints_configuration_connector=None): + return client.validate_by_location(resource_group_name=resource_group_name, + location=location, + workflow_name=workflow_name, + resource_location=resource_location, + tags=tags, + state=state, + definition=definition, + parameters=parameters, + id=integration_service_environment_id, + triggers=access_control_triggers, + contents=access_control_contents, + actions=access_control_actions, + workflow_management=access_control_workflow_management, + workflow=endpoints_configuration_workflow, + connector=endpoints_configuration_connector) + + +def logic_workflow_validate_by_resource_group(client, + resource_group_name, + workflow_name, + location=None, + tags=None, + state=None, + definition=None, + parameters=None, + integration_service_environment_id=None, + access_control_triggers=None, + access_control_contents=None, + access_control_actions=None, + access_control_workflow_management=None, + endpoints_configuration_workflow=None, + endpoints_configuration_connector=None): + return client.validate_by_resource_group(resource_group_name=resource_group_name, + workflow_name=workflow_name, + location=location, + tags=tags, + state=state, + definition=definition, + parameters=parameters, + id=integration_service_environment_id, + triggers=access_control_triggers, + contents=access_control_contents, + actions=access_control_actions, + workflow_management=access_control_workflow_management, + workflow=endpoints_configuration_workflow, + connector=endpoints_configuration_connector) + + +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_get_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_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): + return client.set_state(resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + source=source) + + +def logic_workflow_version_trigger_list_callback_url(client, + resource_group_name, + workflow_name, + version_id, + trigger_name, + not_after=None, + key_type=None): + return client.list_callback_url(resource_group_name=resource_group_name, + workflow_name=workflow_name, + version_id=version_id, + trigger_name=trigger_name, + not_after=not_after, + key_type=key_type) + + +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_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_trace(resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name) -def logic_integration_account_list(cmd, client, + +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_trace(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 +536,897 @@ 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, - sku=None, - integration_service_environment=None, - state=None): - if isinstance(integration_service_environment, str): - integration_service_environment = json.loads( - integration_service_environment) + state=None, + integration_service_environment_sku=None, + integration_service_environment_properties_provisioning_state=None, + integration_service_environment_properties_integration_service_environment_id=None, + integration_service_environment_properties_endpoints_configuration=None, + integration_service_environment_properties_network_configuration=None, + integration_service_environment_properties_encryption_configuration=None, + sku_name=None): return client.create_or_update(resource_group_name=resource_group_name, - integration_account_name=name, + integration_account_name=integration_account_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" + state=state, + sku=integration_service_environment_sku, + provisioning_state=integration_service_environment_properties_provisioning_state, + integration_service_environment_id=integration_service_environment_properties_integration_service_environment_id, + endpoints_configuration=integration_service_environment_properties_endpoints_configuration, + network_configuration=integration_service_environment_properties_network_configuration, + encryption_configuration=integration_service_environment_properties_encryption_configuration, + name=sku_name) -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, + integration_service_environment_sku=None, + integration_service_environment_properties_provisioning_state=None, + integration_service_environment_properties_integration_service_environment_id=None, + integration_service_environment_properties_endpoints_configuration=None, + integration_service_environment_properties_network_configuration=None, + integration_service_environment_properties_encryption_configuration=None, + sku_name=None): + return client.update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + location=location, + tags=tags, + state=state, + sku=integration_service_environment_sku, + provisioning_state=integration_service_environment_properties_provisioning_state, + integration_service_environment_id=integration_service_environment_properties_integration_service_environment_id, + endpoints_configuration=integration_service_environment_properties_endpoints_configuration, + network_configuration=integration_service_environment_properties_network_configuration, + encryption_configuration=integration_service_environment_properties_encryption_configuration, + name=sku_name) + + +def logic_integration_account_delete(client, + resource_group_name, + integration_account_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name) + + +def logic_integration_account_list_callback_url(client, + resource_group_name, + integration_account_name, + not_after=None, + key_type=None): + return client.list_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + not_after=not_after, + key_type=key_type) + - if 'properties' not in input_path: - raise CLIError(str(input_path) + - " does not contain a 'properties' key") +def logic_integration_account_list_key_vault_key(client, + resource_group_name, + integration_account_name, + skip_token=None, + key_vault_id=None): + return client.list_key_vault_key(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + skip_token=skip_token, + id=key_vault_id) - integration_service_environment = input_path['properties'].get( - 'integrationServiceEnvironment', None) + +def logic_integration_account_log_tracking_event(client, + resource_group_name, + integration_account_name, + source_type, + events, + track_events_options=None): + return client.log_tracking_event(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + source_type=source_type, + track_events_options=track_events_options, + events=events) + + +def logic_integration_account_regenerate_access_key(client, + resource_group_name, + integration_account_name, + key_type=None): + return client.regenerate_access_key(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + key_type=key_type) + + +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): 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" + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + location=location, + tags=tags, + properties=properties) -def logic_integration_account_update(cmd, client, - name, - resource_group_name, - tags=None, - sku=None, - integration_service_environment=None, - state=None): +def logic_integration_account_assembly_update(client, + resource_group_name, + integration_account_name, + assembly_artifact_name, + properties, + location=None, + tags=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + location=location, + tags=tags, + properties=properties) - 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_assembly_delete(client, + resource_group_name, + integration_account_name, + assembly_artifact_name): + return client.delete(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name) -def logic_integration_account_delete(cmd, client, - resource_group_name, - 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, + release_criteria_message_count=None, + release_criteria_batch_size=None, + release_criteria_recurrence_frequency=None, + release_criteria_recurrence_interval=None, + release_criteria_recurrence_start_time=None, + release_criteria_recurrence_end_time=None, + release_criteria_recurrence_time_zone=None, + release_criteria_recurrence_schedule_minutes=None, + release_criteria_recurrence_schedule_hours=None, + release_criteria_recurrence_schedule_week_days=None, + release_criteria_recurrence_schedule_month_days=None, + release_criteria_recurrence_schedule_monthly_occurrences=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name, + location=location, + tags=tags, + created_time=created_time, + changed_time=changed_time, + metadata=metadata, + batch_group_name=batch_group_name, + message_count=release_criteria_message_count, + batch_size=release_criteria_batch_size, + frequency=release_criteria_recurrence_frequency, + interval=release_criteria_recurrence_interval, + start_time=release_criteria_recurrence_start_time, + end_time=release_criteria_recurrence_end_time, + time_zone=release_criteria_recurrence_time_zone, + minutes=release_criteria_recurrence_schedule_minutes, + hours=release_criteria_recurrence_schedule_hours, + week_days=release_criteria_recurrence_schedule_week_days, + month_days=release_criteria_recurrence_schedule_month_days, + monthly_occurrences=release_criteria_recurrence_schedule_monthly_occurrences) + + +def logic_integration_account_batch_configuration_update(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, + release_criteria_message_count=None, + release_criteria_batch_size=None, + release_criteria_recurrence_frequency=None, + release_criteria_recurrence_interval=None, + release_criteria_recurrence_start_time=None, + release_criteria_recurrence_end_time=None, + release_criteria_recurrence_time_zone=None, + release_criteria_recurrence_schedule_minutes=None, + release_criteria_recurrence_schedule_hours=None, + release_criteria_recurrence_schedule_week_days=None, + release_criteria_recurrence_schedule_month_days=None, + release_criteria_recurrence_schedule_monthly_occurrences=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name, + location=location, + tags=tags, + created_time=created_time, + changed_time=changed_time, + metadata=metadata, + batch_group_name=batch_group_name, + message_count=release_criteria_message_count, + batch_size=release_criteria_batch_size, + frequency=release_criteria_recurrence_frequency, + interval=release_criteria_recurrence_interval, + start_time=release_criteria_recurrence_start_time, + end_time=release_criteria_recurrence_end_time, + time_zone=release_criteria_recurrence_time_zone, + minutes=release_criteria_recurrence_schedule_minutes, + hours=release_criteria_recurrence_schedule_hours, + week_days=release_criteria_recurrence_schedule_week_days, + month_days=release_criteria_recurrence_schedule_month_days, + monthly_occurrences=release_criteria_recurrence_schedule_monthly_occurrences) + + +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): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + 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_parameter=properties_content_type) + + +def logic_integration_account_schema_update(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): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + 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_parameter=properties_content_type) + + +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): + return client.list_content_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + not_after=not_after, + key_type=key_type) + + +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, + parameters_schema_ref=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + location=location, + tags=tags, + map_type=map_type, + content=content, + content_type_parameter=properties_content_type, + metadata=metadata, + ref=parameters_schema_ref) + + +def logic_integration_account_map_update(client, + resource_group_name, + integration_account_name, + map_name, + map_type, + properties_content_type, + location=None, + tags=None, + content=None, + metadata=None, + parameters_schema_ref=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + location=location, + tags=tags, + map_type=map_type, + content=content, + content_type_parameter=properties_content_type, + metadata=metadata, + ref=parameters_schema_ref) + + +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): + return client.list_content_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + not_after=not_after, + key_type=key_type) + + +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, + content_b2b_business_identities=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + location=location, + tags=tags, + partner_type=partner_type, + metadata=metadata, + business_identities=content_b2b_business_identities) + + +def logic_integration_account_partner_update(client, + resource_group_name, + integration_account_name, + partner_name, + partner_type, + location=None, + tags=None, + metadata=None, + content_b2b_business_identities=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + location=location, + tags=tags, + partner_type=partner_type, + metadata=metadata, + business_identities=content_b2b_business_identities) + + +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=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): + return client.list_content_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + not_after=not_after, + key_type=key_type) + + +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(instance, + resource_group_name, + integration_account_name, + agreement_name): + return instance + + +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): + return client.list_content_callback_url(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + not_after=not_after, + key_type=key_type) + + +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_key_vault=None, + key_key_name=None, + key_key_version=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name, + location=location, + tags=tags, + metadata=metadata, + public_certificate=public_certificate, + key_vault=key_key_vault, + key_name=key_key_name, + key_version=key_key_version) + + +def logic_integration_account_certificate_update(client, + resource_group_name, + integration_account_name, + certificate_name, + location=None, + tags=None, + metadata=None, + public_certificate=None, + key_key_vault=None, + key_key_name=None, + key_key_version=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name, + location=location, + tags=tags, + metadata=metadata, + public_certificate=public_certificate, + key_vault=key_key_vault, + key_name=key_key_name, + key_version=key_key_version) + + +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): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name, + location=location, + tags=tags, + content=content) + + +def logic_integration_account_session_update(client, + resource_group_name, + integration_account_name, + session_name, + location=None, + tags=None, + content=None): + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name, + location=location, + tags=tags, + content=content) + + +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): + return sdk_no_wait(no_wait, + client.begin_create_or_update, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + location=location, + tags=tags, + sku=sku, + provisioning_state=provisioning_state, + state=state, + integration_service_environment_id=integration_service_environment_id, + endpoints_configuration=endpoints_configuration, + network_configuration=network_configuration, + encryption_configuration=encryption_configuration) + + +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): + return sdk_no_wait(no_wait, + client.begin_update, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + location=location, + tags=tags, + sku=sku, + provisioning_state=provisioning_state, + state=state, + integration_service_environment_id=integration_service_environment_id, + endpoints_configuration=endpoints_configuration, + network_configuration=network_configuration, + encryption_configuration=encryption_configuration) + + +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..50e0627daff 100644 --- a/src/logic/azext_logic/tests/__init__.py +++ b/src/logic/azext_logic/tests/__init__.py @@ -8,5 +8,107 @@ # 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) + module_path = __path__[0] + 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) + 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: + 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/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 1bfdda33e6b..2012b236e59 100644 --- a/src/logic/azext_logic/tests/latest/test_logic_scenario.py +++ b/src/logic/azext_logic/tests/latest/test_logic_scenario.py @@ -1,109 +1,1510 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # 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 .. import try_manual, raise_if, calc_coverage from azure.cli.testsdk import ResourceGroupPreparer +from .preparers import VirtualNetworkPreparer TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) -class LogicManagementClientScenarioTest(ScenarioTest): +# Env setup +@try_manual +def setup(test, rg_2, rg, rg_3): + pass + + +# EXAMPLE: /IntegrationAccounts/put/Create or update an integration account +@try_manual +def step__integrationaccounts_put(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account create ' + '--location "westus" ' + '--integration-service-environment-sku name="Standard" ' + '--name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[ + test.check("location", "westus", case_sensitive=False), + test.check("sku.name", "Standard", case_sensitive=False), + test.check("name", "{myIntegrationAccount}", case_sensitive=False), + ]) + + +# EXAMPLE: /IntegrationAccounts/get/Get integration account by name +@try_manual +def step__integrationaccounts_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account show ' + '--name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[ + test.check("location", "westus", case_sensitive=False), + test.check("sku.name", "Standard", case_sensitive=False), + ]) + + +# EXAMPLE: /IntegrationAccounts/get/List integration accounts by resource group name +@try_manual +def step__integrationaccounts_get2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account list ' + '--resource-group "{rg_2}"', + checks=[ + test.check('length(@)', 1), + ]) + + +# EXAMPLE: /IntegrationAccounts/get/List integration accounts by subscription +@try_manual +def step__integrationaccounts_get3(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account list ' + '-g ""', + checks=[ + test.check('length(@)', 1), + ]) + + +# EXAMPLE: /IntegrationAccounts/patch/Patch an integration account +@try_manual +def step__integrationaccounts_patch(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account update ' + '--location "westus" ' + '--integration-service-environment-sku name="Standard" ' + '--name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[ + test.check("location", "westus", case_sensitive=False), + test.check("sku.name", "Standard", case_sensitive=False), + test.check("name", "{myIntegrationAccount}", case_sensitive=False), + ]) + + +# EXAMPLE: /IntegrationAccounts/post/Get Integration Account callback URL +@try_manual +def step__integrationaccounts_post(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account list-key-vault-key ' + '--name "{myIntegrationAccount}" ' + '--key-vault-id "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testResourceGroup/provi' + 'ders/Microsoft.KeyVault/vaults/testKeyVault" ' + '--skip-token "testSkipToken" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccounts/post/List IntegrationAccount callback URL +@try_manual +def step__integrationaccounts_post2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account list-callback-url ' + '--name "{myIntegrationAccount}" ' + '--key-type "Primary" ' + '--not-after "2017-03-05T08:00:00Z" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccounts/post/Log a tracked event +@try_manual +def step__integrationaccounts_post_log_a_tracked_event(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account log-tracking-event ' + '--name "{myIntegrationAccount}" ' + '--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=[]) + + +# EXAMPLE: /IntegrationAccounts/post/Regenerate access key +@try_manual +def step__integrationaccounts_post3(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account regenerate-access-key ' + '--name "{myIntegrationAccount}" ' + '--key-type "Primary" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAgreements/put/Create or update an agreement +@try_manual +def step__integrationaccountagreements_put(test, rg_2, rg, rg_3): + 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 "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAgreements/get/Get agreement by name +@try_manual +def step__integrationaccountagreements_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-agreement show ' + '--agreement-name "testAgreement" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAgreements/get/Get agreements by integration account name +@try_manual +def step__integrationaccountagreements_get2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-agreement list ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAgreements/post/Get the content callback url +@try_manual +def step__integrationaccountagreements_post(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-agreement list-content-callback-url ' + '--agreement-name "testAgreement" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--key-type "Primary" ' + '--not-after "2018-04-19T16:00:00Z" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAgreements/delete/Delete an agreement +@try_manual +def step__integrationaccountagreements_delete(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-agreement delete -y ' + '--agreement-name "testAgreement" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAssemblies/put/Create or update an account assembly +@try_manual +def step__integrationaccountassemblies_put(test, rg_2, rg, rg_3): + 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 "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAssemblies/get/Get an integration account assembly +@try_manual +def step__integrationaccountassemblies_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-assembly show ' + '--assembly-artifact-name "testAssembly" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAssemblies/get/List integration account assemblies +@try_manual +def step__integrationaccountassemblies_get2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-assembly list ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAssemblies/post/Get the callback url for an integration account assembly +@try_manual +def step__integrationaccountassemblies_post(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-assembly list-content-callback-url ' + '--assembly-artifact-name "testAssembly" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountAssemblies/delete/Delete an integration account assembly +@try_manual +def step__integrationaccountassemblies_delete(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-assembly delete -y ' + '--assembly-artifact-name "testAssembly" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountBatchConfigurations/put/Create or update a batch configuration +@try_manual +def step__integrationaccountbatchconfigurations_put(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-batch-configuration create ' + '--location "westus" ' + '--batch-group-name "DEFAULT" ' + '--release-criteria-batch-size 234567 ' + '--release-criteria-message-count 10 ' + '--release-criteria-recurrence-frequency "Minute" ' + '--release-criteria-recurrence-interval 1 ' + '--release-criteria-recurrence-start-time "2017-03-24T11:43:00" ' + '--release-criteria-recurrence-time-zone "India Standard Time" ' + '--batch-configuration-name "testBatchConfiguration" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountBatchConfigurations/get/Get a batch configuration +@try_manual +def step__integrationaccountbatchconfigurations_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-batch-configuration show ' + '--batch-configuration-name "testBatchConfiguration" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountBatchConfigurations/get/List batch configurations +@try_manual +def step__integrationaccountbatchconfigurations_get2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-batch-configuration list ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountBatchConfigurations/delete/Delete a batch configuration +@try_manual +def step__integrationaccountbatchconfigurations_delete(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-batch-configuration delete -y ' + '--batch-configuration-name "testBatchConfiguration" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountCertificates/put/Create or update a certificate +@try_manual +def step__integrationaccountcertificates_put(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-certificate create ' + '--location "brazilsouth" ' + '--public-certificate "" ' + '--certificate-name "testCertificate" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountCertificates/get/Get certificate by name +@try_manual +def step__integrationaccountcertificates_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-certificate show ' + '--certificate-name "testCertificate" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountCertificates/get/Get certificates by integration account name +@try_manual +def step__integrationaccountcertificates_get2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-certificate list ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountCertificates/delete/Delete a certificate +@try_manual +def step__integrationaccountcertificates_delete(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-certificate delete -y ' + '--certificate-name "testCertificate" ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountMaps/put/Create or update a map +@try_manual +def step__integrationaccountmaps_put(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-map create ' + '--integration-account-name "{myIntegrationAccount}" ' + '--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=[]) + + +# EXAMPLE: /IntegrationAccountMaps/get/Get map by name +@try_manual +def step__integrationaccountmaps_get_get_map_by_name(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-map show ' + '--integration-account-name "{myIntegrationAccount}" ' + '--map-name "testMap" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountMaps/get/Get maps by integration account name +@try_manual +def step__integrationaccountmaps_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-map list ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountMaps/post/Get the content callback url +@try_manual +def step__integrationaccountmaps_post(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-map list-content-callback-url ' + '--integration-account-name "{myIntegrationAccount}" ' + '--key-type "Primary" ' + '--not-after "2018-04-19T16:00:00Z" ' + '--map-name "testMap" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountMaps/delete/Delete a map +@try_manual +def step__integrationaccountmaps_delete_delete_a_map(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-map delete -y ' + '--integration-account-name "{myIntegrationAccount}" ' + '--map-name "testMap" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountPartners/put/Create or update a partner +@try_manual +def step__integrationaccountpartners_put(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-partner create ' + '--integration-account-name "{myIntegrationAccount}" ' + '--location "westus" ' + '--metadata "{{}}" ' + '--partner-type "B2B" ' + '--partner-name "testPartner" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountPartners/get/Get partner by name +@try_manual +def step__integrationaccountpartners_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-partner show ' + '--integration-account-name "{myIntegrationAccount}" ' + '--partner-name "testPartner" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountPartners/get/Get partners by integration account name +@try_manual +def step__integrationaccountpartners_get2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-partner list ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountPartners/post/Get the content callback url +@try_manual +def step__integrationaccountpartners_post(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-partner list-content-callback-url ' + '--integration-account-name "{myIntegrationAccount}" ' + '--key-type "Primary" ' + '--not-after "2018-04-19T16:00:00Z" ' + '--partner-name "testPartner" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountPartners/delete/Delete a partner +@try_manual +def step__integrationaccountpartners_delete(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-partner delete -y ' + '--integration-account-name "{myIntegrationAccount}" ' + '--partner-name "testPartner" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountSchemas/put/Create or update schema +@try_manual +def step__integrationaccountschemas_put(test, rg_2, rg, rg_3): + 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 "{myIntegrationAccount}" ' + '--resource-group "{rg_2}" ' + '--schema-name "testSchema"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountSchemas/get/Get schema by name +@try_manual +def step__integrationaccountschemas_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-schema show ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}" ' + '--schema-name "testSchema"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountSchemas/get/Get schemas by integration account name +@try_manual +def step__integrationaccountschemas_get2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-schema list ' + '--integration-account-name "{myIntegrationAccount2}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountSchemas/post/Get the content callback url +@try_manual +def step__integrationaccountschemas_post(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-schema list-content-callback-url ' + '--integration-account-name "{myIntegrationAccount}" ' + '--key-type "Primary" ' + '--not-after "2018-04-19T16:00:00Z" ' + '--resource-group "{rg_2}" ' + '--schema-name "testSchema"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountSchemas/delete/Delete a schema by name +@try_manual +def step__integrationaccountschemas_delete(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-schema delete -y ' + '--integration-account-name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}" ' + '--schema-name "testSchema"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountSessions/put/Create or update an integration account session +@try_manual +def step__integrationaccountsessions_put(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-session create ' + '--integration-account-name "{myIntegrationAccount3}" ' + '--resource-group "{rg_3}" ' + '--content "{{\\"controlNumber\\":\\"1234\\",\\"controlNumberChangedTime\\":\\"2017-02-21T22:30:11.9923759' + 'Z\\"}}" ' + '--session-name "testsession123-ICN"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountSessions/get/Get a list of integration account sessions +@try_manual +def step__integrationaccountsessions_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-session list ' + '--integration-account-name "{myIntegrationAccount3}" ' + '--resource-group "{rg_3}"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountSessions/get/Get an integration account session +@try_manual +def step__integrationaccountsessions_get2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-session show ' + '--integration-account-name "{myIntegrationAccount3}" ' + '--resource-group "{rg_3}" ' + '--session-name "testsession123-ICN"', + checks=[]) + + +# EXAMPLE: /IntegrationAccountSessions/delete/Delete an integration account session +@try_manual +def step__integrationaccountsessions_delete(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account-session delete -y ' + '--integration-account-name "{myIntegrationAccount3}" ' + '--resource-group "{rg_3}" ' + '--session-name "testsession123-ICN"', + checks=[]) + + +# EXAMPLE: /IntegrationAccounts/delete/Delete an integration account +@try_manual +def step__integrationaccounts_delete(test, rg_2, rg, rg_3): + test.cmd('az logic integration-account delete -y ' + '--name "{myIntegrationAccount}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationServiceEnvironments/put/Create or update an integration service environment +@try_manual +def step__integrationserviceenvironments_put(test, rg_2, rg, rg_3): + 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.check("name", "{myIntegrationServiceEnvironment}", case_sensitive=False), + ]) + test.cmd('az logic integration-service-environment wait --created ' + '--name "{myIntegrationServiceEnvironment}"', + checks=[]) + + +# EXAMPLE: /IntegrationServiceEnvironments/get/Get integration service environment by name +@try_manual +def step__integrationserviceenvironments_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment show ' + '--name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[ + test.check("encryptionConfiguration.encryptionKeyReference.keyName", "testKeyName", + case_sensitive=False), + test.check("encryptionConfiguration.encryptionKeyReference.keyVault.id", "" + "/subscriptions/{subscription_id}/resourceGroups/{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), + ]) + + +# EXAMPLE: /IntegrationServiceEnvironments/get/List integration service environments by resource group name +@try_manual +def step__integrationserviceenvironments_get2(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment list ' + '--resource-group "{rg_2}"', + checks=[ + test.check('length(@)', 1), + ]) + + +# EXAMPLE: /IntegrationServiceEnvironments/get/List integration service environments by subscription +@try_manual +def step__integrationserviceenvironments_get3(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment list', + checks=[ + test.check('length(@)', 1), + ]) + + +# EXAMPLE: /IntegrationServiceEnvironments/patch/Patch an integration service environment +@try_manual +def step__integrationserviceenvironments_patch(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment update ' + '--sku name="Developer" capacity=0 ' + '--tags tag1="value1" ' + '--name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[ + test.check("encryptionConfiguration.encryptionKeyReference.keyName", "testKeyName", + case_sensitive=False), + test.check("encryptionConfiguration.encryptionKeyReference.keyVault.id", "" + "/subscriptions/{subscription_id}/resourceGroups/{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), + ]) + + +# EXAMPLE: /IntegrationServiceEnvironments/post/Restarts an integration service environment +@try_manual +def step__integrationserviceenvironments_post(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment restart ' + '--name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + - def current_subscription(self): - subs = self.cmd('az account show').get_output_in_json() - return subs['id'] +# EXAMPLE: /IntegrationServiceEnvironmentManagedApiOperations/get/Gets the integration service environment managed Apis +@try_manual +def step__integrationserviceenvironmentmanagedapiopera(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment-managed-api-operation list ' + '--api-name "servicebus" ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationServiceEnvironmentManagedApis/put/Gets the integration service environment managed Apis +@try_manual +def step__integrationserviceenvironmentmanagedapis_put(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment-managed-api put ' + '--api-name "servicebus" ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationServiceEnvironmentManagedApis/get/Gets the integration service environment managed Apis +@try_manual +def step__integrationserviceenvironmentmanagedapis_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment-managed-api list ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationServiceEnvironmentManagedApis/get/Gets the integration service environment managed Apis +@try_manual +def step__integrationserviceenvironmentmanagedapis_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment-managed-api list ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationServiceEnvironmentManagedApis/delete/Deletes the integration service environment managed Apis +@try_manual +def step__integrationserviceenvironmentmanagedapis_del(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment-managed-api delete -y ' + '--api-name "servicebus" ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationServiceEnvironmentNetworkHealth/get/Gets the integration service environment network health +@try_manual +def step__integrationserviceenvironmentnetworkhealth_g(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment-network-health show ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationServiceEnvironmentSkus/get/List integration service environment skus +@try_manual +def step__integrationserviceenvironmentskus_get(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment-sku list ' + '--integration-service-environment-name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /IntegrationServiceEnvironments/delete/Delete an integration account +@try_manual +def step__integrationserviceenvironments_delete(test, rg_2, rg, rg_3): + test.cmd('az logic integration-service-environment delete -y ' + '--name "{myIntegrationServiceEnvironment}" ' + '--resource-group "{rg_2}"', + checks=[]) + + +# EXAMPLE: /Workflows/put/Create or update a workflow +@try_manual +def step__workflows_put_create_or_update_a_workflow(test, rg_2, rg, rg_3): + test.cmd('az logic workflow create ' + '--resource-group "{rg}" ' + '--endpoints-configuration-workflow location="brazilsouth" properties={{"definition":{{"$schema":"https://' + 'schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","actio' + 'ns":{{"Find_pet_by_ID":{{"type":"ApiConnection","inputs":{{"path":"/pet/@{{encodeURIComponent(\'1\')}}","' + 'method":"get","host":{{"connection":{{"name":"@parameters(\'$connections\')[\'test-custom-connector\'][\'' + 'connectionId\']"}}}}}},"runAfter":{{}}}}}},"contentVersion":"1.0.0.0","outputs":{{}},"parameters":{{"$con' + 'nections":{{"type":"Object","defaultValue":{{}}}}}},"triggers":{{"manual":{{"type":"Request","inputs":{{"' + 'schema":{{}}}},"kind":"Http"}}}}}},"integrationAccount":{{"id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6' + 'd1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integrat' + 'ion-account"}},"parameters":{{"$connections":{{"value":{{"test-custom-connector":{{"connectionId":"/subsc' + 'riptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Web/' + 'connections/test-custom-connector","connectionName":"test-custom-connector","id":"/subscriptions/34adfa4f' + '-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-connec' + 'tor"}}}}}}}}}} tags={{}} ' + '--name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /Workflows/get/Get a workflow +@try_manual +def step__workflows_get_get_a_workflow(test, rg_2, rg, rg_3): + test.cmd('az logic workflow show ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=[ + test.check("name", "{myWorkflow}", case_sensitive=False), + ]) + + +# EXAMPLE: /Workflows/get/List all workflows in a resource group +@try_manual +def step__workflows_get(test, rg_2, rg, rg_3): + test.cmd('az logic workflow list ' + '--resource-group "{rg}"', + checks=[ + test.check('length(@)', 1), + ]) + + +# EXAMPLE: /Workflows/get/List all workflows in a subscription +@try_manual +def step__workflows_get2(test, rg_2, rg, rg_3): + test.cmd('az logic workflow list ' + '-g ""', + checks=[ + test.check('length(@)', 1), + ]) + + +# EXAMPLE: /Workflows/patch/Patch a workflow +@try_manual +def step__workflows_patch_patch_a_workflow(test, rg_2, rg, rg_3): + test.cmd('az logic workflow update ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /Workflows/post/Disable a workflow +@try_manual +def step__workflows_post_disable_a_workflow(test, rg_2, rg, rg_3): + test.cmd('az logic workflow disable ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /Workflows/post/Enable a workflow +@try_manual +def step__workflows_post_enable_a_workflow(test, rg_2, rg, rg_3): + test.cmd('az logic workflow enable ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /Workflows/post/Generate an upgraded definition +@try_manual +def step__workflows_post(test, rg_2, rg, rg_3): + test.cmd('az logic workflow generate-upgraded-definition ' + '--target-schema-version "2016-06-01" ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /Workflows/post/Get callback url +@try_manual +def step__workflows_post_get_callback_url(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /Workflows/post/Get the swagger for a workflow +@try_manual +def step__workflows_post2(test, rg_2, rg, rg_3): + test.cmd('az logic workflow list-swagger ' + '--resource-group "{rg_2}" ' + '--name "{myWorkflow3}"', + checks=[]) + + +# EXAMPLE: /Workflows/post/Move a workflow +@try_manual +def step__workflows_post_move_a_workflow(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /Workflows/post/Regenerate the callback URL access key for request triggers +@try_manual +def step__workflows_post3(test, rg_2, rg, rg_3): + test.cmd('az logic workflow regenerate-access-key ' + '--key-type "Primary" ' + '--resource-group "{rg_2}" ' + '--name "{myWorkflow3}"', + checks=[]) + + +# EXAMPLE: /Workflows/post/Validate a workflow +@try_manual +def step__workflows_post_validate_a_workflow(test, rg_2, rg, rg_3): + 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\\":{{}}}}" ' + '--name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /Workflows/post/Validate a workflow +@try_manual +def step__workflows_post_validate_a_workflow(test, rg_2, rg, rg_3): + 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\\":{{}}}}" ' + '--name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowRunActionRepetitions/get/Get a repetition +@try_manual +def step__workflowrunactionrepetitions_get(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /WorkflowRunActionRepetitions/get/List repetitions +@try_manual +def step__workflowrunactionrepetitions_get2(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-run-action-repetition list ' + '--action-name "testAction" ' + '--resource-group "{rg_2}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow4}"', + checks=[]) + + +# EXAMPLE: /WorkflowRunActionRepetitions/post/List expression traces for a repetition +@try_manual +def step__workflowrunactionrepetitions_post(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /WorkflowRunActionRepetitionsRequestHistories/get/Get a repetition request history +@try_manual +def step__workflowrunactionrepetitionsrequesthistories(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /WorkflowRunActionRepetitionsRequestHistories/get/List repetition request history +@try_manual +def step__workflowrunactionrepetitionsrequesthistories2(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /WorkflowRunActionRequestHistories/get/Get a request history +@try_manual +def step__workflowrunactionrequesthistories_get(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /WorkflowRunActionRequestHistories/get/List a request history +@try_manual +def step__workflowrunactionrequesthistories_get2(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-run-action-request-history list ' + '--action-name "HTTP_Webhook" ' + '--resource-group "{rg}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowRunActions/get/Get a workflow run action +@try_manual +def step__workflowrunactions_get(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-run-action show ' + '--action-name "HTTP" ' + '--resource-group "{rg}" ' + '--run-name "08586676746934337772206998657CU22" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowRunActions/get/List a workflow run actions +@try_manual +def step__workflowrunactions_get2(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-run-action list ' + '--resource-group "{rg}" ' + '--run-name "08586676746934337772206998657CU22" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowRunActions/post/List expression traces +@try_manual +def step__workflowrunactions_post(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-run-action list-expression-trace ' + '--action-name "testAction" ' + '--resource-group "{rg_2}" ' + '--run-name "08586776228332053161046300351" ' + '--workflow-name "{myWorkflow4}"', + checks=[]) + + +# EXAMPLE: /WorkflowRunActionScopeRepetitions/get/Get a scoped repetition +@try_manual +def step__workflowrunactionscoperepetitions_get(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /WorkflowRunActionScopeRepetitions/get/List the scoped repetitions +@try_manual +def step__workflowrunactionscoperepetitions_get2(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /WorkflowRunOperations/get/Get a run operation +@try_manual +def step__workflowrunoperations_get(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /WorkflowRuns/get/Get a run for a workflow +@try_manual +def step__workflowruns_get_get_a_run_for_a_workflow(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-run show ' + '--resource-group "{rg}" ' + '--run-name "08586676746934337772206998657CU22" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowRuns/get/List workflow runs +@try_manual +def step__workflowruns_get_list_workflow_runs(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-run list ' + '--resource-group "{rg}" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowRuns/post/Cancel a workflow run +@try_manual +def step__workflowruns_post_cancel_a_workflow_run(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-run cancel ' + '--resource-group "{rg}" ' + '--run-name "08586676746934337772206998657CU22" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggerHistories/get/Get a workflow trigger history +@try_manual +def step__workflowtriggerhistories_get(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-trigger-history show ' + '--history-name "08586676746934337772206998657CU22" ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTriggerName" ' + '--workflow-name "{myWorkflow3}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggerHistories/get/List a workflow trigger history +@try_manual +def step__workflowtriggerhistories_get2(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-trigger-history list ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTriggerName" ' + '--workflow-name "{myWorkflow3}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggerHistories/post/Resubmit a workflow run based on the trigger history +@try_manual +def step__workflowtriggerhistories_post(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-trigger-history resubmit ' + '--history-name "testHistoryName" ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTriggerName" ' + '--workflow-name "{myWorkflow3}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggers/get/Get a workflow trigger +@try_manual +def step__workflowtriggers_get_get_a_workflow_trigger(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-trigger show ' + '--resource-group "{rg}" ' + '--trigger-name "manual" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggers/get/Get trigger schema +@try_manual +def step__workflowtriggers_get_get_trigger_schema(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-trigger get-schema-json ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTrigger" ' + '--workflow-name "{myWorkflow2}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggers/get/List workflow triggers +@try_manual +def step__workflowtriggers_get_list_workflow_triggers(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-trigger list ' + '--resource-group "{rg}" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggers/post/Get the callback URL for a trigger +@try_manual +def step__workflowtriggers_post(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-trigger list-callback-url ' + '--resource-group "{rg}" ' + '--trigger-name "manual" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggers/post/Reset trigger +@try_manual +def step__workflowtriggers_post_reset_trigger(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-trigger reset ' + '--resource-group "{rg_2}" ' + '--trigger-name "testTrigger" ' + '--workflow-name "{myWorkflow2}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggers/post/Run a workflow trigger +@try_manual +def step__workflowtriggers_post_run_a_workflow_trigger(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-trigger run ' + '--resource-group "{rg}" ' + '--trigger-name "manual" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowTriggers/post/Set trigger state +@try_manual +def step__workflowtriggers_post_set_trigger_state(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /WorkflowVersions/get/Get a workflow version +@try_manual +def step__workflowversions_get_get_a_workflow_version(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-version show ' + '--resource-group "{rg}" ' + '--version-id "08586676824806722526" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowVersions/get/List a workflows versions +@try_manual +def step__workflowversions_get(test, rg_2, rg, rg_3): + test.cmd('az logic workflow-version list ' + '--resource-group "{rg}" ' + '--workflow-name "{myWorkflow}"', + checks=[]) + + +# EXAMPLE: /WorkflowVersionTriggers/post/Get the callback url for a trigger of a workflow version +@try_manual +def step__workflowversiontriggers_post(test, rg_2, rg, rg_3): + 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=[]) + + +# EXAMPLE: /Workflows/delete/Delete a workflow +@try_manual +def step__workflows_delete_delete_a_workflow(test, rg_2, rg, rg_3): + test.cmd('az logic workflow delete -y ' + '--resource-group "{rg}" ' + '--name "{myWorkflow}"', + checks=[]) + + +# Env cleanup +@try_manual +def cleanup(test, rg_2, rg, rg_3): + pass + + +# Testcase +@try_manual +def call_scenario(test, rg_2, rg, rg_3): + setup(test, rg_2, rg, rg_3) + step__integrationaccounts_put(test, rg_2, rg, rg_3) + step__integrationaccounts_get(test, rg_2, rg, rg_3) + step__integrationaccounts_get2(test, rg_2, rg, rg_3) + step__integrationaccounts_get3(test, rg_2, rg, rg_3) + step__integrationaccounts_patch(test, rg_2, rg, rg_3) + step__integrationaccounts_post(test, rg_2, rg, rg_3) + step__integrationaccounts_post2(test, rg_2, rg, rg_3) + step__integrationaccounts_post_log_a_tracked_event(test, rg_2, rg, rg_3) + step__integrationaccounts_post3(test, rg_2, rg, rg_3) + step__integrationaccountagreements_put(test, rg_2, rg, rg_3) + step__integrationaccountagreements_get(test, rg_2, rg, rg_3) + step__integrationaccountagreements_get2(test, rg_2, rg, rg_3) + step__integrationaccountagreements_post(test, rg_2, rg, rg_3) + step__integrationaccountagreements_delete(test, rg_2, rg, rg_3) + step__integrationaccountassemblies_put(test, rg_2, rg, rg_3) + step__integrationaccountassemblies_get(test, rg_2, rg, rg_3) + step__integrationaccountassemblies_get2(test, rg_2, rg, rg_3) + step__integrationaccountassemblies_post(test, rg_2, rg, rg_3) + step__integrationaccountassemblies_delete(test, rg_2, rg, rg_3) + step__integrationaccountbatchconfigurations_put(test, rg_2, rg, rg_3) + step__integrationaccountbatchconfigurations_get(test, rg_2, rg, rg_3) + step__integrationaccountbatchconfigurations_get2(test, rg_2, rg, rg_3) + step__integrationaccountbatchconfigurations_delete(test, rg_2, rg, rg_3) + step__integrationaccountcertificates_put(test, rg_2, rg, rg_3) + step__integrationaccountcertificates_get(test, rg_2, rg, rg_3) + step__integrationaccountcertificates_get2(test, rg_2, rg, rg_3) + step__integrationaccountcertificates_delete(test, rg_2, rg, rg_3) + step__integrationaccountmaps_put(test, rg_2, rg, rg_3) + step__integrationaccountmaps_get_get_map_by_name(test, rg_2, rg, rg_3) + step__integrationaccountmaps_get(test, rg_2, rg, rg_3) + step__integrationaccountmaps_post(test, rg_2, rg, rg_3) + step__integrationaccountmaps_delete_delete_a_map(test, rg_2, rg, rg_3) + step__integrationaccountpartners_put(test, rg_2, rg, rg_3) + step__integrationaccountpartners_get(test, rg_2, rg, rg_3) + step__integrationaccountpartners_get2(test, rg_2, rg, rg_3) + step__integrationaccountpartners_post(test, rg_2, rg, rg_3) + step__integrationaccountpartners_delete(test, rg_2, rg, rg_3) + step__integrationaccountschemas_put(test, rg_2, rg, rg_3) + step__integrationaccountschemas_get(test, rg_2, rg, rg_3) + step__integrationaccountschemas_get2(test, rg_2, rg, rg_3) + step__integrationaccountschemas_post(test, rg_2, rg, rg_3) + step__integrationaccountschemas_delete(test, rg_2, rg, rg_3) + step__integrationaccountsessions_put(test, rg_2, rg, rg_3) + step__integrationaccountsessions_get(test, rg_2, rg, rg_3) + step__integrationaccountsessions_get2(test, rg_2, rg, rg_3) + step__integrationaccountsessions_delete(test, rg_2, rg, rg_3) + step__integrationaccounts_delete(test, rg_2, rg, rg_3) + step__integrationserviceenvironments_put(test, rg_2, rg, rg_3) + step__integrationserviceenvironments_get(test, rg_2, rg, rg_3) + step__integrationserviceenvironments_get2(test, rg_2, rg, rg_3) + step__integrationserviceenvironments_get3(test, rg_2, rg, rg_3) + step__integrationserviceenvironments_patch(test, rg_2, rg, rg_3) + step__integrationserviceenvironments_post(test, rg_2, rg, rg_3) + step__integrationserviceenvironmentmanagedapiopera(test, rg_2, rg, rg_3) + step__integrationserviceenvironmentmanagedapis_put(test, rg_2, rg, rg_3) + step__integrationserviceenvironmentmanagedapis_get(test, rg_2, rg, rg_3) + step__integrationserviceenvironmentmanagedapis_get(test, rg_2, rg, rg_3) + step__integrationserviceenvironmentmanagedapis_del(test, rg_2, rg, rg_3) + step__integrationserviceenvironmentnetworkhealth_g(test, rg_2, rg, rg_3) + step__integrationserviceenvironmentskus_get(test, rg_2, rg, rg_3) + step__integrationserviceenvironments_delete(test, rg_2, rg, rg_3) + step__workflows_put_create_or_update_a_workflow(test, rg_2, rg, rg_3) + step__workflows_get_get_a_workflow(test, rg_2, rg, rg_3) + step__workflows_get(test, rg_2, rg, rg_3) + step__workflows_get2(test, rg_2, rg, rg_3) + step__workflows_patch_patch_a_workflow(test, rg_2, rg, rg_3) + step__workflows_post_disable_a_workflow(test, rg_2, rg, rg_3) + step__workflows_post_enable_a_workflow(test, rg_2, rg, rg_3) + step__workflows_post(test, rg_2, rg, rg_3) + step__workflows_post_get_callback_url(test, rg_2, rg, rg_3) + step__workflows_post2(test, rg_2, rg, rg_3) + step__workflows_post_move_a_workflow(test, rg_2, rg, rg_3) + step__workflows_post3(test, rg_2, rg, rg_3) + step__workflows_post_validate_a_workflow(test, rg_2, rg, rg_3) + step__workflows_post_validate_a_workflow(test, rg_2, rg, rg_3) + step__workflowrunactionrepetitions_get(test, rg_2, rg, rg_3) + step__workflowrunactionrepetitions_get2(test, rg_2, rg, rg_3) + step__workflowrunactionrepetitions_post(test, rg_2, rg, rg_3) + step__workflowrunactionrepetitionsrequesthistories(test, rg_2, rg, rg_3) + step__workflowrunactionrepetitionsrequesthistories2(test, rg_2, rg, rg_3) + step__workflowrunactionrequesthistories_get(test, rg_2, rg, rg_3) + step__workflowrunactionrequesthistories_get2(test, rg_2, rg, rg_3) + step__workflowrunactions_get(test, rg_2, rg, rg_3) + step__workflowrunactions_get2(test, rg_2, rg, rg_3) + step__workflowrunactions_post(test, rg_2, rg, rg_3) + step__workflowrunactionscoperepetitions_get(test, rg_2, rg, rg_3) + step__workflowrunactionscoperepetitions_get2(test, rg_2, rg, rg_3) + step__workflowrunoperations_get(test, rg_2, rg, rg_3) + step__workflowruns_get_get_a_run_for_a_workflow(test, rg_2, rg, rg_3) + step__workflowruns_get_list_workflow_runs(test, rg_2, rg, rg_3) + step__workflowruns_post_cancel_a_workflow_run(test, rg_2, rg, rg_3) + step__workflowtriggerhistories_get(test, rg_2, rg, rg_3) + step__workflowtriggerhistories_get2(test, rg_2, rg, rg_3) + step__workflowtriggerhistories_post(test, rg_2, rg, rg_3) + step__workflowtriggers_get_get_a_workflow_trigger(test, rg_2, rg, rg_3) + step__workflowtriggers_get_get_trigger_schema(test, rg_2, rg, rg_3) + step__workflowtriggers_get_list_workflow_triggers(test, rg_2, rg, rg_3) + step__workflowtriggers_post(test, rg_2, rg, rg_3) + step__workflowtriggers_post_reset_trigger(test, rg_2, rg, rg_3) + step__workflowtriggers_post_run_a_workflow_trigger(test, rg_2, rg, rg_3) + step__workflowtriggers_post_set_trigger_state(test, rg_2, rg, rg_3) + step__workflowversions_get_get_a_workflow_version(test, rg_2, rg, rg_3) + step__workflowversions_get(test, rg_2, rg, rg_3) + step__workflowversiontriggers_post(test, rg_2, rg, rg_3) + step__workflows_delete_delete_a_workflow(test, rg_2, rg, rg_3) + cleanup(test, rg_2, rg, rg_3) + + +@try_manual +class LogicManagementClientScenarioTest(ScenarioTest): - @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): + @ResourceGroupPreparer(name_prefix='clitestlogic_testResourceGroup'[:7], key='rg_2', parameter_name='rg_2') + @ResourceGroupPreparer(name_prefix='clitestlogic_test-resource-group'[:7], key='rg', parameter_name='rg') + @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(self, rg_2, rg, rg_3): 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), + 'myWorkflow': 'test-workflow', + 'myWorkflow2': 'testWorkflow', + 'myWorkflow3': 'testWorkflowName', + 'myWorkflow4': 'testFlow', + 'myIntegrationAccount': 'testIntegrationAccount', + 'myIntegrationAccount2': '', + 'myIntegrationAccount3': 'testia123', + 'myIntegrationServiceEnvironment': 'testIntegrationServiceEnvironment', }) - 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 delete ' - '--resource-group "{rg}" ' - '--name "{testWorkflow}" ' - '-y', - checks=[]) - - self.cmd('az logic integration-account delete ' - '--name "{IntegrationAccounts_2}" ' - '--resource-group "{rg_2}" ' - '-y', - checks=[]) + call_scenario(self, rg_2, rg, rg_3) + calc_coverage(__file__) + raise_if() 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..783a9e5b274 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,11 +6,17 @@ # 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 @@ -100,10 +106,11 @@ class LogicManagementClient(object): :ivar operation: OperationOperations operations :vartype operation: logic_management_client.operations.OperationOperations :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,7 +124,7 @@ 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) 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.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py new file mode 100644 index 00000000000..4dc7376e6de --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py @@ -0,0 +1,66 @@ +# 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, 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" + +class LogicManagementClientConfiguration(Configuration): + """Configuration for LogicManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :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 + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(LogicManagementClientConfiguration, self).__init__(**kwargs) + + 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) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + 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, *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..2635f6f8c17 --- /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 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 IntegrationServiceEnvironmentNetworkHealthOperations +from .operations import IntegrationServiceEnvironmentManagedApiOperations +from .operations import IntegrationServiceEnvironmentManagedApiOperationOperations +from .operations 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.WorkflowOperations + :ivar workflow_version: WorkflowVersionOperations operations + :vartype workflow_version: logic_management_client.aio.operations.WorkflowVersionOperations + :ivar workflow_trigger: WorkflowTriggerOperations operations + :vartype workflow_trigger: logic_management_client.aio.operations.WorkflowTriggerOperations + :ivar workflow_version_trigger: WorkflowVersionTriggerOperations operations + :vartype workflow_version_trigger: logic_management_client.aio.operations.WorkflowVersionTriggerOperations + :ivar workflow_trigger_history: WorkflowTriggerHistoryOperations operations + :vartype workflow_trigger_history: logic_management_client.aio.operations.WorkflowTriggerHistoryOperations + :ivar workflow_run: WorkflowRunOperations operations + :vartype workflow_run: logic_management_client.aio.operations.WorkflowRunOperations + :ivar workflow_run_action: WorkflowRunActionOperations operations + :vartype workflow_run_action: logic_management_client.aio.operations.WorkflowRunActionOperations + :ivar workflow_run_action_repetition: WorkflowRunActionRepetitionOperations operations + :vartype workflow_run_action_repetition: logic_management_client.aio.operations.WorkflowRunActionRepetitionOperations + :ivar workflow_run_action_repetition_request_history: WorkflowRunActionRepetitionRequestHistoryOperations operations + :vartype workflow_run_action_repetition_request_history: logic_management_client.aio.operations.WorkflowRunActionRepetitionRequestHistoryOperations + :ivar workflow_run_action_request_history: WorkflowRunActionRequestHistoryOperations operations + :vartype workflow_run_action_request_history: logic_management_client.aio.operations.WorkflowRunActionRequestHistoryOperations + :ivar workflow_run_action_scope_repetition: WorkflowRunActionScopeRepetitionOperations operations + :vartype workflow_run_action_scope_repetition: logic_management_client.aio.operations.WorkflowRunActionScopeRepetitionOperations + :ivar workflow_run_operation: WorkflowRunOperationOperations operations + :vartype workflow_run_operation: logic_management_client.aio.operations.WorkflowRunOperationOperations + :ivar integration_account: IntegrationAccountOperations operations + :vartype integration_account: logic_management_client.aio.operations.IntegrationAccountOperations + :ivar integration_account_assembly: IntegrationAccountAssemblyOperations operations + :vartype integration_account_assembly: logic_management_client.aio.operations.IntegrationAccountAssemblyOperations + :ivar integration_account_batch_configuration: IntegrationAccountBatchConfigurationOperations operations + :vartype integration_account_batch_configuration: logic_management_client.aio.operations.IntegrationAccountBatchConfigurationOperations + :ivar integration_account_schema: IntegrationAccountSchemaOperations operations + :vartype integration_account_schema: logic_management_client.aio.operations.IntegrationAccountSchemaOperations + :ivar integration_account_map: IntegrationAccountMapOperations operations + :vartype integration_account_map: logic_management_client.aio.operations.IntegrationAccountMapOperations + :ivar integration_account_partner: IntegrationAccountPartnerOperations operations + :vartype integration_account_partner: logic_management_client.aio.operations.IntegrationAccountPartnerOperations + :ivar integration_account_agreement: IntegrationAccountAgreementOperations operations + :vartype integration_account_agreement: logic_management_client.aio.operations.IntegrationAccountAgreementOperations + :ivar integration_account_certificate: IntegrationAccountCertificateOperations operations + :vartype integration_account_certificate: logic_management_client.aio.operations.IntegrationAccountCertificateOperations + :ivar integration_account_session: IntegrationAccountSessionOperations operations + :vartype integration_account_session: logic_management_client.aio.operations.IntegrationAccountSessionOperations + :ivar integration_service_environment: IntegrationServiceEnvironmentOperations operations + :vartype integration_service_environment: logic_management_client.aio.operations.IntegrationServiceEnvironmentOperations + :ivar integration_service_environment_sku: IntegrationServiceEnvironmentSkuOperations operations + :vartype integration_service_environment_sku: logic_management_client.aio.operations.IntegrationServiceEnvironmentSkuOperations + :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_api: IntegrationServiceEnvironmentManagedApiOperations operations + :vartype integration_service_environment_managed_api: logic_management_client.aio.operations.IntegrationServiceEnvironmentManagedApiOperations + :ivar integration_service_environment_managed_api_operation: IntegrationServiceEnvironmentManagedApiOperationOperations operations + :vartype integration_service_environment_managed_api_operation: logic_management_client.aio.operations.IntegrationServiceEnvironmentManagedApiOperationOperations + :ivar operation: OperationOperations operations + :vartype operation: logic_management_client.aio.operations.OperationOperations + :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.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..c3673ac689e --- /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 ._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 ._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 + +__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/aio/operations/_integration_account_agreement_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreement_operations.py new file mode 100644 index 00000000000..94f560d367f --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreement_operations.py @@ -0,0 +1,403 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +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 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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.IntegrationAccountAgreementListResult"]: + """Gets a list of integration account agreements. + + :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 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. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationAccountAgreementListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + **kwargs + ) -> "models.IntegrationAccountAgreement": + """Gets an integration account agreement. + + :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 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) + :rtype: ~logic_management_client.models.IntegrationAccountAgreement + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] + 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'] # 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'), + 'agreementName': self._serialize.url("agreement_name", agreement_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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: "models.IntegrationAccountAgreement", + **kwargs + ) -> "models.IntegrationAccountAgreement": + """Creates or updates an integration account agreement. + + :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 agreement_name: The integration account agreement name. + :type agreement_name: str + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] + 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'] # 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'), + 'agreementName': self._serialize.url("agreement_name", agreement_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + **kwargs + ) -> None: + """Deletes an integration account agreement. + + :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 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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + 'agreementName': self._serialize.url("agreement_name", agreement_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + **kwargs + ) -> "models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :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 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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + 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'] # 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'), + 'agreementName': self._serialize.url("agreement_name", agreement_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + 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'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assembly_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assembly_operations.py new file mode 100644 index 00000000000..ddbf15f6edc --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assembly_operations.py @@ -0,0 +1,386 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs + ) -> AsyncIterable["models.AssemblyCollection"]: + """List the assemblies for an integration account. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AssemblyCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs + ) -> "models.AssemblyDefinition": + """Get an assembly for an integration account. + + :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 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) + :rtype: ~logic_management_client.models.AssemblyDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] + 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'] # 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'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AssemblyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + **kwargs + ) -> "models.AssemblyDefinition": + """Create or update an assembly for an integration account. + + :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 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] + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + assembly_artifact = models.AssemblyDefinition(location=location, tags=tags, properties=properties) + 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'] # 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'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AssemblyDefinition', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AssemblyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs + ) -> None: + """Delete an assembly for an integration account. + + :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 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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} # type: ignore + + async def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs + ) -> "models.WorkflowTriggerCallbackUrl": + """Get the content callback url for an integration account assembly. + + :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 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) + :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] + 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'] # 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'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + 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'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configuration_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configuration_operations.py new file mode 100644 index 00000000000..5d13e3f522f --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configuration_operations.py @@ -0,0 +1,369 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs + ) -> AsyncIterable["models.BatchConfigurationCollection"]: + """List the batch configurations for an integration account. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BatchConfigurationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + **kwargs + ) -> "models.BatchConfiguration": + """Get a batch configuration for an integration account. + + :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 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) + :rtype: ~logic_management_client.models.BatchConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] + 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'] # 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'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BatchConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + batch_group_name: str, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + created_time: Optional[datetime.datetime] = None, + changed_time: Optional[datetime.datetime] = None, + metadata: Optional[object] = None, + message_count: Optional[int] = None, + batch_size: Optional[int] = None, + frequency: Optional[Union[str, "models.RecurrenceFrequency"]] = None, + interval: Optional[int] = None, + start_time: Optional[str] = None, + end_time: Optional[str] = None, + time_zone: Optional[str] = None, + minutes: Optional[List[int]] = None, + hours: Optional[List[int]] = None, + week_days: Optional[List[Union[str, "models.DaysOfWeek"]]] = None, + month_days: Optional[List[int]] = None, + monthly_occurrences: Optional[List["models.RecurrenceScheduleOccurrence"]] = None, + **kwargs + ) -> "models.BatchConfiguration": + """Create or update a batch configuration for an integration account. + + :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 batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param batch_group_name: The name of the batch group. + :type batch_group_name: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :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 message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param frequency: The frequency. + :type frequency: str or ~logic_management_client.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :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[~logic_management_client.models.RecurrenceScheduleOccurrence] + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + batch_configuration = models.BatchConfiguration(location=location, tags=tags, created_time=created_time, changed_time=changed_time, metadata=metadata, batch_group_name=batch_group_name, message_count=message_count, batch_size=batch_size, frequency=frequency, interval=interval, start_time=start_time, end_time=end_time, time_zone=time_zone, minutes=minutes, hours=hours, week_days=week_days, month_days=month_days, monthly_occurrences=monthly_occurrences) + 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'] # 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'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BatchConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BatchConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + **kwargs + ) -> None: + """Delete a batch configuration for an integration account. + + :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 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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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/_integration_account_certificate_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificate_operations.py new file mode 100644 index 00000000000..c0a070cd44b --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificate_operations.py @@ -0,0 +1,340 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + **kwargs + ) -> AsyncIterable["models.IntegrationAccountCertificateListResult"]: + """Gets a list of integration account certificates. + + :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 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: 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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationAccountCertificateListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + **kwargs + ) -> "models.IntegrationAccountCertificate": + """Gets an integration account certificate. + + :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 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) + :rtype: ~logic_management_client.models.IntegrationAccountCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] + 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'] # 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'), + 'certificateName': self._serialize.url("certificate_name", certificate_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + public_certificate: Optional[str] = None, + key_vault: Optional["models.KeyVaultKeyReferenceKeyVault"] = None, + key_name: Optional[str] = None, + key_version: Optional[str] = None, + **kwargs + ) -> "models.IntegrationAccountCertificate": + """Creates or updates an integration account certificate. + + :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 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 public_certificate: The public certificate. + :type public_certificate: str + :param key_vault: The key vault reference. + :type key_vault: ~logic_management_client.models.KeyVaultKeyReferenceKeyVault + :param key_name: The private key name in key vault. + :type key_name: str + :param key_version: The private key version in key vault. + :type key_version: str + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + certificate = models.IntegrationAccountCertificate(location=location, tags=tags, metadata=metadata, public_certificate=public_certificate, key_vault=key_vault, key_name=key_name, key_version=key_version) + 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'] # 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'), + 'certificateName': self._serialize.url("certificate_name", certificate_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + **kwargs + ) -> None: + """Deletes an integration account certificate. + + :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 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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + 'certificateName': self._serialize.url("certificate_name", certificate_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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/_integration_account_map_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_map_operations.py new file mode 100644 index 00000000000..d3047e30898 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_map_operations.py @@ -0,0 +1,422 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +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 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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.IntegrationAccountMapListResult"]: + """Gets a list of integration account maps. + + :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 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: MapType. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationAccountMapListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + **kwargs + ) -> "models.IntegrationAccountMap": + """Gets an integration account map. + + :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 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) + :rtype: ~logic_management_client.models.IntegrationAccountMap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] + 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'] # 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'), + 'mapName': self._serialize.url("map_name", map_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + content: Optional[str] = None, + content_type_parameter: Optional[str] = None, + metadata: Optional[object] = None, + ref: Optional[str] = None, + **kwargs + ) -> "models.IntegrationAccountMap": + """Creates or updates an integration account map. + + :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 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 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 ref: The reference name. + :type ref: str + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + map = models.IntegrationAccountMap(location=location, tags=tags, map_type=map_type, content=content, content_type=content_type_parameter, metadata=metadata, ref=ref) + 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'] # 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'), + 'mapName': self._serialize.url("map_name", map_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + **kwargs + ) -> None: + """Deletes an integration account map. + + :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 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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + 'mapName': self._serialize.url("map_name", map_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + **kwargs + ) -> "models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :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 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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + 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'] # 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'), + 'mapName': self._serialize.url("map_name", map_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + 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'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_operations.py new file mode 100644 index 00000000000..4f95a8e7209 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_operations.py @@ -0,0 +1,805 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_subscription( + self, + top: Optional[int] = None, + **kwargs + ) -> 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: 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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationAccountListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + 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 + ) -> AsyncIterable["models.IntegrationAccountListResult"]: + """Gets a list of integration accounts by resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :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: 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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationAccountListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs + ) -> "models.IntegrationAccount": + """Gets an integration account. + + :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 + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + state: Optional[Union[str, "models.WorkflowState"]] = None, + sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + provisioning_state: Optional[Union[str, "models.WorkflowProvisioningState"]] = None, + integration_service_environment_id: Optional[str] = None, + endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, + network_configuration: Optional["models.NetworkConfiguration"] = None, + encryption_configuration: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] = None, + name: Optional[Union[str, "models.IntegrationAccountSkuName"]] = None, + **kwargs + ) -> "models.IntegrationAccount": + """Creates or updates an integration account. + + :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 location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param state: The workflow state. + :type state: str or ~logic_management_client.models.WorkflowState + :param sku: The sku. + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param provisioning_state: The provisioning state. + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState + :param integration_service_environment_id: Gets the tracking id. + :type integration_service_environment_id: str + :param endpoints_configuration: The endpoints configuration. + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration + :param name: The sku name. + :type name: str or ~logic_management_client.models.IntegrationAccountSkuName + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + integration_account = models.IntegrationAccount(location=location, tags=tags, state_properties_state=state, sku=sku, provisioning_state=provisioning_state, integration_service_environment_id=integration_service_environment_id, endpoints_configuration=endpoints_configuration, network_configuration=network_configuration, encryption_configuration=encryption_configuration, name_sku_name=name) + 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'] # 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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + state: Optional[Union[str, "models.WorkflowState"]] = None, + sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + provisioning_state: Optional[Union[str, "models.WorkflowProvisioningState"]] = None, + integration_service_environment_id: Optional[str] = None, + endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, + network_configuration: Optional["models.NetworkConfiguration"] = None, + encryption_configuration: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] = None, + name: Optional[Union[str, "models.IntegrationAccountSkuName"]] = None, + **kwargs + ) -> "models.IntegrationAccount": + """Updates an integration account. + + :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 location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param state: The workflow state. + :type state: str or ~logic_management_client.models.WorkflowState + :param sku: The sku. + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param provisioning_state: The provisioning state. + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState + :param integration_service_environment_id: Gets the tracking id. + :type integration_service_environment_id: str + :param endpoints_configuration: The endpoints configuration. + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration + :param name: The sku name. + :type name: str or ~logic_management_client.models.IntegrationAccountSkuName + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + integration_account = models.IntegrationAccount(location=location, tags=tags, state_properties_state=state, sku=sku, provisioning_state=provisioning_state, integration_service_environment_id=integration_service_environment_id, endpoints_configuration=endpoints_configuration, network_configuration=network_configuration, encryption_configuration=encryption_configuration, name_sku_name=name) + api_version = "2019-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct 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'), + '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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs + ) -> None: + """Deletes an integration account. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + **kwargs + ) -> "models.CallbackUrl": + """Gets the integration account callback URL. + + :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 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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + 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'] # 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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} # type: ignore + + def list_key_vault_key( + self, + resource_group_name: str, + integration_account_name: str, + skip_token: Optional[str] = None, + id: Optional[str] = None, + **kwargs + ) -> 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 skip_token: The skip token. + :type skip_token: str + :param id: The resource id. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + list_key_vault_keys = models.ListKeyVaultKeysDefinition(skip_token=skip_token, id=id) + 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'] # 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 + 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): + deserialized = self._deserialize('KeyVaultKeyCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def log_tracking_event( + self, + resource_group_name: str, + integration_account_name: str, + source_type: str, + events: List["models.TrackingEvent"], + track_events_options: Optional[Union[str, "models.TrackEventsOperationOptions"]] = None, + **kwargs + ) -> None: + """Logs the integration account's tracking events. + + :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 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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + log_tracking_events = models.TrackingEventsDefinition(source_type=source_type, track_events_options=track_events_options, events=events) + 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'] # 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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + log_tracking_event.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, + **kwargs + ) -> "models.IntegrationAccount": + """Regenerates the integration account access key. + + :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_type: The key type. + :type key_type: str or ~logic_management_client.models.KeyType + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + regenerate_access_key = models.RegenerateActionParameter(key_type=key_type) + 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'] # 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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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/_integration_account_partner_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partner_operations.py new file mode 100644 index 00000000000..2300d8f8c71 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partner_operations.py @@ -0,0 +1,416 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.IntegrationAccountPartnerListResult"]: + """Gets a list of integration account partners. + + :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 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: PartnerType. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationAccountPartnerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + **kwargs + ) -> "models.IntegrationAccountPartner": + """Gets an integration account partner. + + :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 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) + :rtype: ~logic_management_client.models.IntegrationAccountPartner + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] + 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'] # 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'), + 'partnerName': self._serialize.url("partner_name", partner_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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"], + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + metadata: Optional[object] = None, + business_identities: Optional[List["models.BusinessIdentity"]] = None, + **kwargs + ) -> "models.IntegrationAccountPartner": + """Creates or updates an integration account partner. + + :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 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 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 business_identities: The list of partner business identities. + :type business_identities: list[~logic_management_client.models.BusinessIdentity] + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + partner = models.IntegrationAccountPartner(location=location, tags=tags, partner_type=partner_type, metadata=metadata, business_identities=business_identities) + 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'] # 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'), + 'partnerName': self._serialize.url("partner_name", partner_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + **kwargs + ) -> None: + """Deletes an integration account partner. + + :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 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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + 'partnerName': self._serialize.url("partner_name", partner_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + **kwargs + ) -> "models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :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 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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + 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'] # 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'), + 'partnerName': self._serialize.url("partner_name", partner_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + 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'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schema_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schema_operations.py new file mode 100644 index 00000000000..a6e511ff5f8 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schema_operations.py @@ -0,0 +1,428 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +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 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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.IntegrationAccountSchemaListResult"]: + """Gets a list of integration account schemas. + + :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 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: SchemaType. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationAccountSchemaListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + **kwargs + ) -> "models.IntegrationAccountSchema": + """Gets an integration account schema. + + :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 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) + :rtype: ~logic_management_client.models.IntegrationAccountSchema + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] + 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'] # 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'), + 'schemaName': self._serialize.url("schema_name", schema_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + **kwargs + ) -> "models.IntegrationAccountSchema": + """Creates or updates an integration account schema. + + :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 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 + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + 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) + 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'] # 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'), + 'schemaName': self._serialize.url("schema_name", schema_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + **kwargs + ) -> None: + """Deletes an integration account schema. + + :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 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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + 'schemaName': self._serialize.url("schema_name", schema_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + **kwargs + ) -> "models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :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 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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + 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'] # 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'), + 'schemaName': self._serialize.url("schema_name", schema_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + 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'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_session_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_session_operations.py new file mode 100644 index 00000000000..9c6e67ab508 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_session_operations.py @@ -0,0 +1,333 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.IntegrationAccountSessionListResult"]: + """Gets a list of integration account sessions. + + :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 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: ChangedTime. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationAccountSessionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + integration_account_name: str, + session_name: str, + **kwargs + ) -> "models.IntegrationAccountSession": + """Gets an integration account session. + + :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 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) + :rtype: ~logic_management_client.models.IntegrationAccountSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] + 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'] # 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'), + 'sessionName': self._serialize.url("session_name", session_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + **kwargs + ) -> "models.IntegrationAccountSession": + """Creates or updates an integration account session. + + :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 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 + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + session = models.IntegrationAccountSession(location=location, tags=tags, content=content) + 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'] # 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'), + 'sessionName': self._serialize.url("session_name", session_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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + integration_account_name: str, + session_name: str, + **kwargs + ) -> None: + """Deletes an integration account session. + + :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 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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + 'sessionName': self._serialize.url("session_name", session_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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/_integration_service_environment_managed_api_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operation_operations.py new file mode 100644 index 00000000000..9fd39b26d49 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operation_operations.py @@ -0,0 +1,121 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs + ) -> AsyncIterable["models.ApiOperationListResult"]: + """Gets the managed Api operations. + + :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 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: 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 = { + 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'] # 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'), + '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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApiOperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations.py new file mode 100644 index 00000000000..c1c3898faa7 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations.py @@ -0,0 +1,424 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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 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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs + ) -> AsyncIterable["models.ManagedApiListResult"]: + """Gets the integration service environment managed Apis. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedApiListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs + ) -> "models.ManagedApi": + """Gets the integration service environment managed Api. + + :param resource_group: The resource group name. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :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) + :rtype: ~logic_management_client.models.ManagedApi + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedApi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore + + async def _put_initial( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs + ) -> "models.ManagedApi": + cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedApi', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedApi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore + + async def begin_put( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs + ) -> AsyncLROPoller["models.ManagedApi"]: + """Puts the integration service environment managed Api. + + :param resource_group: The resource group name. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :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 + :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', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] + 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) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + 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 + 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, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} # type: ignore + + async def begin_delete( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes the integration service environment managed Api. + + :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 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 + :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', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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, {}) + + 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 + 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/_integration_service_environment_network_health_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py new file mode 100644 index 00000000000..664e419ac3d --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py @@ -0,0 +1,100 @@ +# 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, Callable, Dict, Generic, Optional, TypeVar +import warnings + +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 IntegrationServiceEnvironmentNetworkHealthOperations: + """IntegrationServiceEnvironmentNetworkHealthOperations 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs + ) -> Dict[str, "models.IntegrationServiceEnvironmentSubnetNetworkHealth"]: + """Gets the integration service environment network health. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct 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, "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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('{IntegrationServiceEnvironmentSubnetNetworkHealth}', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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/_integration_service_environment_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_operations.py new file mode 100644 index 00000000000..0908ceb6eec --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_operations.py @@ -0,0 +1,701 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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 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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_subscription( + self, + top: Optional[int] = None, + **kwargs + ) -> 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: 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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationServiceEnvironmentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + 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 + ) -> AsyncIterable["models.IntegrationServiceEnvironmentListResult"]: + """Gets a list of integration service environments by resource group. + + :param resource_group: The resource group. + :type resource_group: str + :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: 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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationServiceEnvironmentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs + ) -> "models.IntegrationServiceEnvironment": + """Gets 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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + provisioning_state: Optional[Union[str, "models.WorkflowProvisioningState"]] = None, + state: Optional[Union[str, "models.WorkflowState"]] = None, + integration_service_environment_id: Optional[str] = None, + endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, + network_configuration: Optional["models.NetworkConfiguration"] = None, + encryption_configuration: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] = None, + **kwargs + ) -> "models.IntegrationServiceEnvironment": + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, sku=sku, provisioning_state=provisioning_state, state=state, integration_service_environment_id=integration_service_environment_id, endpoints_configuration=endpoints_configuration, network_configuration=network_configuration, encryption_configuration=encryption_configuration) + 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'] # 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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore + + 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, + sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + provisioning_state: Optional[Union[str, "models.WorkflowProvisioningState"]] = None, + state: Optional[Union[str, "models.WorkflowState"]] = None, + integration_service_environment_id: Optional[str] = None, + endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, + network_configuration: Optional["models.NetworkConfiguration"] = None, + encryption_configuration: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] = None, + **kwargs + ) -> 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 sku: The sku. + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param provisioning_state: The provisioning state. + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState + :param state: The integration service environment state. + :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: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration + :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 + :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', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] + 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, + location=location, + tags=tags, + sku=sku, + provisioning_state=provisioning_state, + state=state, + integration_service_environment_id=integration_service_environment_id, + endpoints_configuration=endpoints_configuration, + network_configuration=network_configuration, + encryption_configuration=encryption_configuration, + 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) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + 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 + 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, + sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + provisioning_state: Optional[Union[str, "models.WorkflowProvisioningState"]] = None, + state: Optional[Union[str, "models.WorkflowState"]] = None, + integration_service_environment_id: Optional[str] = None, + endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, + network_configuration: Optional["models.NetworkConfiguration"] = None, + encryption_configuration: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] = None, + **kwargs + ) -> "models.IntegrationServiceEnvironment": + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, sku=sku, provisioning_state=provisioning_state, state=state, integration_service_environment_id=integration_service_environment_id, endpoints_configuration=endpoints_configuration, network_configuration=network_configuration, encryption_configuration=encryption_configuration) + api_version = "2019-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct 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'), + '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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore + + async def begin_update( + self, + resource_group: str, + integration_service_environment_name: str, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, + provisioning_state: Optional[Union[str, "models.WorkflowProvisioningState"]] = None, + state: Optional[Union[str, "models.WorkflowState"]] = None, + integration_service_environment_id: Optional[str] = None, + endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, + network_configuration: Optional["models.NetworkConfiguration"] = None, + encryption_configuration: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] = None, + **kwargs + ) -> 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 sku: The sku. + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param provisioning_state: The provisioning state. + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState + :param state: The integration service environment state. + :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: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration + :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 + :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', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] + 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, + location=location, + tags=tags, + sku=sku, + provisioning_state=provisioning_state, + state=state, + integration_service_environment_id=integration_service_environment_id, + endpoints_configuration=endpoints_configuration, + network_configuration=network_configuration, + encryption_configuration=encryption_configuration, + 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) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + 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 + 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, + resource_group: str, + integration_service_environment_name: str, + **kwargs + ) -> None: + """Deletes 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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore + + async def restart( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs + ) -> None: + """Restarts 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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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/_integration_service_environment_sku_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_sku_operations.py new file mode 100644 index 00000000000..b28e33dd9f2 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_sku_operations.py @@ -0,0 +1,117 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs + ) -> AsyncIterable["models.IntegrationServiceEnvironmentSkuList"]: + """Gets a list of integration service environment Skus. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IntegrationServiceEnvironmentSkuList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operation_operations.py new file mode 100644 index 00000000000..57eff2f1d22 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operation_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> 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: 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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.Logic/operations'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_operations.py new file mode 100644 index 00000000000..ebf500dd511 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_operations.py @@ -0,0 +1,1186 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +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 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 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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_subscription( + self, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> 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. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkflowListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.WorkflowListResult"]: + """Gets a list of workflows by resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :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. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkflowListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + **kwargs + ) -> "models.Workflow": + """Gets a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :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) + :rtype: ~logic_management_client.models.Workflow + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workflow', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + definition: Optional[object] = None, + parameters: Optional[Dict[str, "models.WorkflowParameter"]] = None, + id: Optional[str] = None, + triggers: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + contents: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + actions: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + workflow_management: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + workflow: Optional["models.FlowEndpoints"] = None, + connector: Optional["models.FlowEndpoints"] = None, + **kwargs + ) -> "models.Workflow": + """Creates or updates a 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 definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param id: The resource id. + :type id: str + :param triggers: The access control configuration for invoking workflow triggers. + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param contents: The access control configuration for accessing workflow run contents. + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param actions: The access control configuration for workflow actions. + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow_management: The access control configuration for workflow management. + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow: The workflow endpoints. + :type workflow: ~logic_management_client.models.FlowEndpoints + :param connector: The connector endpoints. + :type connector: ~logic_management_client.models.FlowEndpoints + :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 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + workflow = models.Workflow(location=location, tags=tags, state=state, definition=definition, parameters=parameters, id_integration_service_environment_id=id, triggers=triggers, contents=contents, actions=actions, workflow_management=workflow_management, workflow=workflow, connector=connector) + 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'] # 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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Workflow', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Workflow', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + **kwargs + ) -> "models.Workflow": + """Updates a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :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) + :rtype: ~logic_management_client.models.Workflow + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] + 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.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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workflow', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + workflow_name: str, + **kwargs + ) -> None: + """Deletes a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore + + async def disable( + self, + resource_group_name: str, + workflow_name: str, + **kwargs + ) -> None: + """Disables a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} # type: ignore + + async def enable( + self, + resource_group_name: str, + workflow_name: str, + **kwargs + ) -> None: + """Enables a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + **kwargs + ) -> object: + """Generates the upgraded definition for a 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 target_schema_version: The target schema version. + :type target_schema_version: str + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) + 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'] # 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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + **kwargs + ) -> "models.WorkflowTriggerCallbackUrl": + """Get the workflow callback Url. + + :param resource_group_name: The resource group name. + :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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + list_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + 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'] # 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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} # type: ignore + + async def list_swagger( + self, + resource_group_name: str, + workflow_name: str, + **kwargs + ) -> object: + """Gets an OpenAPI definition for the workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :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) + :rtype: object + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[object] + 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'] # 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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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, + id: Optional[str] = None, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + move = models.WorkflowReference(id=id) + api_version = "2019-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct 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'), + '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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} # type: ignore + + async def begin_move( + self, + resource_group_name: str, + workflow_name: str, + id: Optional[str] = None, + **kwargs + ) -> 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 id: The resource id. + :type id: 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 + :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', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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, + id=id, + 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, {}) + + 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 + 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, + **kwargs + ) -> None: + """Regenerates the callback URL access key for request triggers. + + :param resource_group_name: The resource group name. + :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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + key_type = models.RegenerateActionParameter(key_type=key_type) + 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'] # 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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + definition: Optional[object] = None, + parameters: Optional[Dict[str, "models.WorkflowParameter"]] = None, + id: Optional[str] = None, + triggers: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + contents: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + actions: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + workflow_management: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + workflow: Optional["models.FlowEndpoints"] = None, + connector: Optional["models.FlowEndpoints"] = None, + **kwargs + ) -> None: + """Validates the 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 definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param id: The resource id. + :type id: str + :param triggers: The access control configuration for invoking workflow triggers. + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param contents: The access control configuration for accessing workflow run contents. + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param actions: The access control configuration for workflow actions. + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow_management: The access control configuration for workflow management. + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow: The workflow endpoints. + :type workflow: ~logic_management_client.models.FlowEndpoints + :param connector: The connector endpoints. + :type connector: ~logic_management_client.models.FlowEndpoints + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + validate = models.Workflow(location=location, tags=tags, state=state, definition=definition, parameters=parameters, id_integration_service_environment_id=id, triggers=triggers, contents=contents, actions=actions, workflow_management=workflow_management, workflow=workflow, connector=connector) + 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'] # 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') + + # 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') + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + resource_location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + state: Optional[Union[str, "models.WorkflowState"]] = None, + definition: Optional[object] = None, + parameters: Optional[Dict[str, "models.WorkflowParameter"]] = None, + id: Optional[str] = None, + triggers: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + contents: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + actions: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + workflow_management: Optional["models.FlowAccessControlConfigurationPolicy"] = None, + workflow: Optional["models.FlowEndpoints"] = None, + connector: Optional["models.FlowEndpoints"] = None, + **kwargs + ) -> None: + """Validates the workflow definition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param location: The workflow location. + :type location: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param resource_location: The resource location. + :type resource_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 definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param id: The resource id. + :type id: str + :param triggers: The access control configuration for invoking workflow triggers. + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param contents: The access control configuration for accessing workflow run contents. + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param actions: The access control configuration for workflow actions. + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow_management: The access control configuration for workflow management. + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow: The workflow endpoints. + :type workflow: ~logic_management_client.models.FlowEndpoints + :param connector: The connector endpoints. + :type connector: ~logic_management_client.models.FlowEndpoints + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + validate = models.Workflow(location=resource_location, tags=tags, state=state, definition=definition, parameters=parameters, id_integration_service_environment_id=id, triggers=triggers, contents=contents, actions=actions, workflow_management=workflow_management, workflow=workflow, connector=connector) + 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'] # 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'), + 'location': self._serialize.url("location", location, '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') + + # 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') + + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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/_workflow_run_action_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_operations.py new file mode 100644 index 00000000000..143a0353ac3 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_operations.py @@ -0,0 +1,281 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.WorkflowRunActionListResult"]: + """Gets a list of workflow run actions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :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. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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'), + '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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkflowRunActionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs + ) -> "models.WorkflowRunAction": + """Gets a workflow run action. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :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) + :rtype: ~logic_management_client.models.WorkflowRunAction + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunAction"] + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRunAction', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} # type: ignore + + def list_expression_trace( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs + ) -> AsyncIterable["models.ExpressionTraces"]: + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :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: 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 = { + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + '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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressionTraces', pipeline_response) + list_of_elem = deserialized.inputs + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetition_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetition_operations.py new file mode 100644 index 00000000000..e4dbb175e96 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetition_operations.py @@ -0,0 +1,283 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs + ) -> AsyncIterable["models.WorkflowRunActionRepetitionDefinitionCollection"]: + """Get all of a workflow run action repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :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: 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 = { + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + '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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs + ) -> "models.WorkflowRunActionRepetitionDefinition": + """Get a workflow run action repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :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) + :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) + + if cls: + 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}'} # type: ignore + + def list_expression_trace( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs + ) -> AsyncIterable["models.ExpressionTraces"]: + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :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: 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 = { + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + '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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressionTraces', pipeline_response) + list_of_elem = deserialized.inputs + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetition_request_history_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetition_request_history_operations.py new file mode 100644 index 00000000000..c380ecdf6bf --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetition_request_history_operations.py @@ -0,0 +1,204 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs + ) -> AsyncIterable["models.RequestHistoryListResult"]: + """List a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :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: 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 = { + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + '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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RequestHistoryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + request_history_name: str, + **kwargs + ) -> "models.RequestHistory": + """Gets a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :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) + :rtype: ~logic_management_client.models.RequestHistory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), + 'requestHistoryName': self._serialize.url("request_history_name", request_history_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RequestHistory', pipeline_response) + + if cls: + 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}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_history_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_history_operations.py new file mode 100644 index 00000000000..3a4a0232dd2 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_history_operations.py @@ -0,0 +1,196 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs + ) -> AsyncIterable["models.RequestHistoryListResult"]: + """List a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :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: 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 = { + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + '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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RequestHistoryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + request_history_name: str, + **kwargs + ) -> "models.RequestHistory": + """Gets a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :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) + :rtype: ~logic_management_client.models.RequestHistory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'requestHistoryName': self._serialize.url("request_history_name", request_history_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RequestHistory', pipeline_response) + + if cls: + 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}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetition_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetition_operations.py new file mode 100644 index 00000000000..68c567a7d6e --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetition_operations.py @@ -0,0 +1,196 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs + ) -> AsyncIterable["models.WorkflowRunActionRepetitionDefinitionCollection"]: + """List the workflow run action scoped repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :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: 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 = { + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + '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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs + ) -> "models.WorkflowRunActionRepetitionDefinition": + """Get a workflow run action scoped repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :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) + :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) + + if cls: + 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}'} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operation_operations.py new file mode 100644 index 00000000000..940c700ea2b --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operation_operations.py @@ -0,0 +1,108 @@ +# 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, Callable, Dict, Generic, Optional, TypeVar +import warnings + +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + operation_id: str, + **kwargs + ) -> "models.WorkflowRun": + """Gets an operation for a run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :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) + :rtype: ~logic_management_client.models.WorkflowRun + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] + 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'] # 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'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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/_workflow_run_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations.py new file mode 100644 index 00000000000..f6d3ff7332d --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations.py @@ -0,0 +1,251 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + workflow_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.WorkflowRunListResult"]: + """Gets a list of workflow runs. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkflowRunListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + **kwargs + ) -> "models.WorkflowRun": + """Gets a workflow run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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) + :rtype: ~logic_management_client.models.WorkflowRun + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} # type: ignore + + async def cancel( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + **kwargs + ) -> None: + """Cancels a workflow run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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/_workflow_trigger_history_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_history_operations.py new file mode 100644 index 00000000000..5cd260f16ad --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_history_operations.py @@ -0,0 +1,265 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.WorkflowTriggerHistoryListResult"]: + """Gets a list of workflow trigger histories. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :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. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :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 = { + 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'] # 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'), + '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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkflowTriggerHistoryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + history_name: str, + **kwargs + ) -> "models.WorkflowTriggerHistory": + """Gets a workflow trigger history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param history_name: The workflow trigger history name. Corresponds to the run name for + 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) + :rtype: ~logic_management_client.models.WorkflowTriggerHistory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerHistory"] + 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'] # 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'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + 'historyName': self._serialize.url("history_name", history_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} # type: ignore + + async def resubmit( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + history_name: str, + **kwargs + ) -> None: + """Resubmits a workflow run based on the trigger history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param history_name: The workflow trigger history name. Corresponds to the run name for + 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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + 'historyName': self._serialize.url("history_name", history_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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/_workflow_trigger_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_operations.py new file mode 100644 index 00000000000..955c6bccc8c --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_operations.py @@ -0,0 +1,506 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + workflow_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.WorkflowTriggerListResult"]: + """Gets a list of workflow triggers. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. + :type top: int + :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: 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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkflowTriggerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs + ) -> "models.WorkflowTrigger": + """Gets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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) + :rtype: ~logic_management_client.models.WorkflowTrigger + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTrigger"] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTrigger', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} # type: ignore + + async def reset( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs + ) -> None: + """Resets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} # type: ignore + + async def run( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs + ) -> None: + """Runs a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} # type: ignore + + async def get_schema_json( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs + ) -> "models.JsonSchema": + """Get the trigger schema as JSON. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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) + :rtype: ~logic_management_client.models.JsonSchema + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.JsonSchema"] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JsonSchema', pipeline_response) + + if cls: + 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'} # type: ignore + + async def set_state( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + source: "models.WorkflowTriggerReference", + **kwargs + ) -> None: + """Sets the state of a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :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.WorkflowTriggerReference + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + set_state = models.SetTriggerStateActionDefinition(source=source) + api_version = "2019-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct 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'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + '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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} # type: ignore + + async def list_callback_url( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs + ) -> "models.WorkflowTriggerCallbackUrl": + """Get the callback URL for a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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) + :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] + 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'] # 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'), + '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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 [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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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/_workflow_version_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_operations.py new file mode 100644 index 00000000000..145ebe65d5d --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_operations.py @@ -0,0 +1,185 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + workflow_name: str, + top: Optional[int] = None, + **kwargs + ) -> AsyncIterable["models.WorkflowVersionListResult"]: + """Gets a list of workflow versions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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: 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 = { + 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'] # 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 + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkflowVersionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + 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, 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'} # type: ignore + + async def get( + self, + resource_group_name: str, + workflow_name: str, + version_id: str, + **kwargs + ) -> "models.WorkflowVersion": + """Gets a workflow version. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :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) + :rtype: ~logic_management_client.models.WorkflowVersion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowVersion"] + 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'] # 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'), + 'versionId': self._serialize.url("version_id", version_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') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowVersion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + 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/_workflow_version_trigger_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_trigger_operations.py new file mode 100644 index 00000000000..60d99f19067 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_trigger_operations.py @@ -0,0 +1,125 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +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. + + 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. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~logic_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_callback_url( + self, + resource_group_name: str, + workflow_name: str, + version_id: str, + trigger_name: str, + not_after: Optional[datetime.datetime] = None, + key_type: Optional[Union[str, "models.KeyType"]] = None, + **kwargs + ) -> "models.WorkflowTriggerCallbackUrl": + """Get the callback url for a trigger of a workflow version. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param version_id: The workflow versionId. + :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 + :keyword callable cls: A custom type or function that will be passed the direct 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 = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + 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'] # 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'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + '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') + + # 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') + + body_content_kwargs = {} # type: Dict[str, Any] + 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, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + 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'} # type: ignore 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..ebf3ca685bf 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py @@ -37,11 +37,9 @@ from ._models_py3 import AssemblyDefinition from ._models_py3 import AssemblyProperties from ._models_py3 import AzureResourceErrorInfo - from ._models_py3 import B2BPartnerContent from ._models_py3 import BatchConfiguration from ._models_py3 import BatchConfigurationCollection from ._models_py3 import BatchConfigurationProperties - from ._models_py3 import BatchReleaseCriteria from ._models_py3 import BusinessIdentity from ._models_py3 import CallbackUrl from ._models_py3 import ContentHash @@ -68,6 +66,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 @@ -82,7 +82,6 @@ from ._models_py3 import IntegrationAccountMap from ._models_py3 import IntegrationAccountMapFilter from ._models_py3 import IntegrationAccountMapListResult - from ._models_py3 import IntegrationAccountMapPropertiesParametersSchema from ._models_py3 import IntegrationAccountPartner from ._models_py3 import IntegrationAccountPartnerFilter from ._models_py3 import IntegrationAccountPartnerListResult @@ -92,14 +91,14 @@ from ._models_py3 import IntegrationAccountSession 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 from ._models_py3 import IntegrationServiceEnvironmentNetworkDependency from ._models_py3 import IntegrationServiceEnvironmentNetworkDependencyHealth from ._models_py3 import IntegrationServiceEnvironmentNetworkEndpoint - from ._models_py3 import IntegrationServiceEnvironmentProperties from ._models_py3 import IntegrationServiceEnvironmentSku from ._models_py3 import IntegrationServiceEnvironmentSkuCapacity from ._models_py3 import IntegrationServiceEnvironmentSkuDefinition @@ -107,24 +106,25 @@ 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 from ._models_py3 import KeyVaultKeyCollection - from ._models_py3 import KeyVaultKeyReference from ._models_py3 import KeyVaultKeyReferenceKeyVault from ._models_py3 import KeyVaultReference from ._models_py3 import ListKeyVaultKeysDefinition 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 from ._models_py3 import OperationResult from ._models_py3 import OperationResultProperties - from ._models_py3 import PartnerContent - from ._models_py3 import RecurrenceSchedule from ._models_py3 import RecurrenceScheduleOccurrence from ._models_py3 import RegenerateActionParameter from ._models_py3 import RepetitionIndex @@ -159,6 +159,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 +179,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 @@ -227,11 +229,9 @@ from ._models import AssemblyDefinition # type: ignore from ._models import AssemblyProperties # type: ignore from ._models import AzureResourceErrorInfo # type: ignore - from ._models import B2BPartnerContent # type: ignore from ._models import BatchConfiguration # type: ignore from ._models import BatchConfigurationCollection # type: ignore from ._models import BatchConfigurationProperties # type: ignore - from ._models import BatchReleaseCriteria # type: ignore from ._models import BusinessIdentity # type: ignore from ._models import CallbackUrl # type: ignore from ._models import ContentHash # type: ignore @@ -258,6 +258,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 @@ -272,7 +274,6 @@ from ._models import IntegrationAccountMap # type: ignore from ._models import IntegrationAccountMapFilter # type: ignore from ._models import IntegrationAccountMapListResult # type: ignore - from ._models import IntegrationAccountMapPropertiesParametersSchema # type: ignore from ._models import IntegrationAccountPartner # type: ignore from ._models import IntegrationAccountPartnerFilter # type: ignore from ._models import IntegrationAccountPartnerListResult # type: ignore @@ -282,14 +283,14 @@ from ._models import IntegrationAccountSession # type: ignore 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 from ._models import IntegrationServiceEnvironmentNetworkDependency # type: ignore from ._models import IntegrationServiceEnvironmentNetworkDependencyHealth # type: ignore from ._models import IntegrationServiceEnvironmentNetworkEndpoint # type: ignore - from ._models import IntegrationServiceEnvironmentProperties # type: ignore from ._models import IntegrationServiceEnvironmentSku # type: ignore from ._models import IntegrationServiceEnvironmentSkuCapacity # type: ignore from ._models import IntegrationServiceEnvironmentSkuDefinition # type: ignore @@ -297,24 +298,25 @@ 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 from ._models import KeyVaultKeyCollection # type: ignore - from ._models import KeyVaultKeyReference # type: ignore from ._models import KeyVaultKeyReferenceKeyVault # type: ignore from ._models import KeyVaultReference # type: ignore from ._models import ListKeyVaultKeysDefinition # type: ignore 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 from ._models import OperationResult # type: ignore from ._models import OperationResultProperties # type: ignore - from ._models import PartnerContent # type: ignore - from ._models import RecurrenceSchedule # type: ignore from ._models import RecurrenceScheduleOccurrence # type: ignore from ._models import RegenerateActionParameter # type: ignore from ._models import RepetitionIndex # type: ignore @@ -349,6 +351,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 +371,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 +415,7 @@ KeyType, MapType, MessageFilterType, + OpenAuthenticationProviderType, ParameterType, PartnerType, RecurrenceFrequency, @@ -465,11 +470,9 @@ 'AssemblyDefinition', 'AssemblyProperties', 'AzureResourceErrorInfo', - 'B2BPartnerContent', 'BatchConfiguration', 'BatchConfigurationCollection', 'BatchConfigurationProperties', - 'BatchReleaseCriteria', 'BusinessIdentity', 'CallbackUrl', 'ContentHash', @@ -496,6 +499,8 @@ 'ExpressionRoot', 'ExpressionTraces', 'ExtendedErrorInfo', + 'FlowAccessControlConfiguration', + 'FlowAccessControlConfigurationPolicy', 'FlowEndpoints', 'FlowEndpointsConfiguration', 'GenerateUpgradedDefinitionParameters', @@ -510,7 +515,6 @@ 'IntegrationAccountMap', 'IntegrationAccountMapFilter', 'IntegrationAccountMapListResult', - 'IntegrationAccountMapPropertiesParametersSchema', 'IntegrationAccountPartner', 'IntegrationAccountPartnerFilter', 'IntegrationAccountPartnerListResult', @@ -520,14 +524,14 @@ 'IntegrationAccountSession', 'IntegrationAccountSessionFilter', 'IntegrationAccountSessionListResult', - 'IntegrationAccountSku', + 'IntegrationServiceEnvironmenEncryptionConfiguration', + 'IntegrationServiceEnvironmenEncryptionKeyReference', 'IntegrationServiceEnvironment', 'IntegrationServiceEnvironmentAccessEndpoint', 'IntegrationServiceEnvironmentListResult', 'IntegrationServiceEnvironmentNetworkDependency', 'IntegrationServiceEnvironmentNetworkDependencyHealth', 'IntegrationServiceEnvironmentNetworkEndpoint', - 'IntegrationServiceEnvironmentProperties', 'IntegrationServiceEnvironmentSku', 'IntegrationServiceEnvironmentSkuCapacity', 'IntegrationServiceEnvironmentSkuDefinition', @@ -535,24 +539,25 @@ 'IntegrationServiceEnvironmentSkuList', 'IntegrationServiceEnvironmentSubnetNetworkHealth', 'IpAddress', + 'IpAddressRange', 'JsonSchema', 'KeyVaultKey', 'KeyVaultKeyAttributes', 'KeyVaultKeyCollection', - 'KeyVaultKeyReference', 'KeyVaultKeyReferenceKeyVault', 'KeyVaultReference', 'ListKeyVaultKeysDefinition', 'ManagedApi', 'ManagedApiListResult', 'NetworkConfiguration', + 'OpenAuthenticationAccessPolicies', + 'OpenAuthenticationAccessPolicy', + 'OpenAuthenticationPolicyClaim', 'Operation', 'OperationDisplay', 'OperationListResult', 'OperationResult', 'OperationResultProperties', - 'PartnerContent', - 'RecurrenceSchedule', 'RecurrenceScheduleOccurrence', 'RegenerateActionParameter', 'RepetitionIndex', @@ -587,6 +592,7 @@ 'WorkflowListResult', 'WorkflowOutputParameter', 'WorkflowParameter', + 'WorkflowReference', 'WorkflowRun', 'WorkflowRunAction', 'WorkflowRunActionFilter', @@ -606,6 +612,7 @@ 'WorkflowTriggerListCallbackUrlQueries', 'WorkflowTriggerListResult', 'WorkflowTriggerRecurrence', + 'WorkflowTriggerReference', 'WorkflowVersion', 'WorkflowVersionListResult', 'WsdlService', @@ -647,6 +654,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..80d479529b9 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 = { @@ -1368,25 +1369,6 @@ def __init__( self.details = kwargs.get('details', None) -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] - """ - - _attribute_map = { - 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, - } - - def __init__( - self, - **kwargs - ): - super(B2BPartnerContent, self).__init__(**kwargs) - self.business_identities = kwargs.get('business_identities', None) - - class BatchConfiguration(Resource): """The batch configuration resource definition. @@ -1404,15 +1386,46 @@ class BatchConfiguration(Resource): :type location: str :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 + :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 message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", + "Hour", "Day", "Week", "Month", "Year". + :type frequency: str or ~logic_management_client.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :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[~logic_management_client.models.RecurrenceScheduleOccurrence] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'properties': {'required': True}, + 'batch_group_name': {'required': True}, } _attribute_map = { @@ -1421,7 +1434,22 @@ class BatchConfiguration(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'properties.batchGroupName', 'type': 'str'}, + 'message_count': {'key': 'properties.releaseCriteria.messageCount', 'type': 'int'}, + 'batch_size': {'key': 'properties.releaseCriteria.batchSize', 'type': 'int'}, + 'frequency': {'key': 'properties.releaseCriteria.recurrence.frequency', 'type': 'str'}, + 'interval': {'key': 'properties.releaseCriteria.recurrence.interval', 'type': 'int'}, + 'start_time': {'key': 'properties.releaseCriteria.recurrence.startTime', 'type': 'str'}, + 'end_time': {'key': 'properties.releaseCriteria.recurrence.endTime', 'type': 'str'}, + 'time_zone': {'key': 'properties.releaseCriteria.recurrence.timeZone', 'type': 'str'}, + 'minutes': {'key': 'properties.releaseCriteria.recurrence.schedule.minutes', 'type': '[int]'}, + 'hours': {'key': 'properties.releaseCriteria.recurrence.schedule.hours', 'type': '[int]'}, + 'week_days': {'key': 'properties.releaseCriteria.recurrence.schedule.weekDays', 'type': '[str]'}, + 'month_days': {'key': 'properties.releaseCriteria.recurrence.schedule.monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'properties.releaseCriteria.recurrence.schedule.monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, } def __init__( @@ -1429,14 +1457,29 @@ def __init__( **kwargs ): super(BatchConfiguration, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.created_time = kwargs.get('created_time', None) + self.changed_time = kwargs.get('changed_time', None) + self.metadata = kwargs.get('metadata', None) + self.batch_group_name = kwargs['batch_group_name'] + self.message_count = kwargs.get('message_count', None) + self.batch_size = kwargs.get('batch_size', None) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.time_zone = kwargs.get('time_zone', None) + self.minutes = kwargs.get('minutes', None) + self.hours = kwargs.get('hours', None) + self.week_days = kwargs.get('week_days', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) 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,29 +1499,62 @@ 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 + :param message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", + "Hour", "Day", "Week", "Month", "Year". + :type frequency: str or ~logic_management_client.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :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[~logic_management_client.models.RecurrenceScheduleOccurrence] """ _validation = { 'batch_group_name': {'required': True}, - 'release_criteria': {'required': True}, } _attribute_map = { - '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'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, + 'message_count': {'key': 'releaseCriteria.messageCount', 'type': 'int'}, + 'batch_size': {'key': 'releaseCriteria.batchSize', 'type': 'int'}, + 'frequency': {'key': 'releaseCriteria.recurrence.frequency', 'type': 'str'}, + 'interval': {'key': 'releaseCriteria.recurrence.interval', 'type': 'int'}, + 'start_time': {'key': 'releaseCriteria.recurrence.startTime', 'type': 'str'}, + 'end_time': {'key': 'releaseCriteria.recurrence.endTime', 'type': 'str'}, + 'time_zone': {'key': 'releaseCriteria.recurrence.timeZone', 'type': 'str'}, + 'minutes': {'key': 'releaseCriteria.recurrence.schedule.minutes', 'type': '[int]'}, + 'hours': {'key': 'releaseCriteria.recurrence.schedule.hours', 'type': '[int]'}, + 'week_days': {'key': 'releaseCriteria.recurrence.schedule.weekDays', 'type': '[str]'}, + 'month_days': {'key': 'releaseCriteria.recurrence.schedule.monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'releaseCriteria.recurrence.schedule.monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, } def __init__( @@ -1487,36 +1563,18 @@ 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): - """The batch release criteria. - - :param message_count: The message count. - :type message_count: int - :param batch_size: The batch size in bytes. - :type batch_size: int - :param recurrence: The recurrence. - :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence - """ - - _attribute_map = { - 'message_count': {'key': 'messageCount', 'type': 'int'}, - 'batch_size': {'key': 'batchSize', 'type': 'int'}, - 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, - } - - def __init__( - self, - **kwargs - ): - super(BatchReleaseCriteria, self).__init__(**kwargs) self.message_count = kwargs.get('message_count', None) self.batch_size = kwargs.get('batch_size', None) - self.recurrence = kwargs.get('recurrence', None) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.time_zone = kwargs.get('time_zone', None) + self.minutes = kwargs.get('minutes', None) + self.hours = kwargs.get('hours', None) + self.week_days = kwargs.get('week_days', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) class BusinessIdentity(msrest.serialization.Model): @@ -1601,7 +1659,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 +1791,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 +1836,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 +2204,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 +2264,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 +2314,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 +2397,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 +2533,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 +2607,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 +2680,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 +2703,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 +2734,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 +2761,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 +2783,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 +2819,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 +2850,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 +2874,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 +2897,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 +2941,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 = { @@ -2913,19 +2973,52 @@ class IntegrationAccount(Resource): :type location: str :param tags: A set of tags. The resource tags. :type tags: dict[str, str] + :param state_properties_state: The workflow state. Possible values include: "NotSpecified", + "Completed", "Enabled", "Disabled", "Deleted", "Suspended". + :type state_properties_state: str or ~logic_management_client.models.WorkflowState + :ivar id_integration_service_environment_id: The resource id. + :vartype id_integration_service_environment_id: str + :ivar name_integration_service_environment_name: Gets the resource name. + :vartype name_integration_service_environment_name: str + :ivar type_integration_service_environment_type: Gets the resource type. + :vartype type_integration_service_environment_type: str + :param location_integration_service_environment_location: The resource location. + :type location_integration_service_environment_location: str + :param tags_integration_service_environment_tags: The resource tags. + :type tags_integration_service_environment_tags: dict[str, str] :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.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 sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :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 ~logic_management_client.models.WorkflowProvisioningState + :param state_integration_service_environment_properties_state: The integration service + environment state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", + "Deleted", "Suspended". + :type state_integration_service_environment_properties_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: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration + :param name_sku_name: The sku name. Possible values include: "NotSpecified", "Free", "Basic", + "Standard". + :type name_sku_name: str or ~logic_management_client.models.IntegrationAccountSkuName """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'id_integration_service_environment_id': {'readonly': True}, + 'name_integration_service_environment_name': {'readonly': True}, + 'type_integration_service_environment_type': {'readonly': True}, } _attribute_map = { @@ -2934,9 +3027,20 @@ class IntegrationAccount(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, - 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'IntegrationServiceEnvironment'}, - 'state': {'key': 'properties.state', 'type': 'str'}, + 'state_properties_state': {'key': 'properties.state', 'type': 'str'}, + 'id_integration_service_environment_id': {'key': 'integrationServiceEnvironment.id', 'type': 'str'}, + 'name_integration_service_environment_name': {'key': 'integrationServiceEnvironment.name', 'type': 'str'}, + 'type_integration_service_environment_type': {'key': 'integrationServiceEnvironment.type', 'type': 'str'}, + 'location_integration_service_environment_location': {'key': 'integrationServiceEnvironment.location', 'type': 'str'}, + 'tags_integration_service_environment_tags': {'key': 'integrationServiceEnvironment.tags', 'type': '{str}'}, + 'sku': {'key': 'integrationServiceEnvironment.sku', 'type': 'IntegrationServiceEnvironmentSku'}, + 'provisioning_state': {'key': 'integrationServiceEnvironment.properties.provisioningState', 'type': 'str'}, + 'state_integration_service_environment_properties_state': {'key': 'integrationServiceEnvironment.properties.state', 'type': 'str'}, + 'integration_service_environment_id': {'key': 'integrationServiceEnvironment.properties.integrationServiceEnvironmentId', 'type': 'str'}, + 'endpoints_configuration': {'key': 'integrationServiceEnvironment.properties.endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, + 'network_configuration': {'key': 'integrationServiceEnvironment.properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'encryption_configuration': {'key': 'integrationServiceEnvironment.properties.encryptionConfiguration', 'type': 'IntegrationServiceEnvironmenEncryptionConfiguration'}, + 'name_sku_name': {'key': 'sku.name', 'type': 'str'}, } def __init__( @@ -2944,9 +3048,20 @@ def __init__( **kwargs ): super(IntegrationAccount, self).__init__(**kwargs) + self.state_properties_state = kwargs.get('state_properties_state', None) + self.id_integration_service_environment_id = None + self.name_integration_service_environment_name = None + self.type_integration_service_environment_type = None + self.location_integration_service_environment_location = kwargs.get('location_integration_service_environment_location', None) + self.tags_integration_service_environment_tags = kwargs.get('tags_integration_service_environment_tags', None) self.sku = kwargs.get('sku', None) - self.integration_service_environment = kwargs.get('integration_service_environment', None) - self.state = kwargs.get('state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.state_integration_service_environment_properties_state = kwargs.get('state_integration_service_environment_properties_state', None) + 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) + self.name_sku_name = kwargs.get('name_sku_name', None) class IntegrationAccountAgreement(Resource): @@ -2974,7 +3089,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 +3097,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 +3158,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 +3181,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 """ @@ -3106,10 +3221,14 @@ class IntegrationAccountCertificate(Resource): :vartype changed_time: ~datetime.datetime :param metadata: The metadata. :type metadata: object - :param key: The key details in the key vault. - :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference :param public_certificate: The public certificate. :type public_certificate: str + :param key_vault: The key vault reference. + :type key_vault: ~logic_management_client.models.KeyVaultKeyReferenceKeyVault + :param key_name: The private key name in key vault. + :type key_name: str + :param key_version: The private key version in key vault. + :type key_version: str """ _validation = { @@ -3129,8 +3248,10 @@ class IntegrationAccountCertificate(Resource): 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'key': {'key': 'properties.key', 'type': 'KeyVaultKeyReference'}, 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, + 'key_vault': {'key': 'key.keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, + 'key_name': {'key': 'key.keyName', 'type': 'str'}, + 'key_version': {'key': 'key.keyVersion', 'type': 'str'}, } def __init__( @@ -3141,15 +3262,17 @@ def __init__( self.created_time = None self.changed_time = None self.metadata = kwargs.get('metadata', None) - self.key = kwargs.get('key', None) self.public_certificate = kwargs.get('public_certificate', None) + 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 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 +3295,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 +3333,7 @@ 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 - :param parameters_schema: The parameters schema of integration account map. - :type parameters_schema: - ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema + :type map_type: str or ~logic_management_client.models.MapType :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. @@ -3223,9 +3343,11 @@ 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 + :param ref: The reference name. + :type ref: str """ _validation = { @@ -3245,13 +3367,13 @@ class IntegrationAccountMap(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'map_type': {'key': 'properties.mapType', 'type': 'str'}, - 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'IntegrationAccountMapPropertiesParametersSchema'}, 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, 'content': {'key': 'properties.content', 'type': 'str'}, 'content_type': {'key': 'properties.contentType', 'type': 'str'}, 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'ref': {'key': 'parametersSchema.ref', 'type': 'str'}, } def __init__( @@ -3260,13 +3382,13 @@ def __init__( ): super(IntegrationAccountMap, self).__init__(**kwargs) self.map_type = kwargs['map_type'] - self.parameters_schema = kwargs.get('parameters_schema', None) self.created_time = None self.changed_time = None self.content = kwargs.get('content', None) self.content_type = kwargs.get('content_type', None) self.content_link = None self.metadata = kwargs.get('metadata', None) + self.ref = kwargs.get('ref', None) class IntegrationAccountMapFilter(msrest.serialization.Model): @@ -3276,7 +3398,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 +3421,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 """ @@ -3318,25 +3440,6 @@ def __init__( self.next_link = kwargs.get('next_link', None) -class IntegrationAccountMapPropertiesParametersSchema(msrest.serialization.Model): - """The parameters schema of integration account map. - - :param ref: The reference name. - :type ref: str - """ - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) - self.ref = kwargs.get('ref', None) - - class IntegrationAccountPartner(Resource): """The integration account partner. @@ -3356,15 +3459,15 @@ 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. :vartype changed_time: ~datetime.datetime :param metadata: The metadata. :type metadata: object - :param content: Required. The partner content. - :type content: ~azure.mgmt.logic.models.PartnerContent + :param business_identities: The list of partner business identities. + :type business_identities: list[~logic_management_client.models.BusinessIdentity] """ _validation = { @@ -3374,7 +3477,6 @@ class IntegrationAccountPartner(Resource): 'partner_type': {'required': True}, 'created_time': {'readonly': True}, 'changed_time': {'readonly': True}, - 'content': {'required': True}, } _attribute_map = { @@ -3387,7 +3489,7 @@ class IntegrationAccountPartner(Resource): 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, + 'business_identities': {'key': 'content.b2b.businessIdentities', 'type': '[BusinessIdentity]'}, } def __init__( @@ -3399,7 +3501,7 @@ def __init__( self.created_time = None self.changed_time = None self.metadata = kwargs.get('metadata', None) - self.content = kwargs['content'] + self.business_identities = kwargs.get('business_identities', None) class IntegrationAccountPartnerFilter(msrest.serialization.Model): @@ -3409,7 +3511,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 +3534,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 +3571,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 +3589,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 +3644,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 +3667,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 +3767,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 """ @@ -3684,30 +3786,51 @@ def __init__( self.next_link = kwargs.get('next_link', None) -class IntegrationAccountSku(msrest.serialization.Model): - """The integration account sku. - - All required parameters must be populated in order to send to Azure. +class IntegrationServiceEnvironmenEncryptionConfiguration(msrest.serialization.Model): + """The encryption configuration for the integration service environment. - :param name: Required. The sku name. Possible values include: "NotSpecified", "Free", "Basic", - "Standard". - :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + :param encryption_key_reference: The encryption key reference. + :type encryption_key_reference: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionKeyReference """ - _validation = { - 'name': {'required': True}, + _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 = { - 'name': {'key': 'name', 'type': 'str'}, + 'key_vault': {'key': 'keyVault', 'type': 'ResourceReference'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, } def __init__( self, **kwargs ): - super(IntegrationAccountSku, self).__init__(**kwargs) - self.name = kwargs['name'] + 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): @@ -3725,10 +3848,25 @@ class IntegrationServiceEnvironment(Resource): :type location: str :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 :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :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 ~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 ~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: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration """ _validation = { @@ -3743,8 +3881,13 @@ class IntegrationServiceEnvironment(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'IntegrationServiceEnvironmentProperties'}, 'sku': {'key': 'sku', 'type': 'IntegrationServiceEnvironmentSku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'integration_service_environment_id': {'key': 'properties.integrationServiceEnvironmentId', 'type': 'str'}, + 'endpoints_configuration': {'key': 'properties.endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'encryption_configuration': {'key': 'properties.encryptionConfiguration', 'type': 'IntegrationServiceEnvironmenEncryptionConfiguration'}, } def __init__( @@ -3752,8 +3895,13 @@ def __init__( **kwargs ): super(IntegrationServiceEnvironment, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) self.sku = kwargs.get('sku', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.state = kwargs.get('state', None) + 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 IntegrationServiceEnvironmentAccessEndpoint(msrest.serialization.Model): @@ -3761,7 +3909,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 +3929,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 +3956,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 +3984,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 +4011,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. @@ -3884,50 +4034,11 @@ def __init__( self.ports = kwargs.get('ports', None) -class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): - """The integration service environment properties. - - :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 - :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 - :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 - :param network_configuration: The network configuration. - :type network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration - """ - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'integration_service_environment_id': {'key': 'integrationServiceEnvironmentId', 'type': 'str'}, - 'endpoints_configuration': {'key': 'endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, - 'network_configuration': {'key': 'networkConfiguration', 'type': 'NetworkConfiguration'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.state = kwargs.get('state', None) - 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) - - 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 +4067,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 +4095,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 +4120,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 +4143,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 +4169,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 +4266,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 +4314,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 """ @@ -4221,40 +4333,6 @@ def __init__( self.skip_token = kwargs.get('skip_token', None) -class KeyVaultKeyReference(msrest.serialization.Model): - """The reference to the key vault key. - - 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 - :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. - :type key_version: str - """ - - _validation = { - 'key_vault': {'required': True}, - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'key_version': {'key': 'keyVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_vault = kwargs['key_vault'] - self.key_name = kwargs['key_name'] - self.key_version = kwargs.get('key_version', None) - - class KeyVaultKeyReferenceKeyVault(msrest.serialization.Model): """The key vault reference. @@ -4296,20 +4374,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,27 +4396,33 @@ def __init__( **kwargs ): super(KeyVaultReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) class ListKeyVaultKeysDefinition(msrest.serialization.Model): """The list key vault keys definition. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference :param skip_token: The skip token. :type skip_token: str + :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 """ _validation = { - 'key_vault': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, 'skip_token': {'key': 'skipToken', 'type': 'str'}, + 'id': {'key': 'keyVault.id', 'type': 'str'}, + 'name': {'key': 'keyVault.name', 'type': 'str'}, + 'type': {'key': 'keyVault.type', 'type': 'str'}, } def __init__( @@ -4345,8 +4430,10 @@ def __init__( **kwargs ): super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) - self.key_vault = kwargs['key_vault'] self.skip_token = kwargs.get('skip_token', None) + self.id = kwargs.get('id', None) + self.name = None + self.type = None class ManagedApi(Resource): @@ -4365,7 +4452,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 +4482,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 +4507,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 +4533,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 +4553,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 +4568,6 @@ class OpenAuthenticationAccessPolicy(msrest.serialization.Model): 'claims': {'key': 'claims', 'type': '[OpenAuthenticationPolicyClaim]'}, } - type = "AAD" - def __init__( self, **kwargs @@ -4522,7 +4608,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 +4666,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 +4693,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 +4736,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 +4750,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 """ @@ -4718,66 +4804,12 @@ def __init__( self.iteration_count = kwargs.get('iteration_count', None) -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 - """ - - _attribute_map = { - 'b2_b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, - } - - def __init__( - self, - **kwargs - ): - super(PartnerContent, self).__init__(**kwargs) - self.b2_b = kwargs.get('b2_b', None) - - -class RecurrenceSchedule(msrest.serialization.Model): - """The recurrence schedule. - - :param minutes: The minutes. - :type minutes: list[int] - :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] - :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] - """ - - _attribute_map = { - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'hours': {'key': 'hours', 'type': '[int]'}, - 'week_days': {'key': 'weekDays', 'type': '[str]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, - } - - def __init__( - self, - **kwargs - ): - super(RecurrenceSchedule, self).__init__(**kwargs) - self.minutes = kwargs.get('minutes', None) - self.hours = kwargs.get('hours', None) - self.week_days = kwargs.get('week_days', None) - self.month_days = kwargs.get('month_days', None) - self.monthly_occurrences = kwargs.get('monthly_occurrences', None) - - class RecurrenceScheduleOccurrence(msrest.serialization.Model): """The recurrence schedule occurrence. :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 +4832,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 +4919,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 +4949,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 +4976,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 +5007,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 +5040,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 +5119,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 +5145,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 +5209,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 +5242,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 +5292,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 +5337,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 +5455,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 +5471,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 +5591,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 +5600,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 +5665,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 +5710,48 @@ 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 - :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :vartype sku: ~logic_management_client.models.Sku :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] + :param id_integration_service_environment_id: The resource id. + :type id_integration_service_environment_id: str + :ivar name_integration_service_environment_name: Gets the resource name. + :vartype name_integration_service_environment_name: str + :ivar type_integration_service_environment_type: Gets the resource type. + :vartype type_integration_service_environment_type: str + :param id_integration_account_id: The resource id. + :type id_integration_account_id: str + :ivar name_integration_account_name: Gets the resource name. + :vartype name_integration_account_name: str + :ivar type_integration_account_type: Gets the resource type. + :vartype type_integration_account_type: str + :param triggers: The access control configuration for invoking workflow triggers. + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param contents: The access control configuration for accessing workflow run contents. + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param actions: The access control configuration for workflow actions. + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow_management: The access control configuration for workflow management. + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow: The workflow endpoints. + :type workflow: ~logic_management_client.models.FlowEndpoints + :param connector: The connector endpoints. + :type connector: ~logic_management_client.models.FlowEndpoints """ _validation = { @@ -5716,6 +5764,10 @@ class Workflow(Resource): 'version': {'readonly': True}, 'access_endpoint': {'readonly': True}, 'sku': {'readonly': True}, + 'name_integration_service_environment_name': {'readonly': True}, + 'type_integration_service_environment_type': {'readonly': True}, + 'name_integration_account_name': {'readonly': True}, + 'type_integration_account_type': {'readonly': True}, } _attribute_map = { @@ -5730,13 +5782,21 @@ class Workflow(Resource): 'state': {'key': 'properties.state', 'type': 'str'}, 'version': {'key': 'properties.version', 'type': 'str'}, 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, - 'endpoints_configuration': {'key': 'properties.endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, - 'access_control': {'key': 'properties.accessControl', 'type': 'FlowAccessControlConfiguration'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, - 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'ResourceReference'}, 'definition': {'key': 'properties.definition', 'type': 'object'}, 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + 'id_integration_service_environment_id': {'key': 'integrationServiceEnvironment.id', 'type': 'str'}, + 'name_integration_service_environment_name': {'key': 'integrationServiceEnvironment.name', 'type': 'str'}, + 'type_integration_service_environment_type': {'key': 'integrationServiceEnvironment.type', 'type': 'str'}, + 'id_integration_account_id': {'key': 'integrationAccount.id', 'type': 'str'}, + 'name_integration_account_name': {'key': 'integrationAccount.name', 'type': 'str'}, + 'type_integration_account_type': {'key': 'integrationAccount.type', 'type': 'str'}, + 'triggers': {'key': 'accessControl.triggers', 'type': 'FlowAccessControlConfigurationPolicy'}, + 'contents': {'key': 'accessControl.contents', 'type': 'FlowAccessControlConfigurationPolicy'}, + 'actions': {'key': 'accessControl.actions', 'type': 'FlowAccessControlConfigurationPolicy'}, + 'workflow_management': {'key': 'accessControl.workflowManagement', 'type': 'FlowAccessControlConfigurationPolicy'}, + 'workflow': {'key': 'endpointsConfiguration.workflow', 'type': 'FlowEndpoints'}, + 'connector': {'key': 'endpointsConfiguration.connector', 'type': 'FlowEndpoints'}, } def __init__( @@ -5750,13 +5810,21 @@ def __init__( self.state = kwargs.get('state', None) self.version = None self.access_endpoint = None - self.endpoints_configuration = kwargs.get('endpoints_configuration', None) - self.access_control = kwargs.get('access_control', None) self.sku = None - self.integration_account = kwargs.get('integration_account', None) - self.integration_service_environment = kwargs.get('integration_service_environment', None) self.definition = kwargs.get('definition', None) self.parameters = kwargs.get('parameters', None) + self.id_integration_service_environment_id = kwargs.get('id_integration_service_environment_id', None) + self.name_integration_service_environment_name = None + self.type_integration_service_environment_type = None + self.id_integration_account_id = kwargs.get('id_integration_account_id', None) + self.name_integration_account_name = None + self.type_integration_account_type = None + self.triggers = kwargs.get('triggers', None) + self.contents = kwargs.get('contents', None) + self.actions = kwargs.get('actions', None) + self.workflow_management = kwargs.get('workflow_management', None) + self.workflow = kwargs.get('workflow', None) + self.connector = kwargs.get('connector', None) class WorkflowFilter(msrest.serialization.Model): @@ -5764,7 +5832,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 +5851,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 +5875,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 +5909,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 +5947,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 +5969,6 @@ def __init__( **kwargs ): super(WorkflowReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) class WorkflowRun(SubResource): @@ -5923,7 +5991,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 +5999,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 +6084,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 +6092,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 +6161,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 +6180,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 +6219,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 +6233,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 +6311,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 +6338,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 +6352,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 +6408,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 +6427,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 +6456,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 +6470,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 +6552,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 +6640,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 +6677,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 +6712,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 +6720,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 +6793,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 +6812,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 +6870,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 +6894,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. @@ -6834,8 +6903,16 @@ class WorkflowTriggerRecurrence(msrest.serialization.Model): :type end_time: str :param time_zone: The time zone. :type time_zone: str - :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :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[~logic_management_client.models.RecurrenceScheduleOccurrence] """ _attribute_map = { @@ -6844,7 +6921,11 @@ class WorkflowTriggerRecurrence(msrest.serialization.Model): 'start_time': {'key': 'startTime', 'type': 'str'}, 'end_time': {'key': 'endTime', 'type': 'str'}, 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, + 'minutes': {'key': 'schedule.minutes', 'type': '[int]'}, + 'hours': {'key': 'schedule.hours', 'type': '[int]'}, + 'week_days': {'key': 'schedule.weekDays', 'type': '[str]'}, + 'month_days': {'key': 'schedule.monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'schedule.monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, } def __init__( @@ -6857,7 +6938,11 @@ def __init__( self.start_time = kwargs.get('start_time', None) self.end_time = kwargs.get('end_time', None) self.time_zone = kwargs.get('time_zone', None) - self.schedule = kwargs.get('schedule', None) + self.minutes = kwargs.get('minutes', None) + self.hours = kwargs.get('hours', None) + self.week_days = kwargs.get('week_days', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) class WorkflowTriggerReference(ResourceReference): @@ -6867,10 +6952,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 +6963,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 +6980,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 +7003,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 +7084,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 +7234,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 +7275,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 +7348,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 +7455,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 +7564,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 +7611,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 +7661,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 +7750,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 +7919,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 +7990,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..5894ce8440a 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 = { @@ -1562,27 +1565,6 @@ def __init__( self.details = details -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] - """ - - _attribute_map = { - 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, - } - - def __init__( - self, - *, - business_identities: Optional[List["BusinessIdentity"]] = None, - **kwargs - ): - super(B2BPartnerContent, self).__init__(**kwargs) - self.business_identities = business_identities - - class BatchConfiguration(Resource): """The batch configuration resource definition. @@ -1600,15 +1582,46 @@ class BatchConfiguration(Resource): :type location: str :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 + :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 message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", + "Hour", "Day", "Week", "Month", "Year". + :type frequency: str or ~logic_management_client.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :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[~logic_management_client.models.RecurrenceScheduleOccurrence] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'properties': {'required': True}, + 'batch_group_name': {'required': True}, } _attribute_map = { @@ -1617,26 +1630,71 @@ class BatchConfiguration(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'properties.batchGroupName', 'type': 'str'}, + 'message_count': {'key': 'properties.releaseCriteria.messageCount', 'type': 'int'}, + 'batch_size': {'key': 'properties.releaseCriteria.batchSize', 'type': 'int'}, + 'frequency': {'key': 'properties.releaseCriteria.recurrence.frequency', 'type': 'str'}, + 'interval': {'key': 'properties.releaseCriteria.recurrence.interval', 'type': 'int'}, + 'start_time': {'key': 'properties.releaseCriteria.recurrence.startTime', 'type': 'str'}, + 'end_time': {'key': 'properties.releaseCriteria.recurrence.endTime', 'type': 'str'}, + 'time_zone': {'key': 'properties.releaseCriteria.recurrence.timeZone', 'type': 'str'}, + 'minutes': {'key': 'properties.releaseCriteria.recurrence.schedule.minutes', 'type': '[int]'}, + 'hours': {'key': 'properties.releaseCriteria.recurrence.schedule.hours', 'type': '[int]'}, + 'week_days': {'key': 'properties.releaseCriteria.recurrence.schedule.weekDays', 'type': '[str]'}, + 'month_days': {'key': 'properties.releaseCriteria.recurrence.schedule.monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'properties.releaseCriteria.recurrence.schedule.monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, } def __init__( self, *, - properties: "BatchConfigurationProperties", + batch_group_name: str, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, + created_time: Optional[datetime.datetime] = None, + changed_time: Optional[datetime.datetime] = None, + metadata: Optional[object] = None, + message_count: Optional[int] = None, + batch_size: Optional[int] = None, + frequency: Optional[Union[str, "RecurrenceFrequency"]] = None, + interval: Optional[int] = None, + start_time: Optional[str] = None, + end_time: Optional[str] = None, + time_zone: Optional[str] = None, + minutes: Optional[List[int]] = None, + hours: Optional[List[int]] = None, + week_days: Optional[List[Union[str, "DaysOfWeek"]]] = None, + month_days: Optional[List[int]] = None, + monthly_occurrences: Optional[List["RecurrenceScheduleOccurrence"]] = None, **kwargs ): super(BatchConfiguration, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties + self.created_time = created_time + self.changed_time = changed_time + self.metadata = metadata + self.batch_group_name = batch_group_name + self.message_count = message_count + self.batch_size = batch_size + self.frequency = frequency + self.interval = interval + self.start_time = start_time + self.end_time = end_time + self.time_zone = time_zone + self.minutes = minutes + self.hours = hours + self.week_days = week_days + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences 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,77 +1716,99 @@ 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 + :param message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", + "Hour", "Day", "Week", "Month", "Year". + :type frequency: str or ~logic_management_client.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :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[~logic_management_client.models.RecurrenceScheduleOccurrence] """ _validation = { 'batch_group_name': {'required': True}, - 'release_criteria': {'required': True}, } _attribute_map = { - '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'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, + 'message_count': {'key': 'releaseCriteria.messageCount', 'type': 'int'}, + 'batch_size': {'key': 'releaseCriteria.batchSize', 'type': 'int'}, + 'frequency': {'key': 'releaseCriteria.recurrence.frequency', 'type': 'str'}, + 'interval': {'key': 'releaseCriteria.recurrence.interval', 'type': 'int'}, + 'start_time': {'key': 'releaseCriteria.recurrence.startTime', 'type': 'str'}, + 'end_time': {'key': 'releaseCriteria.recurrence.endTime', 'type': 'str'}, + 'time_zone': {'key': 'releaseCriteria.recurrence.timeZone', 'type': 'str'}, + 'minutes': {'key': 'releaseCriteria.recurrence.schedule.minutes', 'type': '[int]'}, + 'hours': {'key': 'releaseCriteria.recurrence.schedule.hours', 'type': '[int]'}, + 'week_days': {'key': 'releaseCriteria.recurrence.schedule.weekDays', 'type': '[str]'}, + 'month_days': {'key': 'releaseCriteria.recurrence.schedule.monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'releaseCriteria.recurrence.schedule.monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, } def __init__( self, *, batch_group_name: str, - release_criteria: "BatchReleaseCriteria", - metadata: Optional[object] = None, created_time: Optional[datetime.datetime] = None, changed_time: Optional[datetime.datetime] = None, - **kwargs - ): - super(BatchConfigurationProperties, self).__init__(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): - """The batch release criteria. - - :param message_count: The message count. - :type message_count: int - :param batch_size: The batch size in bytes. - :type batch_size: int - :param recurrence: The recurrence. - :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence - """ - - _attribute_map = { - 'message_count': {'key': 'messageCount', 'type': 'int'}, - 'batch_size': {'key': 'batchSize', 'type': 'int'}, - 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, - } - - def __init__( - self, - *, + metadata: Optional[object] = None, message_count: Optional[int] = None, batch_size: Optional[int] = None, - recurrence: Optional["WorkflowTriggerRecurrence"] = None, + frequency: Optional[Union[str, "RecurrenceFrequency"]] = None, + interval: Optional[int] = None, + start_time: Optional[str] = None, + end_time: Optional[str] = None, + time_zone: Optional[str] = None, + minutes: Optional[List[int]] = None, + hours: Optional[List[int]] = None, + week_days: Optional[List[Union[str, "DaysOfWeek"]]] = None, + month_days: Optional[List[int]] = None, + monthly_occurrences: Optional[List["RecurrenceScheduleOccurrence"]] = None, **kwargs ): - super(BatchReleaseCriteria, self).__init__(**kwargs) + super(BatchConfigurationProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) + self.batch_group_name = batch_group_name self.message_count = message_count self.batch_size = batch_size - self.recurrence = recurrence + self.frequency = frequency + self.interval = interval + self.start_time = start_time + self.end_time = end_time + self.time_zone = time_zone + self.minutes = minutes + self.hours = hours + self.week_days = week_days + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences class BusinessIdentity(msrest.serialization.Model): @@ -1821,7 +1901,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 +2053,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 +2101,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 +2540,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 +2612,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 +2666,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 +2759,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 +2915,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 +2997,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 +3084,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 +3109,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 +3145,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 +3178,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 +3202,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 +3243,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 +3279,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 +3306,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 +3332,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 +3381,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 = { @@ -3334,19 +3416,52 @@ class IntegrationAccount(Resource): :type location: str :param tags: A set of tags. The resource tags. :type tags: dict[str, str] + :param state_properties_state: The workflow state. Possible values include: "NotSpecified", + "Completed", "Enabled", "Disabled", "Deleted", "Suspended". + :type state_properties_state: str or ~logic_management_client.models.WorkflowState + :ivar id_integration_service_environment_id: The resource id. + :vartype id_integration_service_environment_id: str + :ivar name_integration_service_environment_name: Gets the resource name. + :vartype name_integration_service_environment_name: str + :ivar type_integration_service_environment_type: Gets the resource type. + :vartype type_integration_service_environment_type: str + :param location_integration_service_environment_location: The resource location. + :type location_integration_service_environment_location: str + :param tags_integration_service_environment_tags: The resource tags. + :type tags_integration_service_environment_tags: dict[str, str] :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.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 sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :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 ~logic_management_client.models.WorkflowProvisioningState + :param state_integration_service_environment_properties_state: The integration service + environment state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", + "Deleted", "Suspended". + :type state_integration_service_environment_properties_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: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration + :param name_sku_name: The sku name. Possible values include: "NotSpecified", "Free", "Basic", + "Standard". + :type name_sku_name: str or ~logic_management_client.models.IntegrationAccountSkuName """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'id_integration_service_environment_id': {'readonly': True}, + 'name_integration_service_environment_name': {'readonly': True}, + 'type_integration_service_environment_type': {'readonly': True}, } _attribute_map = { @@ -3355,9 +3470,20 @@ class IntegrationAccount(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, - 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'IntegrationServiceEnvironment'}, - 'state': {'key': 'properties.state', 'type': 'str'}, + 'state_properties_state': {'key': 'properties.state', 'type': 'str'}, + 'id_integration_service_environment_id': {'key': 'integrationServiceEnvironment.id', 'type': 'str'}, + 'name_integration_service_environment_name': {'key': 'integrationServiceEnvironment.name', 'type': 'str'}, + 'type_integration_service_environment_type': {'key': 'integrationServiceEnvironment.type', 'type': 'str'}, + 'location_integration_service_environment_location': {'key': 'integrationServiceEnvironment.location', 'type': 'str'}, + 'tags_integration_service_environment_tags': {'key': 'integrationServiceEnvironment.tags', 'type': '{str}'}, + 'sku': {'key': 'integrationServiceEnvironment.sku', 'type': 'IntegrationServiceEnvironmentSku'}, + 'provisioning_state': {'key': 'integrationServiceEnvironment.properties.provisioningState', 'type': 'str'}, + 'state_integration_service_environment_properties_state': {'key': 'integrationServiceEnvironment.properties.state', 'type': 'str'}, + 'integration_service_environment_id': {'key': 'integrationServiceEnvironment.properties.integrationServiceEnvironmentId', 'type': 'str'}, + 'endpoints_configuration': {'key': 'integrationServiceEnvironment.properties.endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, + 'network_configuration': {'key': 'integrationServiceEnvironment.properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'encryption_configuration': {'key': 'integrationServiceEnvironment.properties.encryptionConfiguration', 'type': 'IntegrationServiceEnvironmenEncryptionConfiguration'}, + 'name_sku_name': {'key': 'sku.name', 'type': 'str'}, } def __init__( @@ -3365,15 +3491,34 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - sku: Optional["IntegrationAccountSku"] = None, - integration_service_environment: Optional["IntegrationServiceEnvironment"] = None, - state: Optional[Union[str, "WorkflowState"]] = None, + state_properties_state: Optional[Union[str, "WorkflowState"]] = None, + location_integration_service_environment_location: Optional[str] = None, + tags_integration_service_environment_tags: Optional[Dict[str, str]] = None, + sku: Optional["IntegrationServiceEnvironmentSku"] = None, + provisioning_state: Optional[Union[str, "WorkflowProvisioningState"]] = None, + state_integration_service_environment_properties_state: Optional[Union[str, "WorkflowState"]] = None, + integration_service_environment_id: Optional[str] = None, + endpoints_configuration: Optional["FlowEndpointsConfiguration"] = None, + network_configuration: Optional["NetworkConfiguration"] = None, + encryption_configuration: Optional["IntegrationServiceEnvironmenEncryptionConfiguration"] = None, + name_sku_name: Optional[Union[str, "IntegrationAccountSkuName"]] = None, **kwargs ): super(IntegrationAccount, self).__init__(location=location, tags=tags, **kwargs) + self.state_properties_state = state_properties_state + self.id_integration_service_environment_id = None + self.name_integration_service_environment_name = None + self.type_integration_service_environment_type = None + self.location_integration_service_environment_location = location_integration_service_environment_location + self.tags_integration_service_environment_tags = tags_integration_service_environment_tags self.sku = sku - self.integration_service_environment = integration_service_environment - self.state = state + self.provisioning_state = provisioning_state + self.state_integration_service_environment_properties_state = state_integration_service_environment_properties_state + self.integration_service_environment_id = integration_service_environment_id + self.endpoints_configuration = endpoints_configuration + self.network_configuration = network_configuration + self.encryption_configuration = encryption_configuration + self.name_sku_name = name_sku_name class IntegrationAccountAgreement(Resource): @@ -3401,7 +3546,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 +3554,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 +3625,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 +3650,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 """ @@ -3548,10 +3693,14 @@ class IntegrationAccountCertificate(Resource): :vartype changed_time: ~datetime.datetime :param metadata: The metadata. :type metadata: object - :param key: The key details in the key vault. - :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference :param public_certificate: The public certificate. :type public_certificate: str + :param key_vault: The key vault reference. + :type key_vault: ~logic_management_client.models.KeyVaultKeyReferenceKeyVault + :param key_name: The private key name in key vault. + :type key_name: str + :param key_version: The private key version in key vault. + :type key_version: str """ _validation = { @@ -3571,8 +3720,10 @@ class IntegrationAccountCertificate(Resource): 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'key': {'key': 'properties.key', 'type': 'KeyVaultKeyReference'}, 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, + 'key_vault': {'key': 'key.keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, + 'key_name': {'key': 'key.keyName', 'type': 'str'}, + 'key_version': {'key': 'key.keyVersion', 'type': 'str'}, } def __init__( @@ -3581,23 +3732,27 @@ def __init__( location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, metadata: Optional[object] = None, - key: Optional["KeyVaultKeyReference"] = None, public_certificate: Optional[str] = None, + key_vault: Optional["KeyVaultKeyReferenceKeyVault"] = None, + key_name: Optional[str] = None, + key_version: Optional[str] = None, **kwargs ): super(IntegrationAccountCertificate, self).__init__(location=location, tags=tags, **kwargs) self.created_time = None self.changed_time = None self.metadata = metadata - self.key = key self.public_certificate = public_certificate + self.key_vault = key_vault + self.key_name = key_name + self.key_version = key_version 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 +3778,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 +3819,7 @@ 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 - :param parameters_schema: The parameters schema of integration account map. - :type parameters_schema: - ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema + :type map_type: str or ~logic_management_client.models.MapType :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. @@ -3677,9 +3829,11 @@ 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 + :param ref: The reference name. + :type ref: str """ _validation = { @@ -3699,13 +3853,13 @@ class IntegrationAccountMap(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'map_type': {'key': 'properties.mapType', 'type': 'str'}, - 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'IntegrationAccountMapPropertiesParametersSchema'}, 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, 'content': {'key': 'properties.content', 'type': 'str'}, 'content_type': {'key': 'properties.contentType', 'type': 'str'}, 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'ref': {'key': 'parametersSchema.ref', 'type': 'str'}, } def __init__( @@ -3714,21 +3868,21 @@ def __init__( map_type: Union[str, "MapType"], location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - parameters_schema: Optional["IntegrationAccountMapPropertiesParametersSchema"] = None, content: Optional[str] = None, content_type: Optional[str] = None, metadata: Optional[object] = None, + ref: Optional[str] = None, **kwargs ): super(IntegrationAccountMap, self).__init__(location=location, tags=tags, **kwargs) self.map_type = map_type - self.parameters_schema = parameters_schema self.created_time = None self.changed_time = None self.content = content self.content_type = content_type self.content_link = None self.metadata = metadata + self.ref = ref class IntegrationAccountMapFilter(msrest.serialization.Model): @@ -3738,7 +3892,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 +3917,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 """ @@ -3785,27 +3939,6 @@ def __init__( self.next_link = next_link -class IntegrationAccountMapPropertiesParametersSchema(msrest.serialization.Model): - """The parameters schema of integration account map. - - :param ref: The reference name. - :type ref: str - """ - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - } - - def __init__( - self, - *, - ref: Optional[str] = None, - **kwargs - ): - super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) - self.ref = ref - - class IntegrationAccountPartner(Resource): """The integration account partner. @@ -3825,15 +3958,15 @@ 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. :vartype changed_time: ~datetime.datetime :param metadata: The metadata. :type metadata: object - :param content: Required. The partner content. - :type content: ~azure.mgmt.logic.models.PartnerContent + :param business_identities: The list of partner business identities. + :type business_identities: list[~logic_management_client.models.BusinessIdentity] """ _validation = { @@ -3843,7 +3976,6 @@ class IntegrationAccountPartner(Resource): 'partner_type': {'required': True}, 'created_time': {'readonly': True}, 'changed_time': {'readonly': True}, - 'content': {'required': True}, } _attribute_map = { @@ -3856,17 +3988,17 @@ class IntegrationAccountPartner(Resource): 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, + 'business_identities': {'key': 'content.b2b.businessIdentities', 'type': '[BusinessIdentity]'}, } def __init__( self, *, partner_type: Union[str, "PartnerType"], - content: "PartnerContent", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, metadata: Optional[object] = None, + business_identities: Optional[List["BusinessIdentity"]] = None, **kwargs ): super(IntegrationAccountPartner, self).__init__(location=location, tags=tags, **kwargs) @@ -3874,7 +4006,7 @@ def __init__( self.created_time = None self.changed_time = None self.metadata = metadata - self.content = content + self.business_identities = business_identities class IntegrationAccountPartnerFilter(msrest.serialization.Model): @@ -3884,7 +4016,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 +4041,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 +4081,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 +4099,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 +4164,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 +4189,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 +4298,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 """ @@ -4188,32 +4320,57 @@ def __init__( self.next_link = next_link -class IntegrationAccountSku(msrest.serialization.Model): - """The integration account sku. +class IntegrationServiceEnvironmenEncryptionConfiguration(msrest.serialization.Model): + """The encryption configuration for the integration service environment. - All required parameters must be populated in order to send to Azure. - - :param name: Required. The sku name. Possible values include: "NotSpecified", "Free", "Basic", - "Standard". - :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + :param encryption_key_reference: The encryption key reference. + :type encryption_key_reference: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionKeyReference """ - _validation = { - 'name': {'required': True}, + _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 = { - 'name': {'key': 'name', 'type': 'str'}, + 'key_vault': {'key': 'keyVault', 'type': 'ResourceReference'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, } def __init__( self, *, - name: Union[str, "IntegrationAccountSkuName"], + key_vault: Optional["ResourceReference"] = None, + key_name: Optional[str] = None, + key_version: Optional[str] = None, **kwargs ): - super(IntegrationAccountSku, self).__init__(**kwargs) - self.name = name + super(IntegrationServiceEnvironmenEncryptionKeyReference, self).__init__(**kwargs) + self.key_vault = key_vault + self.key_name = key_name + self.key_version = key_version class IntegrationServiceEnvironment(Resource): @@ -4231,10 +4388,25 @@ class IntegrationServiceEnvironment(Resource): :type location: str :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 :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :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 ~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 ~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: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: + ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration """ _validation = { @@ -4249,8 +4421,13 @@ class IntegrationServiceEnvironment(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'IntegrationServiceEnvironmentProperties'}, 'sku': {'key': 'sku', 'type': 'IntegrationServiceEnvironmentSku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'integration_service_environment_id': {'key': 'properties.integrationServiceEnvironmentId', 'type': 'str'}, + 'endpoints_configuration': {'key': 'properties.endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'encryption_configuration': {'key': 'properties.encryptionConfiguration', 'type': 'IntegrationServiceEnvironmenEncryptionConfiguration'}, } def __init__( @@ -4258,13 +4435,23 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - properties: Optional["IntegrationServiceEnvironmentProperties"] = None, sku: Optional["IntegrationServiceEnvironmentSku"] = None, + provisioning_state: Optional[Union[str, "WorkflowProvisioningState"]] = None, + state: Optional[Union[str, "WorkflowState"]] = None, + integration_service_environment_id: Optional[str] = None, + endpoints_configuration: Optional["FlowEndpointsConfiguration"] = None, + network_configuration: Optional["NetworkConfiguration"] = None, + encryption_configuration: Optional["IntegrationServiceEnvironmenEncryptionConfiguration"] = None, **kwargs ): super(IntegrationServiceEnvironment, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties self.sku = sku + self.provisioning_state = provisioning_state + self.state = state + 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 IntegrationServiceEnvironmentAccessEndpoint(msrest.serialization.Model): @@ -4272,7 +4459,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 +4481,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 +4511,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 +4543,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 +4573,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. @@ -4411,56 +4600,11 @@ def __init__( self.ports = ports -class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): - """The integration service environment properties. - - :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 - :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 - :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 - :param network_configuration: The network configuration. - :type network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration - """ - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'integration_service_environment_id': {'key': 'integrationServiceEnvironmentId', 'type': 'str'}, - 'endpoints_configuration': {'key': 'endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, - 'network_configuration': {'key': 'networkConfiguration', 'type': 'NetworkConfiguration'}, - } - - def __init__( - self, - *, - provisioning_state: Optional[Union[str, "WorkflowProvisioningState"]] = None, - state: Optional[Union[str, "WorkflowState"]] = None, - integration_service_environment_id: Optional[str] = None, - endpoints_configuration: Optional["FlowEndpointsConfiguration"] = None, - network_configuration: Optional["NetworkConfiguration"] = None, - **kwargs - ): - super(IntegrationServiceEnvironmentProperties, self).__init__(**kwargs) - self.provisioning_state = provisioning_state - self.state = state - self.integration_service_environment_id = integration_service_environment_id - self.endpoints_configuration = endpoints_configuration - self.network_configuration = network_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 +4636,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 +4669,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 +4698,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 +4724,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 +4753,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 +4861,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 +4916,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 """ @@ -4793,44 +4938,6 @@ def __init__( self.skip_token = skip_token -class KeyVaultKeyReference(msrest.serialization.Model): - """The reference to the key vault key. - - 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 - :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. - :type key_version: str - """ - - _validation = { - 'key_vault': {'required': True}, - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'key_version': {'key': 'keyVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - key_vault: "KeyVaultKeyReferenceKeyVault", - key_name: str, - key_version: Optional[str] = None, - **kwargs - ): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_vault = key_vault - self.key_name = key_name - self.key_version = key_version - - class KeyVaultKeyReferenceKeyVault(msrest.serialization.Model): """The key vault reference. @@ -4874,63 +4981,71 @@ 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): """The list key vault keys definition. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference :param skip_token: The skip token. :type skip_token: str + :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 """ _validation = { - 'key_vault': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, 'skip_token': {'key': 'skipToken', 'type': 'str'}, + 'id': {'key': 'keyVault.id', 'type': 'str'}, + 'name': {'key': 'keyVault.name', 'type': 'str'}, + 'type': {'key': 'keyVault.type', 'type': 'str'}, } def __init__( self, *, - key_vault: "KeyVaultReference", skip_token: Optional[str] = None, + id: Optional[str] = None, **kwargs ): super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) - self.key_vault = key_vault self.skip_token = skip_token + self.id = id + self.name = None + self.type = None class ManagedApi(Resource): @@ -4949,7 +5064,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 +5098,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 +5126,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 +5156,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 +5178,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 +5193,6 @@ class OpenAuthenticationAccessPolicy(msrest.serialization.Model): 'claims': {'key': 'claims', 'type': '[OpenAuthenticationPolicyClaim]'}, } - type = "AAD" - def __init__( self, *, @@ -5124,7 +5238,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 +5306,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 +5336,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 +5386,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 +5400,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 """ @@ -5349,74 +5463,12 @@ def __init__( self.iteration_count = iteration_count -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 - """ - - _attribute_map = { - 'b2_b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, - } - - def __init__( - self, - *, - b2_b: Optional["B2BPartnerContent"] = None, - **kwargs - ): - super(PartnerContent, self).__init__(**kwargs) - self.b2_b = b2_b - - -class RecurrenceSchedule(msrest.serialization.Model): - """The recurrence schedule. - - :param minutes: The minutes. - :type minutes: list[int] - :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] - :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] - """ - - _attribute_map = { - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'hours': {'key': 'hours', 'type': '[int]'}, - 'week_days': {'key': 'weekDays', 'type': '[str]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, - } - - def __init__( - self, - *, - minutes: Optional[List[int]] = None, - hours: Optional[List[int]] = None, - week_days: Optional[List[Union[str, "DaysOfWeek"]]] = None, - month_days: Optional[List[int]] = None, - monthly_occurrences: Optional[List["RecurrenceScheduleOccurrence"]] = None, - **kwargs - ): - super(RecurrenceSchedule, self).__init__(**kwargs) - self.minutes = minutes - self.hours = hours - self.week_days = week_days - self.month_days = month_days - self.monthly_occurrences = monthly_occurrences - - class RecurrenceScheduleOccurrence(msrest.serialization.Model): """The recurrence schedule occurrence. :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 +5494,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 +5590,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 +5624,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 +5654,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 +5690,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 +5727,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 +5820,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 +5848,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 +5915,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 +5955,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 +6013,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 +6062,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 +6201,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 +6217,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 +6365,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 +6374,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 +6448,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 +6497,48 @@ 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 - :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :vartype sku: ~logic_management_client.models.Sku :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] + :param id_integration_service_environment_id: The resource id. + :type id_integration_service_environment_id: str + :ivar name_integration_service_environment_name: Gets the resource name. + :vartype name_integration_service_environment_name: str + :ivar type_integration_service_environment_type: Gets the resource type. + :vartype type_integration_service_environment_type: str + :param id_integration_account_id: The resource id. + :type id_integration_account_id: str + :ivar name_integration_account_name: Gets the resource name. + :vartype name_integration_account_name: str + :ivar type_integration_account_type: Gets the resource type. + :vartype type_integration_account_type: str + :param triggers: The access control configuration for invoking workflow triggers. + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param contents: The access control configuration for accessing workflow run contents. + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param actions: The access control configuration for workflow actions. + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow_management: The access control configuration for workflow management. + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow: The workflow endpoints. + :type workflow: ~logic_management_client.models.FlowEndpoints + :param connector: The connector endpoints. + :type connector: ~logic_management_client.models.FlowEndpoints """ _validation = { @@ -6483,6 +6551,10 @@ class Workflow(Resource): 'version': {'readonly': True}, 'access_endpoint': {'readonly': True}, 'sku': {'readonly': True}, + 'name_integration_service_environment_name': {'readonly': True}, + 'type_integration_service_environment_type': {'readonly': True}, + 'name_integration_account_name': {'readonly': True}, + 'type_integration_account_type': {'readonly': True}, } _attribute_map = { @@ -6497,13 +6569,21 @@ class Workflow(Resource): 'state': {'key': 'properties.state', 'type': 'str'}, 'version': {'key': 'properties.version', 'type': 'str'}, 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, - 'endpoints_configuration': {'key': 'properties.endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, - 'access_control': {'key': 'properties.accessControl', 'type': 'FlowAccessControlConfiguration'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, - 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'ResourceReference'}, 'definition': {'key': 'properties.definition', 'type': 'object'}, 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + 'id_integration_service_environment_id': {'key': 'integrationServiceEnvironment.id', 'type': 'str'}, + 'name_integration_service_environment_name': {'key': 'integrationServiceEnvironment.name', 'type': 'str'}, + 'type_integration_service_environment_type': {'key': 'integrationServiceEnvironment.type', 'type': 'str'}, + 'id_integration_account_id': {'key': 'integrationAccount.id', 'type': 'str'}, + 'name_integration_account_name': {'key': 'integrationAccount.name', 'type': 'str'}, + 'type_integration_account_type': {'key': 'integrationAccount.type', 'type': 'str'}, + 'triggers': {'key': 'accessControl.triggers', 'type': 'FlowAccessControlConfigurationPolicy'}, + 'contents': {'key': 'accessControl.contents', 'type': 'FlowAccessControlConfigurationPolicy'}, + 'actions': {'key': 'accessControl.actions', 'type': 'FlowAccessControlConfigurationPolicy'}, + 'workflow_management': {'key': 'accessControl.workflowManagement', 'type': 'FlowAccessControlConfigurationPolicy'}, + 'workflow': {'key': 'endpointsConfiguration.workflow', 'type': 'FlowEndpoints'}, + 'connector': {'key': 'endpointsConfiguration.connector', 'type': 'FlowEndpoints'}, } def __init__( @@ -6512,12 +6592,16 @@ def __init__( location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, state: Optional[Union[str, "WorkflowState"]] = None, - endpoints_configuration: Optional["FlowEndpointsConfiguration"] = None, - access_control: Optional["FlowAccessControlConfiguration"] = None, - integration_account: Optional["ResourceReference"] = None, - integration_service_environment: Optional["ResourceReference"] = None, definition: Optional[object] = None, parameters: Optional[Dict[str, "WorkflowParameter"]] = None, + id_integration_service_environment_id: Optional[str] = None, + id_integration_account_id: Optional[str] = None, + triggers: Optional["FlowAccessControlConfigurationPolicy"] = None, + contents: Optional["FlowAccessControlConfigurationPolicy"] = None, + actions: Optional["FlowAccessControlConfigurationPolicy"] = None, + workflow_management: Optional["FlowAccessControlConfigurationPolicy"] = None, + workflow: Optional["FlowEndpoints"] = None, + connector: Optional["FlowEndpoints"] = None, **kwargs ): super(Workflow, self).__init__(location=location, tags=tags, **kwargs) @@ -6527,13 +6611,21 @@ def __init__( self.state = state self.version = None self.access_endpoint = None - self.endpoints_configuration = endpoints_configuration - self.access_control = access_control self.sku = None - self.integration_account = integration_account - self.integration_service_environment = integration_service_environment self.definition = definition self.parameters = parameters + self.id_integration_service_environment_id = id_integration_service_environment_id + self.name_integration_service_environment_name = None + self.type_integration_service_environment_type = None + self.id_integration_account_id = id_integration_account_id + self.name_integration_account_name = None + self.type_integration_account_type = None + self.triggers = triggers + self.contents = contents + self.actions = actions + self.workflow_management = workflow_management + self.workflow = workflow + self.connector = connector class WorkflowFilter(msrest.serialization.Model): @@ -6541,7 +6633,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 +6654,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 +6681,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 +6720,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 +6763,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 +6809,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 +6817,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 +6904,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 +6912,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 +6984,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 +7005,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 +7047,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 +7061,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 +7151,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 +7181,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 +7195,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 +7261,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 +7282,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 +7314,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 +7328,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 +7412,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 +7500,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 +7540,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 +7577,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 +7585,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 +7660,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 +7681,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 +7748,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 +7775,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. @@ -7692,8 +7784,16 @@ class WorkflowTriggerRecurrence(msrest.serialization.Model): :type end_time: str :param time_zone: The time zone. :type time_zone: str - :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :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[~logic_management_client.models.RecurrenceScheduleOccurrence] """ _attribute_map = { @@ -7702,7 +7802,11 @@ class WorkflowTriggerRecurrence(msrest.serialization.Model): 'start_time': {'key': 'startTime', 'type': 'str'}, 'end_time': {'key': 'endTime', 'type': 'str'}, 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, + 'minutes': {'key': 'schedule.minutes', 'type': '[int]'}, + 'hours': {'key': 'schedule.hours', 'type': '[int]'}, + 'week_days': {'key': 'schedule.weekDays', 'type': '[str]'}, + 'month_days': {'key': 'schedule.monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'schedule.monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, } def __init__( @@ -7713,7 +7817,11 @@ def __init__( start_time: Optional[str] = None, end_time: Optional[str] = None, time_zone: Optional[str] = None, - schedule: Optional["RecurrenceSchedule"] = None, + minutes: Optional[List[int]] = None, + hours: Optional[List[int]] = None, + week_days: Optional[List[Union[str, "DaysOfWeek"]]] = None, + month_days: Optional[List[int]] = None, + monthly_occurrences: Optional[List["RecurrenceScheduleOccurrence"]] = None, **kwargs ): super(WorkflowTriggerRecurrence, self).__init__(**kwargs) @@ -7722,7 +7830,11 @@ def __init__( self.start_time = start_time self.end_time = end_time self.time_zone = time_zone - self.schedule = schedule + self.minutes = minutes + self.hours = hours + self.week_days = week_days + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences class WorkflowTriggerReference(ResourceReference): @@ -7732,10 +7844,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 +7855,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 +7871,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 +7899,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 +7989,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 +8161,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 +8205,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 +8288,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 +8406,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 +8540,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 +8595,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 +8649,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 +8749,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 +8941,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 +9020,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/_integration_account_agreement_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreement_operations.py index 38198c748a4..8e596a11225 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_agreement_operations.py @@ -6,18 +6,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationAccountAgreementOperations(object): """IntegrationAccountAgreementOperations operations. @@ -49,7 +54,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 +64,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 +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/integrationAccounts/{integrationAccountName}/agreements'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} # type: ignore def get( self, @@ -141,16 +150,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 +178,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 +187,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 +214,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 +247,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 +268,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 +290,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 +318,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,12 +327,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}/agreements/{agreementName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} # type: ignore def list_content_callback_url( self, @@ -368,19 +357,23 @@ def list_content_callback_url( :param key_type: The key type. :type key_type: str or ~logic_management_client.models.KeyType :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', {})) - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) 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 +389,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_assembly_operations.py index c33801e9f97..3d377cb9531 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_assembly_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationAccountAssemblyOperations(object): """IntegrationAccountAssemblyOperations operations. @@ -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,15 +175,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('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, @@ -199,19 +211,23 @@ def create_or_update( :param tags: The resource tags. :type tags: dict[str, str] :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _assembly_artifact = models.AssemblyDefinition(location=location, tags=tags, properties=properties) + assembly_artifact = models.AssemblyDefinition(location=location, tags=tags, properties=properties) 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 +243,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 +264,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 +286,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 +314,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 +323,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 +347,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 +375,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 +384,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_configuration_operations.py index acde6505e62..1d42bcd3337 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_configuration_operations.py @@ -5,18 +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 +import datetime +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, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationAccountBatchConfigurationOperations(object): """IntegrationAccountBatchConfigurationOperations operations. @@ -46,7 +52,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 +60,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 +113,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 +139,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 +167,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 +176,39 @@ 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" + batch_group_name, # type: str location=None, # type: Optional[str] tags=None, # type: Optional[Dict[str, str]] + created_time=None, # type: Optional[datetime.datetime] + changed_time=None, # type: Optional[datetime.datetime] + metadata=None, # type: Optional[object] + message_count=None, # type: Optional[int] + batch_size=None, # type: Optional[int] + frequency=None, # type: Optional[Union[str, "models.RecurrenceFrequency"]] + interval=None, # type: Optional[int] + start_time=None, # type: Optional[str] + end_time=None, # type: Optional[str] + time_zone=None, # type: Optional[str] + minutes=None, # type: Optional[List[int]] + hours=None, # type: Optional[List[int]] + week_days=None, # type: Optional[List[Union[str, "models.DaysOfWeek"]]] + month_days=None, # type: Optional[List[int]] + monthly_occurrences=None, # type: Optional[List["models.RecurrenceScheduleOccurrence"]] **kwargs # type: Any ): # type: (...) -> "models.BatchConfiguration" @@ -192,26 +220,60 @@ 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 batch_group_name: The name of the batch group. + :type batch_group_name: str :param location: The resource location. :type location: str :param tags: The resource tags. :type tags: dict[str, str] + :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 message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param frequency: The frequency. + :type frequency: str or ~logic_management_client.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :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[~logic_management_client.models.RecurrenceScheduleOccurrence] :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _batch_configuration = models.BatchConfiguration(location=location, tags=tags, properties=properties) + batch_configuration = models.BatchConfiguration(location=location, tags=tags, created_time=created_time, changed_time=changed_time, metadata=metadata, batch_group_name=batch_group_name, message_count=message_count, batch_size=batch_size, frequency=frequency, interval=interval, start_time=start_time, end_time=end_time, time_zone=time_zone, minutes=minutes, hours=hours, week_days=week_days, month_days=month_days, monthly_occurrences=monthly_occurrences) 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 +289,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 +310,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 +332,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 +360,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 +369,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_certificate_operations.py index 4222becf4b2..2120e18068d 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_certificate_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationAccountCertificateOperations(object): """IntegrationAccountCertificateOperations operations. @@ -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,15 +180,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('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, @@ -186,8 +198,10 @@ def create_or_update( 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] + key_vault=None, # type: Optional["models.KeyVaultKeyReferenceKeyVault"] + key_name=None, # type: Optional[str] + key_version=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccountCertificate" @@ -205,24 +219,32 @@ def create_or_update( :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 key_vault: The key vault reference. + :type key_vault: ~logic_management_client.models.KeyVaultKeyReferenceKeyVault + :param key_name: The private key name in key vault. + :type key_name: str + :param key_version: The private key version in key vault. + :type key_version: str :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _certificate = models.IntegrationAccountCertificate(location=location, tags=tags, metadata=metadata, key=key, public_certificate=public_certificate) + certificate = models.IntegrationAccountCertificate(location=location, tags=tags, metadata=metadata, public_certificate=public_certificate, key_vault=key_vault, key_name=key_name, key_version=key_version) 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 +260,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 +281,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 +303,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 +331,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 +340,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_map_operations.py index 4969a4a989c..6ab9eb6495c 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_map_operations.py @@ -6,18 +6,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationAccountMapOperations(object): """IntegrationAccountMapOperations operations. @@ -49,7 +54,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 +66,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 +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}/maps'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} # type: ignore def get( self, @@ -140,16 +149,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 +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('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, @@ -192,10 +204,10 @@ def create_or_update( 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] + ref=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccountMap" @@ -213,28 +225,32 @@ def create_or_update( :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 ref: The reference name. + :type ref: str :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _map = models.IntegrationAccountMap(location=location, tags=tags, map_type=map_type, parameters_schema=parameters_schema, content=content, content_type=content_type_parameter, metadata=metadata) + map = models.IntegrationAccountMap(location=location, tags=tags, map_type=map_type, content=content, content_type=content_type_parameter, metadata=metadata, ref=ref) 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 +266,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 +287,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 +309,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 +337,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,12 +346,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}/maps/{mapName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} # type: ignore def list_content_callback_url( self, @@ -359,19 +376,23 @@ def list_content_callback_url( :param key_type: The key type. :type key_type: str or ~logic_management_client.models.KeyType :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', {})) - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) 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 +408,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_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py index c353a90a19d..cbae7de0054 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py @@ -6,18 +6,23 @@ # 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, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationAccountOperations(object): """IntegrationAccountOperations operations. @@ -46,43 +51,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 +110,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 +125,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 +133,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 +187,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 +210,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 +237,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,15 +246,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('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, @@ -246,9 +262,14 @@ def create_or_update( 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"]] + sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] + provisioning_state=None, # type: Optional[Union[str, "models.WorkflowProvisioningState"]] + integration_service_environment_id=None, # type: Optional[str] + endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] + network_configuration=None, # type: Optional["models.NetworkConfiguration"] + encryption_configuration=None, # type: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] + name=None, # type: Optional[Union[str, "models.IntegrationAccountSkuName"]] **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccount" @@ -262,26 +283,40 @@ def create_or_update( :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 sku: The sku. + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param provisioning_state: The provisioning state. + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState + :param integration_service_environment_id: Gets the tracking id. + :type integration_service_environment_id: str + :param endpoints_configuration: The endpoints configuration. + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration + :param name: The sku name. + :type name: str or ~logic_management_client.models.IntegrationAccountSkuName :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) + integration_account = models.IntegrationAccount(location=location, tags=tags, state_properties_state=state, sku=sku, provisioning_state=provisioning_state, integration_service_environment_id=integration_service_environment_id, endpoints_configuration=endpoints_configuration, network_configuration=network_configuration, encryption_configuration=encryption_configuration, name_sku_name=name) 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 +331,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,10 +352,10 @@ 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, @@ -331,9 +363,14 @@ def update( 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"]] + sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] + provisioning_state=None, # type: Optional[Union[str, "models.WorkflowProvisioningState"]] + integration_service_environment_id=None, # type: Optional[str] + endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] + network_configuration=None, # type: Optional["models.NetworkConfiguration"] + encryption_configuration=None, # type: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] + name=None, # type: Optional[Union[str, "models.IntegrationAccountSkuName"]] **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccount" @@ -347,26 +384,40 @@ def update( :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 sku: The sku. + :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku + :param provisioning_state: The provisioning state. + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState + :param integration_service_environment_id: Gets the tracking id. + :type integration_service_environment_id: str + :param endpoints_configuration: The endpoints configuration. + :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration + :param name: The sku name. + :type name: str or ~logic_management_client.models.IntegrationAccountSkuName :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', {})) - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) + integration_account = models.IntegrationAccount(location=location, tags=tags, state_properties_state=state, sku=sku, provisioning_state=provisioning_state, integration_service_environment_id=integration_service_environment_id, endpoints_configuration=endpoints_configuration, network_configuration=network_configuration, encryption_configuration=encryption_configuration, name_sku_name=name) 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 +432,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 +468,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 +495,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,12 +504,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}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore def list_callback_url( self, @@ -478,19 +531,23 @@ def list_callback_url( :param key_type: The key type. :type key_type: str or ~logic_management_client.models.KeyType :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) 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 +562,92 @@ 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( self, resource_group_name, # type: str integration_account_name, # type: str - key_vault, # type: "models.KeyVaultReference" skip_token=None, # type: Optional[str] + id=None, # type: Optional[str] **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 id: The resource id. + :type id: str :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', {})) + list_key_vault_keys = models.ListKeyVaultKeysDefinition(skip_token=skip_token, id=id) 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_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'), '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,21 +666,21 @@ 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_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} # type: ignore def log_tracking_event( self, resource_group_name, # type: str integration_account_name, # type: str source_type, # type: str - events, # type: List["TrackingEvent"] + events, # type: List["models.TrackingEvent"] track_events_options=None, # type: Optional[Union[str, "models.TrackEventsOperationOptions"]] **kwargs # type: Any ): @@ -637,19 +698,23 @@ def log_tracking_event( :param track_events_options: The track events options. :type track_events_options: str or ~logic_management_client.models.TrackEventsOperationOptions :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', {})) - _log_tracking_events = models.TrackingEventsDefinition(source_type=source_type, track_events_options=track_events_options, events=events) + log_tracking_events = models.TrackingEventsDefinition(source_type=source_type, track_events_options=track_events_options, events=events) 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_event.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,25 +729,24 @@ 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_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} # type: ignore def regenerate_access_key( self, @@ -701,19 +765,23 @@ def regenerate_access_key( :param key_type: The key type. :type key_type: str or ~logic_management_client.models.KeyType :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', {})) - _regenerate_access_key = models.RegenerateActionParameter(key_type=key_type) + regenerate_access_key = models.RegenerateActionParameter(key_type=key_type) 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 +796,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_account_partner_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partner_operations.py index 3919f8083b0..b09f8d2660f 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_partner_operations.py @@ -6,18 +6,23 @@ # 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, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationAccountPartnerOperations(object): """IntegrationAccountPartnerOperations operations. @@ -49,7 +54,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 +66,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 +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}/partners'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} # type: ignore def get( self, @@ -140,16 +149,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 +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('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, @@ -190,10 +202,10 @@ def create_or_update( 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] + business_identities=None, # type: Optional[List["models.BusinessIdentity"]] **kwargs # type: Any ): # type: (...) -> "models.IntegrationAccountPartner" @@ -207,28 +219,32 @@ def create_or_update( :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 business_identities: The list of partner business identities. + :type business_identities: list[~logic_management_client.models.BusinessIdentity] :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _partner = models.IntegrationAccountPartner(location=location, tags=tags, partner_type=partner_type, metadata=metadata, content=content) + partner = models.IntegrationAccountPartner(location=location, tags=tags, partner_type=partner_type, metadata=metadata, business_identities=business_identities) 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 +260,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 +281,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 +303,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 +331,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,12 +340,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}/partners/{partnerName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} # type: ignore def list_content_callback_url( self, @@ -353,19 +370,23 @@ def list_content_callback_url( :param key_type: The key type. :type key_type: str or ~logic_management_client.models.KeyType :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', {})) - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) 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 +402,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_schema_operations.py index 2cc9b609d90..d767121ca44 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_schema_operations.py @@ -6,18 +6,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationAccountSchemaOperations(object): """IntegrationAccountSchemaOperations operations. @@ -49,7 +54,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 +66,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 +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}/schemas'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} # type: ignore def get( self, @@ -140,16 +149,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 +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('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, @@ -228,19 +240,23 @@ def create_or_update( :param content_type_parameter: The content type. :type content_type_parameter: str :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _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) + 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) 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 +272,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 +293,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 +315,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 +343,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,12 +352,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}/schemas/{schemaName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} # type: ignore def list_content_callback_url( self, @@ -365,19 +382,23 @@ def list_content_callback_url( :param key_type: The key type. :type key_type: str or ~logic_management_client.models.KeyType :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', {})) - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) 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 +414,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_session_operations.py index 45c1becc47a..cb44a5e5e44 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_session_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationAccountSessionOperations(object): """IntegrationAccountSessionOperations operations. @@ -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,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('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, @@ -209,19 +221,23 @@ def create_or_update( :param content: The session content. :type content: object :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _session = models.IntegrationAccountSession(location=location, tags=tags, content=content) + session = models.IntegrationAccountSession(location=location, tags=tags, content=content) 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 +253,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 +274,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 +296,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 +324,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 +333,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_service_environment_managed_api_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operation_operations.py index 7b803cec812..f3e1a86640b 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_operation_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationServiceEnvironmentManagedApiOperationOperations(object): """IntegrationServiceEnvironmentManagedApiOperationOperations operations. @@ -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_api_operations.py index 288f9ca1d56..99b4e6ed90d 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_api_operations.py @@ -5,19 +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, 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationServiceEnvironmentManagedApiOperations(object): """IntegrationServiceEnvironmentManagedApiOperations operations. @@ -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_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_operations.py index 9b2eeda72aa..a53ce00a5eb 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_environment_operations.py @@ -5,19 +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, 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationServiceEnvironmentOperations(object): """IntegrationServiceEnvironmentOperations operations. @@ -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,15 +247,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('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, @@ -246,20 +263,29 @@ def _create_or_update_initial( 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"] + provisioning_state=None, # type: Optional[Union[str, "models.WorkflowProvisioningState"]] + state=None, # type: Optional[Union[str, "models.WorkflowState"]] + integration_service_environment_id=None, # type: Optional[str] + endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] + network_configuration=None, # type: Optional["models.NetworkConfiguration"] + encryption_configuration=None, # type: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] **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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) + integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, sku=sku, provisioning_state=provisioning_state, state=state, integration_service_environment_id=integration_service_environment_id, endpoints_configuration=endpoints_configuration, network_configuration=network_configuration, encryption_configuration=encryption_configuration) 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 +300,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,10 +321,10 @@ 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, @@ -309,11 +332,16 @@ def begin_create_or_update( 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"] + provisioning_state=None, # type: Optional[Union[str, "models.WorkflowProvisioningState"]] + state=None, # type: Optional[Union[str, "models.WorkflowState"]] + integration_service_environment_id=None, # type: Optional[str] + endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] + network_configuration=None, # type: Optional["models.NetworkConfiguration"] + encryption_configuration=None, # type: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationServiceEnvironment" + # type: (...) -> LROPoller["models.IntegrationServiceEnvironment"] """Creates or updates an integration service environment. :param resource_group: The resource group. @@ -324,31 +352,56 @@ def begin_create_or_update( :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 provisioning_state: The provisioning state. + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState + :param state: The integration service environment state. + :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: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration :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, + location=location, + tags=tags, + sku=sku, + provisioning_state=provisioning_state, + state=state, + integration_service_environment_id=integration_service_environment_id, + endpoints_configuration=endpoints_configuration, + network_configuration=network_configuration, + encryption_configuration=encryption_configuration, + 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,15 +410,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_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, @@ -373,20 +436,29 @@ def _update_initial( 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"] + provisioning_state=None, # type: Optional[Union[str, "models.WorkflowProvisioningState"]] + state=None, # type: Optional[Union[str, "models.WorkflowState"]] + integration_service_environment_id=None, # type: Optional[str] + endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] + network_configuration=None, # type: Optional["models.NetworkConfiguration"] + encryption_configuration=None, # type: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] **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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) + integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, sku=sku, provisioning_state=provisioning_state, state=state, integration_service_environment_id=integration_service_environment_id, endpoints_configuration=endpoints_configuration, network_configuration=network_configuration, encryption_configuration=encryption_configuration) 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,29 +473,27 @@ 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, @@ -431,11 +501,16 @@ def begin_update( 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"] + provisioning_state=None, # type: Optional[Union[str, "models.WorkflowProvisioningState"]] + state=None, # type: Optional[Union[str, "models.WorkflowState"]] + integration_service_environment_id=None, # type: Optional[str] + endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] + network_configuration=None, # type: Optional["models.NetworkConfiguration"] + encryption_configuration=None, # type: Optional["models.IntegrationServiceEnvironmenEncryptionConfiguration"] **kwargs # type: Any ): - # type: (...) -> "models.IntegrationServiceEnvironment" + # type: (...) -> LROPoller["models.IntegrationServiceEnvironment"] """Updates an integration service environment. :param resource_group: The resource group. @@ -446,31 +521,56 @@ def begin_update( :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 provisioning_state: The provisioning state. + :type provisioning_state: str or ~logic_management_client.models.WorkflowProvisioningState + :param state: The integration service environment state. + :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: ~logic_management_client.models.FlowEndpointsConfiguration + :param network_configuration: The network configuration. + :type network_configuration: ~logic_management_client.models.NetworkConfiguration + :param encryption_configuration: The encryption configuration. + :type encryption_configuration: ~logic_management_client.models.IntegrationServiceEnvironmenEncryptionConfiguration :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, + location=location, + tags=tags, + sku=sku, + provisioning_state=provisioning_state, + state=state, + integration_service_environment_id=integration_service_environment_id, + endpoints_configuration=endpoints_configuration, + network_configuration=network_configuration, + encryption_configuration=encryption_configuration, + 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 +579,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 +613,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 +640,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 +649,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 +670,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 +697,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 +706,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/_integration_service_environment_sku_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_sku_operations.py index 2a8d954b363..6402e7d3846 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_sku_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class IntegrationServiceEnvironmentSkuOperations(object): """IntegrationServiceEnvironmentSkuOperations operations. @@ -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/_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py index 549f969dc54..94a2cf9bdae 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class OperationOperations(object): """OperationOperations operations. @@ -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_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py index 51d901031df..ae41c9b413a 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py @@ -6,19 +6,25 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowOperations(object): """WorkflowOperations operations. @@ -48,48 +54,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 +118,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 +134,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 +142,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 +201,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 +224,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 +251,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,15 +260,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('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, @@ -260,12 +277,15 @@ def create_or_update( 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"]] + parameters=None, # type: Optional[Dict[str, "models.WorkflowParameter"]] + id=None, # type: Optional[str] + triggers=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + contents=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + actions=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + workflow_management=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + workflow=None, # type: Optional["models.FlowEndpoints"] + connector=None, # type: Optional["models.FlowEndpoints"] **kwargs # type: Any ): # type: (...) -> "models.Workflow" @@ -281,31 +301,42 @@ def create_or_update( :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 id: The resource id. + :type id: str + :param triggers: The access control configuration for invoking workflow triggers. + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param contents: The access control configuration for accessing workflow run contents. + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param actions: The access control configuration for workflow actions. + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow_management: The access control configuration for workflow management. + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow: The workflow endpoints. + :type workflow: ~logic_management_client.models.FlowEndpoints + :param connector: The connector endpoints. + :type connector: ~logic_management_client.models.FlowEndpoints :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}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) - _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) + workflow = models.Workflow(location=location, tags=tags, state=state, definition=definition, parameters=parameters, id_integration_service_environment_id=id, triggers=triggers, contents=contents, actions=actions, workflow_management=workflow_management, workflow=workflow, connector=connector) 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 +351,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 +372,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 +390,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 +418,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 +451,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 +478,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 +487,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 +508,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 +535,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 +544,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 +565,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 +592,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,12 +601,12 @@ 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, @@ -614,19 +625,23 @@ def generate_upgraded_definition( :param target_schema_version: The target schema version. :type target_schema_version: 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', {})) - _parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) + parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) 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,29 +656,27 @@ 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, @@ -685,19 +698,23 @@ def list_callback_url( :param key_type: The key type. :type key_type: str or ~logic_management_client.models.KeyType :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', {})) - _list_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + list_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) 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 +729,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 +765,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 +792,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 +801,37 @@ 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"]] + id=None, # type: Optional[str] **kwargs # type: Any ): # 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', {})) - _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) + move = models.WorkflowReference(id=id) 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,102 +846,93 @@ 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"]] + id=None, # type: Optional[str] **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 id: The resource id. + :type id: 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._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, + id=id, + 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, @@ -945,19 +951,23 @@ def regenerate_access_key( :param key_type: The key type. :type key_type: str or ~logic_management_client.models.KeyType :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', {})) - _key_type = models.RegenerateActionParameter(key_type=key_type) + key_type = models.RegenerateActionParameter(key_type=key_type) 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,25 +982,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'] = 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, @@ -999,11 +1008,15 @@ def validate_by_resource_group( 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"]] + parameters=None, # type: Optional[Dict[str, "models.WorkflowParameter"]] + id=None, # type: Optional[str] + triggers=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + contents=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + actions=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + workflow_management=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + workflow=None, # type: Optional["models.FlowEndpoints"] + connector=None, # type: Optional["models.FlowEndpoints"] **kwargs # type: Any ): # type: (...) -> None @@ -1019,30 +1032,42 @@ def validate_by_resource_group( :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 id: The resource id. + :type id: str + :param triggers: The access control configuration for invoking workflow triggers. + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param contents: The access control configuration for accessing workflow run contents. + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param actions: The access control configuration for workflow actions. + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow_management: The access control configuration for workflow management. + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow: The workflow endpoints. + :type workflow: ~logic_management_client.models.FlowEndpoints + :param connector: The connector endpoints. + :type connector: ~logic_management_client.models.FlowEndpoints :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', {})) - _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) + validate = models.Workflow(location=location, tags=tags, state=state, definition=definition, parameters=parameters, id_integration_service_environment_id=id, triggers=triggers, contents=contents, actions=actions, workflow_management=workflow_management, workflow=workflow, connector=connector) 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 +1082,42 @@ 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 + resource_location=None, # type: Optional[str] + tags=None, # type: Optional[Dict[str, str]] + state=None, # type: Optional[Union[str, "models.WorkflowState"]] + definition=None, # type: Optional[object] + parameters=None, # type: Optional[Dict[str, "models.WorkflowParameter"]] + id=None, # type: Optional[str] + triggers=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + contents=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + actions=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + workflow_management=None, # type: Optional["models.FlowAccessControlConfigurationPolicy"] + workflow=None, # type: Optional["models.FlowEndpoints"] + connector=None, # type: Optional["models.FlowEndpoints"] **kwargs # type: Any ): # type: (...) -> None @@ -1093,17 +1129,48 @@ def validate_by_location( :type location: str :param workflow_name: The workflow name. :type workflow_name: str + :param resource_location: The resource location. + :type resource_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 definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] + :param id: The resource id. + :type id: str + :param triggers: The access control configuration for invoking workflow triggers. + :type triggers: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param contents: The access control configuration for accessing workflow run contents. + :type contents: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param actions: The access control configuration for workflow actions. + :type actions: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow_management: The access control configuration for workflow management. + :type workflow_management: ~logic_management_client.models.FlowAccessControlConfigurationPolicy + :param workflow: The workflow endpoints. + :type workflow: ~logic_management_client.models.FlowEndpoints + :param connector: The connector endpoints. + :type connector: ~logic_management_client.models.FlowEndpoints :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', {})) + + validate = models.Workflow(location=resource_location, tags=tags, state=state, definition=definition, parameters=parameters, id_integration_service_environment_id=id, triggers=triggers, contents=contents, actions=actions, workflow_management=workflow_management, workflow=workflow, connector=connector) 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 +1185,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/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_operations.py index 98c083e7b5b..6589525eec2 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_action_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowRunActionOperations(object): """WorkflowRunActionOperations operations. @@ -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,15 +193,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('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( self, @@ -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_trace.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_trace.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_action_repetition_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_operations.py index 920ba54db8c..aa62a1cd1d9 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_repetition_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowRunActionRepetitionOperations(object): """WorkflowRunActionRepetitionOperations operations. @@ -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,15 +191,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('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( self, @@ -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_trace.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_trace.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_repetition_request_history_operations.py index 86fa5de0eb5..e432033bb56 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_repetition_request_history_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowRunActionRepetitionRequestHistoryOperations(object): """WorkflowRunActionRepetitionRequestHistoryOperations operations. @@ -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_history_operations.py index f558cef9f46..a10e7799de3 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_history_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowRunActionRequestHistoryOperations(object): """WorkflowRunActionRequestHistoryOperations operations. @@ -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_repetition_operations.py index 8bd48b1fae4..0434e624832 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_repetition_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowRunActionScopeRepetitionOperations(object): """WorkflowRunActionScopeRepetitionOperations operations. @@ -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_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operation_operations.py index c0c609527f9..0988c173f59 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_operation_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 WorkflowRunOperationOperations(object): """WorkflowRunOperationOperations operations. @@ -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_run_operations.py index 44bd25c0029..f5d66dd4943 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowRunOperations(object): """WorkflowRunOperations operations. @@ -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_history_operations.py index f23446ceddc..b9c33b60bb7 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_history_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowTriggerHistoryOperations(object): """WorkflowTriggerHistoryOperations operations. @@ -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_trigger_operations.py index b12fbd43f9e..f78244df5e8 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowTriggerOperations(object): """WorkflowTriggerOperations operations. @@ -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" + source, # type: "models.WorkflowTriggerReference" **kwargs # type: Any ): # type: (...) -> None @@ -376,21 +399,25 @@ def set_state( :param trigger_name: The workflow trigger name. :type trigger_name: str :param source: The source. - :type source: ~logic_management_client.models.WorkflowTrigger + :type source: ~logic_management_client.models.WorkflowTriggerReference :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', {})) - _set_state = models.SetTriggerStateActionDefinition(source=source) + set_state = models.SetTriggerStateActionDefinition(source=source) 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 +433,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 +469,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 +497,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 +506,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_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py index f6a72051320..e6a7e092db3 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py @@ -5,18 +5,23 @@ # 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 + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowVersionOperations(object): """WorkflowVersionOperations operations. @@ -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_version_trigger_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_trigger_operations.py index 6a3515447af..73b5f17fe73 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_trigger_operations.py @@ -6,17 +6,22 @@ # 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, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class WorkflowVersionTriggerOperations(object): """WorkflowVersionTriggerOperations operations. @@ -66,19 +71,23 @@ def list_callback_url( :param key_type: The key type. :type key_type: str or ~logic_management_client.models.KeyType :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', {})) - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) 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 +104,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/report.md b/src/logic/report.md index 249fe951e66..422cb3e9ace 100644 --- a/src/logic/report.md +++ b/src/logic/report.md @@ -1,242 +1,2195 @@ # 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 get-schema-json](#WorkflowTriggersGetSchemaJson)|GetSchemaJson|[Parameters](#ParametersWorkflowTriggersGetSchemaJson)|[Example](#ExamplesWorkflowTriggersGetSchemaJson)| +|[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)| + +### 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" --integration-service-environment-sku name="Standard" --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| -|**--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 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| +|**--integration-service-environment-sku**|object|The sku.|sku|sku| +|**--integration-service-environment-properties-provisioning-state**|choice|The provisioning state.|provisioning_state|provisioningState| +|**--integration-service-environment-properties-integration-service-environment-id**|string|Gets the tracking id.|integration_service_environment_id|integrationServiceEnvironmentId| +|**--integration-service-environment-properties-endpoints-configuration**|object|The endpoints configuration.|endpoints_configuration|endpointsConfiguration| +|**--integration-service-environment-properties-network-configuration**|object|The network configuration.|network_configuration|networkConfiguration| +|**--integration-service-environment-properties-encryption-configuration**|object|The encryption configuration.|encryption_configuration|encryptionConfiguration| +|**--sku-name**|choice|The sku name.|name|name| + +#### Command `az logic integration-account update` + +##### Example +``` +az logic integration-account update --location "westus" --integration-service-environment-sku name="Standard" --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| +|**--integration-service-environment-sku**|object|The sku.|sku|sku| +|**--integration-service-environment-properties-provisioning-state**|choice|The provisioning state.|provisioning_state|provisioningState| +|**--integration-service-environment-properties-integration-service-environment-id**|string|Gets the tracking id.|integration_service_environment_id|integrationServiceEnvironmentId| +|**--integration-service-environment-properties-endpoints-configuration**|object|The endpoints configuration.|endpoints_configuration|endpointsConfiguration| +|**--integration-service-environment-properties-network-configuration**|object|The network configuration.|network_configuration|networkConfiguration| +|**--integration-service-environment-properties-encryption-configuration**|object|The encryption configuration.|encryption_configuration|encryptionConfiguration| +|**--sku-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" --key-vault-id \ +"subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testResourceGroup/providers/Microsoft.KeyVault/vault\ +s/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| +|**--key-vault-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" \ +--release-criteria-batch-size 234567 --release-criteria-message-count 10 --release-criteria-recurrence-frequency \ +"Minute" --release-criteria-recurrence-interval 1 --release-criteria-recurrence-start-time "2017-03-24T11:43:00" \ +--release-criteria-recurrence-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| +|**--release-criteria-message-count**|integer|The message count.|message_count|messageCount| +|**--release-criteria-batch-size**|integer|The batch size in bytes.|batch_size|batchSize| +|**--release-criteria-recurrence-frequency**|choice|The frequency.|frequency|frequency| +|**--release-criteria-recurrence-interval**|integer|The interval.|interval|interval| +|**--release-criteria-recurrence-start-time**|string|The start time.|start_time|startTime| +|**--release-criteria-recurrence-end-time**|string|The end time.|end_time|endTime| +|**--release-criteria-recurrence-time-zone**|string|The time zone.|time_zone|timeZone| +|**--release-criteria-recurrence-schedule-minutes**|array|The minutes.|minutes|minutes| +|**--release-criteria-recurrence-schedule-hours**|array|The hours.|hours|hours| +|**--release-criteria-recurrence-schedule-week-days**|array|The days of the week.|week_days|weekDays| +|**--release-criteria-recurrence-schedule-month-days**|array|The month days.|month_days|monthDays| +|**--release-criteria-recurrence-schedule-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| +|**--release-criteria-message-count**|integer|The message count.|message_count|messageCount| +|**--release-criteria-batch-size**|integer|The batch size in bytes.|batch_size|batchSize| +|**--release-criteria-recurrence-frequency**|choice|The frequency.|frequency|frequency| +|**--release-criteria-recurrence-interval**|integer|The interval.|interval|interval| +|**--release-criteria-recurrence-start-time**|string|The start time.|start_time|startTime| +|**--release-criteria-recurrence-end-time**|string|The end time.|end_time|endTime| +|**--release-criteria-recurrence-time-zone**|string|The time zone.|time_zone|timeZone| +|**--release-criteria-recurrence-schedule-minutes**|array|The minutes.|minutes|minutes| +|**--release-criteria-recurrence-schedule-hours**|array|The hours.|hours|hours| +|**--release-criteria-recurrence-schedule-week-days**|array|The days of the week.|week_days|weekDays| +|**--release-criteria-recurrence-schedule-month-days**|array|The month days.|month_days|monthDays| +|**--release-criteria-recurrence-schedule-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" --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-key-vault**|object|The key vault reference.|key_vault|keyVault| +|**--key-key-name**|string|The private key name in key vault.|key_name|keyName| +|**--key-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-key-vault**|object|The key vault reference.|key_vault|keyVault| +|**--key-key-name**|string|The private key name in key vault.|key_name|keyName| +|**--key-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| +|**--parameters-schema-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| +|**--parameters-schema-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" \ +--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| +|**--content-b2b-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| +|**--content-b2b-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" --endpoints-configuration-workflow \ +location="brazilsouth" properties={"definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Log\ +ic/schemas/2016-06-01/workflowdefinition.json#","actions":{"Find_pet_by_ID":{"type":"ApiConnection","inputs":{"path":"/\ +pet/@{encodeURIComponent(\'1\')}","method":"get","host":{"connection":{"name":"@parameters(\'$connections\')[\'test-cus\ +tom-connector\'][\'connectionId\']"}}},"runAfter":{}}},"contentVersion":"1.0.0.0","outputs":{},"parameters":{"$connecti\ +ons":{"type":"Object","defaultValue":{}}},"triggers":{"manual":{"type":"Request","inputs":{"schema":{}},"kind":"Http"}}\ +},"integrationAccount":{"id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/pr\ +oviders/Microsoft.Logic/integrationAccounts/test-integration-account"},"parameters":{"$connections":{"value":{"test-cus\ +tom-connector":{"connectionId":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/\ +providers/Microsoft.Web/connections/test-custom-connector","connectionName":"test-custom-connector","id":"/subscription\ +s/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-connector"\ +}}}}} tags={} --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 +|**--integration-service-environment-id**|string|The resource id.|id|id| +|**--access-control-triggers**|object|The access control configuration for invoking workflow triggers.|triggers|triggers| +|**--access-control-contents**|object|The access control configuration for accessing workflow run contents.|contents|contents| +|**--access-control-actions**|object|The access control configuration for workflow actions.|actions|actions| +|**--access-control-workflow-management**|object|The access control configuration for workflow management.|workflow_management|workflowManagement| +|**--endpoints-configuration-workflow**|object|The workflow endpoints.|workflow|workflow| +|**--endpoints-configuration-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\\":{}}" --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| +|**--integration-service-environment-id**|string|The resource id.|id|id| +|**--access-control-triggers**|object|The access control configuration for invoking workflow triggers.|triggers|triggers| +|**--access-control-contents**|object|The access control configuration for accessing workflow run contents.|contents|contents| +|**--access-control-actions**|object|The access control configuration for workflow actions.|actions|actions| +|**--access-control-workflow-management**|object|The access control configuration for workflow management.|workflow_management|workflowManagement| +|**--endpoints-configuration-workflow**|object|The workflow endpoints.|workflow|workflow| +|**--endpoints-configuration-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\\":{}}" --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| +|**--integration-service-environment-id**|string|The resource id.|id|id| +|**--access-control-triggers**|object|The access control configuration for invoking workflow triggers.|triggers|triggers| +|**--access-control-contents**|object|The access control configuration for accessing workflow run contents.|contents|contents| +|**--access-control-actions**|object|The access control configuration for workflow actions.|actions|actions| +|**--access-control-workflow-management**|object|The access control configuration for workflow management.|workflow_management|workflowManagement| +|**--endpoints-configuration-workflow**|object|The workflow endpoints.|workflow|workflow| +|**--endpoints-configuration-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 get-schema-json` + +##### Example +``` +az logic workflow-trigger get-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| + +#### 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| + +### 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 5b019e43e98..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.1' +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',