diff --git a/src/logic/HISTORY.rst b/src/logic/HISTORY.rst index 773a03a8ab9..8c1cb02df3f 100644 --- a/src/logic/HISTORY.rst +++ b/src/logic/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.0.0 +++++++ +* Add new command group `az logic workflow identity` to support managing identity +* `az logic workflow identity`: Add new parameters `--mi-system-assigned` `--mi-user-assigned` to support managing identity + 0.1.7 ++++++ * Add new command group `az logic integration-account map` to support manage integration account map diff --git a/src/logic/azext_logic/__init__.py b/src/logic/azext_logic/__init__.py index 52ec01e20b3..44c77e8f068 100644 --- a/src/logic/azext_logic/__init__.py +++ b/src/logic/azext_logic/__init__.py @@ -1,28 +1,25 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools # -------------------------------------------------------------------------------------------- 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 +from azext_logic._help import helps # pylint: disable=unused-import -class LogicManagementClientCommandsLoader(AzCommandsLoader): +class LogicCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_logic.generated._client_factory import cf_logic - logic_custom = CliCommandType( - operations_tmpl='azext_logic.custom#{}', - client_factory=cf_logic) - super().__init__(cli_ctx=cli_ctx, custom_command_type=logic_custom) + custom_command_type = CliCommandType( + operations_tmpl='azext_logic.custom#{}') + super().__init__(cli_ctx=cli_ctx, + custom_command_type=custom_command_type) def load_command_table(self, args): - from azext_logic.generated.commands import load_command_table + from azext_logic.commands import load_command_table from azure.cli.core.aaz import load_aaz_command_table try: from . import aaz @@ -35,21 +32,11 @@ def load_command_table(self, args): args=args ) load_command_table(self, args) - try: - from azext_logic.manual.commands import load_command_table as load_command_table_manual - load_command_table_manual(self, args) - except ImportError: - pass return self.command_table def load_arguments(self, command): - from azext_logic.generated._params import load_arguments + from azext_logic._params import load_arguments load_arguments(self, command) - try: - from azext_logic.manual._params import load_arguments as load_arguments_manual - load_arguments_manual(self, command) - except ImportError: - pass -COMMAND_LOADER_CLS = LogicManagementClientCommandsLoader +COMMAND_LOADER_CLS = LogicCommandsLoader diff --git a/src/logic/azext_logic/manual/_help.py b/src/logic/azext_logic/_help.py similarity index 73% rename from src/logic/azext_logic/manual/_help.py rename to src/logic/azext_logic/_help.py index 06b7af80a21..126d5d00714 100644 --- a/src/logic/azext_logic/manual/_help.py +++ b/src/logic/azext_logic/_help.py @@ -1,12 +1,11 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools # -------------------------------------------------------------------------------------------- -# pylint: disable=too-many-lines -from knack.help_files import helps +# pylint: disable=line-too-long +# pylint: disable=too-many-lines -helps['logic'] = """ - type: group - short-summary: Manage Logic -""" +from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/logic/azext_logic/action.py b/src/logic/azext_logic/_params.py similarity index 64% rename from src/logic/azext_logic/action.py rename to src/logic/azext_logic/_params.py index d66d3c5d0d7..cfcec717c9c 100644 --- a/src/logic/azext_logic/action.py +++ b/src/logic/azext_logic/_params.py @@ -1,12 +1,13 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools # -------------------------------------------------------------------------------------------- -# pylint: disable=wildcard-import -# pylint: disable=unused-wildcard-import -from .generated.action import * # noqa: F403 -try: - from .manual.action import * # noqa: F403 -except ImportError: +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): # pylint: disable=unused-argument pass diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/__init__.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/__init__.py index 5a9d61963d6..c401f439385 100644 --- a/src/logic/azext_logic/aaz/latest/logic/integration_account/__init__.py +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/__init__.py @@ -9,3 +9,8 @@ # flake8: noqa from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/_create.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/_create.py new file mode 100644 index 00000000000..1f2251d9b5f --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/_create.py @@ -0,0 +1,268 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account create", +) +class Create(AAZCommand): + """Create an integration account. + + :example: Create integration account + az logic integration-account create --sku Standard --name integration-account-name --resource-group rg + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The integration account name.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.location = AAZResourceLocationArg( + help="The resource location.", + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.integration_service_environment = AAZObjectArg( + options=["--integration-service-environment"], + help="The integration service environment.", + ) + _args_schema.state = AAZStrArg( + options=["--state"], + help="The workflow state.", + enum={"Completed": "Completed", "Deleted": "Deleted", "Disabled": "Disabled", "Enabled": "Enabled", "NotSpecified": "NotSpecified", "Suspended": "Suspended"}, + ) + _args_schema.sku = AAZStrArg( + options=["--sku"], + help="The sku name.", + enum={"Basic": "Basic", "Free": "Free", "NotSpecified": "NotSpecified", "Standard": "Standard"}, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="The resource tags.", + ) + + integration_service_environment = cls._args_schema.integration_service_environment + integration_service_environment.id = AAZStrArg( + options=["id"], + help="The resource id.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.IntegrationAccountsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class IntegrationAccountsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("sku", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("integrationServiceEnvironment", AAZObjectType, ".integration_service_environment") + properties.set_prop("state", AAZStrType, ".state") + + integration_service_environment = _builder.get(".properties.integrationServiceEnvironment") + if integration_service_environment is not None: + integration_service_environment.set_prop("id", AAZStrType, ".id") + + sku = _builder.get(".sku") + if sku is not None: + sku.set_prop("name", AAZStrType, ".sku", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType() + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.sku = AAZObjectType() + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + properties.state = AAZStrType() + + integration_service_environment = cls._schema_on_200_201.properties.integration_service_environment + integration_service_environment.id = AAZStrType() + integration_service_environment.name = AAZStrType( + flags={"read_only": True}, + ) + integration_service_environment.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = cls._schema_on_200_201.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/_delete.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/_delete.py new file mode 100644 index 00000000000..3e3518b1a25 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/_delete.py @@ -0,0 +1,139 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete an integration account. + + :example: Delete integration account + az logic integration-account delete --name integration-account-name --resource-group rg + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The integration account name.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.IntegrationAccountsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class IntegrationAccountsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/_list.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/_list.py new file mode 100644 index 00000000000..ab518e5a1b1 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/_list.py @@ -0,0 +1,340 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account list", +) +class List(AAZCommand): + """List a list of integration accounts by subscription. + + :example: List integration accounts by resource group name + az logic integration-account list --resource-group rg + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.logic/integrationaccounts", "2019-05-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts", "2019-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + _args_schema.top = AAZIntArg( + options=["--top"], + help="The number of items to be included in the result.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.IntegrationAccountsListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.IntegrationAccountsListBySubscription(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class IntegrationAccountsListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + properties.state = AAZStrType() + + integration_service_environment = cls._schema_on_200.value.Element.properties.integration_service_environment + integration_service_environment.id = AAZStrType() + integration_service_environment.name = AAZStrType( + flags={"read_only": True}, + ) + integration_service_environment.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class IntegrationAccountsListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + properties.state = AAZStrType() + + integration_service_environment = cls._schema_on_200.value.Element.properties.integration_service_environment + integration_service_environment.id = AAZStrType() + integration_service_environment.name = AAZStrType( + flags={"read_only": True}, + ) + integration_service_environment.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/_show.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/_show.py new file mode 100644 index 00000000000..81632648f6a --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/_show.py @@ -0,0 +1,202 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account show", +) +class Show(AAZCommand): + """Show an integration account. + + :example: Show integration account + az logic integration-account show --name integration-account-name --resource-group rg + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The integration account name.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.IntegrationAccountsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class IntegrationAccountsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType() + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + properties.state = AAZStrType() + + integration_service_environment = cls._schema_on_200.properties.integration_service_environment + integration_service_environment.id = AAZStrType() + integration_service_environment.name = AAZStrType( + flags={"read_only": True}, + ) + integration_service_environment.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/_update.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/_update.py new file mode 100644 index 00000000000..b3a6f4fbdfb --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/_update.py @@ -0,0 +1,269 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account update", +) +class Update(AAZCommand): + """Update an integration account. + + :example: Update an integration account + az logic integration-account update --sku Basic --tag atag=123 --name integration-account-name --resource-group rg + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The integration account name.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.location = AAZResourceLocationArg( + help="The resource location.", + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.integration_service_environment = AAZObjectArg( + options=["--integration-service-environment"], + help="The integration service environment.", + ) + _args_schema.state = AAZStrArg( + options=["--state"], + help="The workflow state.", + enum={"Completed": "Completed", "Deleted": "Deleted", "Disabled": "Disabled", "Enabled": "Enabled", "NotSpecified": "NotSpecified", "Suspended": "Suspended"}, + ) + _args_schema.sku = AAZStrArg( + options=["--sku"], + help="The sku name.", + enum={"Basic": "Basic", "Free": "Free", "NotSpecified": "NotSpecified", "Standard": "Standard"}, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="The resource tags.", + ) + + integration_service_environment = cls._args_schema.integration_service_environment + integration_service_environment.id = AAZStrArg( + options=["id"], + help="The resource id.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.IntegrationAccountsUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class IntegrationAccountsUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", + **self.url_parameters + ) + + @property + def method(self): + return "PATCH" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("sku", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("integrationServiceEnvironment", AAZObjectType, ".integration_service_environment") + properties.set_prop("state", AAZStrType, ".state") + + integration_service_environment = _builder.get(".properties.integrationServiceEnvironment") + if integration_service_environment is not None: + integration_service_environment.set_prop("id", AAZStrType, ".id") + + sku = _builder.get(".sku") + if sku is not None: + sku.set_prop("name", AAZStrType, ".sku", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType() + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + properties.state = AAZStrType() + + integration_service_environment = cls._schema_on_200.properties.integration_service_environment + integration_service_environment.id = AAZStrType() + integration_service_environment.name = AAZStrType( + flags={"read_only": True}, + ) + integration_service_environment.type = AAZStrType( + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/__cmd_group.py b/src/logic/azext_logic/aaz/latest/logic/workflow/__cmd_group.py new file mode 100644 index 00000000000..0b355700126 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "logic workflow", +) +class __CMDGroup(AAZCommandGroup): + """Manage workflow + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/__init__.py b/src/logic/azext_logic/aaz/latest/logic/workflow/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/_create.py b/src/logic/azext_logic/aaz/latest/logic/workflow/_create.py new file mode 100644 index 00000000000..c13d65e0ec8 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/_create.py @@ -0,0 +1,956 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic workflow create", +) +class Create(AAZCommand): + """Create a workflow. + + :example: Create workflow + az logic workflow create --resource-group rg --name workflow --definition workflow.json + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/workflows/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The workflow name.", + required=True, + ) + _args_schema.identity = AAZObjectArg( + options=["--identity"], + help="Managed service identity properties.", + ) + _args_schema.location = AAZResourceLocationArg( + help="The resource location.", + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.access_control = AAZObjectArg( + options=["--access-control"], + help="The access control configuration.", + ) + _args_schema.definition = AAZFreeFormDictArg( + options=["--definition"], + help="The definition.", + blank={}, + ) + _args_schema.endpoints_configuration = AAZObjectArg( + options=["--endpoints-configuration"], + help="The endpoints configuration.", + ) + _args_schema.integration_account = AAZObjectArg( + options=["--integration-account"], + help="The integration account.", + ) + _args_schema.integration_service_environment = AAZObjectArg( + options=["--integration-service-environment"], + help="The integration service environment.", + ) + _args_schema.state = AAZStrArg( + options=["--state"], + help="The state.", + enum={"Completed": "Completed", "Deleted": "Deleted", "Disabled": "Disabled", "Enabled": "Enabled", "NotSpecified": "NotSpecified", "Suspended": "Suspended"}, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="The resource tags.", + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="Type of managed service identity. The type 'SystemAssigned' includes an implicitly created identity. The type 'None' will remove any identities from the resource.", + required=True, + enum={"None": "None", "SystemAssigned": "SystemAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZDictArg( + options=["user-assigned-identities"], + help="The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}", + ) + + user_assigned_identities = cls._args_schema.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg( + blank={}, + ) + + access_control = cls._args_schema.access_control + access_control.actions = AAZObjectArg( + options=["actions"], + help="The access control configuration for workflow actions.", + ) + access_control.contents = AAZObjectArg( + options=["contents"], + help="The access control configuration for accessing workflow run contents.", + ) + access_control.triggers = AAZObjectArg( + options=["triggers"], + help="The access control configuration for invoking workflow triggers.", + ) + access_control.workflow_management = AAZObjectArg( + options=["workflow-management"], + help="The access control configuration for workflow management.", + ) + + actions = cls._args_schema.access_control.actions + actions.allowed_caller_ip_addresses = AAZListArg( + options=["allowed-caller-ip-addresses"], + ) + actions.open_authentication_policies = AAZObjectArg( + options=["open-authentication-policies"], + ) + + allowed_caller_ip_addresses = cls._args_schema.access_control.actions.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.actions.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrArg( + options=["address-range"], + ) + + open_authentication_policies = cls._args_schema.access_control.actions.open_authentication_policies + open_authentication_policies.policies = AAZDictArg( + options=["policies"], + ) + + policies = cls._args_schema.access_control.actions.open_authentication_policies.policies + policies.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.actions.open_authentication_policies.policies.Element + _element.claims = AAZListArg( + options=["claims"], + ) + _element.type = AAZStrArg( + options=["type"], + enum={"AAD": "AAD"}, + ) + + claims = cls._args_schema.access_control.actions.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.actions.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrArg( + options=["name"], + ) + _element.value = AAZStrArg( + options=["value"], + ) + + contents = cls._args_schema.access_control.contents + contents.allowed_caller_ip_addresses = AAZListArg( + options=["allowed-caller-ip-addresses"], + ) + contents.open_authentication_policies = AAZObjectArg( + options=["open-authentication-policies"], + ) + + allowed_caller_ip_addresses = cls._args_schema.access_control.contents.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.contents.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrArg( + options=["address-range"], + ) + + open_authentication_policies = cls._args_schema.access_control.contents.open_authentication_policies + open_authentication_policies.policies = AAZDictArg( + options=["policies"], + ) + + policies = cls._args_schema.access_control.contents.open_authentication_policies.policies + policies.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.contents.open_authentication_policies.policies.Element + _element.claims = AAZListArg( + options=["claims"], + ) + _element.type = AAZStrArg( + options=["type"], + enum={"AAD": "AAD"}, + ) + + claims = cls._args_schema.access_control.contents.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.contents.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrArg( + options=["name"], + ) + _element.value = AAZStrArg( + options=["value"], + ) + + triggers = cls._args_schema.access_control.triggers + triggers.allowed_caller_ip_addresses = AAZListArg( + options=["allowed-caller-ip-addresses"], + ) + triggers.open_authentication_policies = AAZObjectArg( + options=["open-authentication-policies"], + ) + + allowed_caller_ip_addresses = cls._args_schema.access_control.triggers.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.triggers.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrArg( + options=["address-range"], + ) + + open_authentication_policies = cls._args_schema.access_control.triggers.open_authentication_policies + open_authentication_policies.policies = AAZDictArg( + options=["policies"], + ) + + policies = cls._args_schema.access_control.triggers.open_authentication_policies.policies + policies.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.triggers.open_authentication_policies.policies.Element + _element.claims = AAZListArg( + options=["claims"], + ) + _element.type = AAZStrArg( + options=["type"], + enum={"AAD": "AAD"}, + ) + + claims = cls._args_schema.access_control.triggers.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.triggers.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrArg( + options=["name"], + ) + _element.value = AAZStrArg( + options=["value"], + ) + + workflow_management = cls._args_schema.access_control.workflow_management + workflow_management.allowed_caller_ip_addresses = AAZListArg( + options=["allowed-caller-ip-addresses"], + ) + workflow_management.open_authentication_policies = AAZObjectArg( + options=["open-authentication-policies"], + ) + + allowed_caller_ip_addresses = cls._args_schema.access_control.workflow_management.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.workflow_management.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrArg( + options=["address-range"], + ) + + open_authentication_policies = cls._args_schema.access_control.workflow_management.open_authentication_policies + open_authentication_policies.policies = AAZDictArg( + options=["policies"], + ) + + policies = cls._args_schema.access_control.workflow_management.open_authentication_policies.policies + policies.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.workflow_management.open_authentication_policies.policies.Element + _element.claims = AAZListArg( + options=["claims"], + ) + _element.type = AAZStrArg( + options=["type"], + enum={"AAD": "AAD"}, + ) + + claims = cls._args_schema.access_control.workflow_management.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectArg() + + _element = cls._args_schema.access_control.workflow_management.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrArg( + options=["name"], + ) + _element.value = AAZStrArg( + options=["value"], + ) + + endpoints_configuration = cls._args_schema.endpoints_configuration + endpoints_configuration.connector = AAZObjectArg( + options=["connector"], + help="The connector endpoints.", + ) + endpoints_configuration.workflow = AAZObjectArg( + options=["workflow"], + help="The workflow endpoints.", + ) + + connector = cls._args_schema.endpoints_configuration.connector + connector.access_endpoint_ip_addresses = AAZListArg( + options=["access-endpoint-ip-addresses"], + ) + connector.outgoing_ip_addresses = AAZListArg( + options=["outgoing-ip-addresses"], + ) + + access_endpoint_ip_addresses = cls._args_schema.endpoints_configuration.connector.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.endpoints_configuration.connector.access_endpoint_ip_addresses.Element + _element.address = AAZStrArg( + options=["address"], + ) + + outgoing_ip_addresses = cls._args_schema.endpoints_configuration.connector.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.endpoints_configuration.connector.outgoing_ip_addresses.Element + _element.address = AAZStrArg( + options=["address"], + ) + + workflow = cls._args_schema.endpoints_configuration.workflow + workflow.access_endpoint_ip_addresses = AAZListArg( + options=["access-endpoint-ip-addresses"], + ) + workflow.outgoing_ip_addresses = AAZListArg( + options=["outgoing-ip-addresses"], + ) + + access_endpoint_ip_addresses = cls._args_schema.endpoints_configuration.workflow.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.endpoints_configuration.workflow.access_endpoint_ip_addresses.Element + _element.address = AAZStrArg( + options=["address"], + ) + + outgoing_ip_addresses = cls._args_schema.endpoints_configuration.workflow.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.endpoints_configuration.workflow.outgoing_ip_addresses.Element + _element.address = AAZStrArg( + options=["address"], + ) + + integration_account = cls._args_schema.integration_account + integration_account.id = AAZStrArg( + options=["id"], + ) + + integration_service_environment = cls._args_schema.integration_service_environment + integration_service_environment.id = AAZStrArg( + options=["id"], + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkflowsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkflowsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workflowName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".identity.userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("accessControl", AAZObjectType, ".access_control") + properties.set_prop("definition", AAZFreeFormDictType, ".definition") + properties.set_prop("endpointsConfiguration", AAZObjectType, ".endpoints_configuration") + properties.set_prop("integrationAccount", AAZObjectType, ".integration_account") + properties.set_prop("integrationServiceEnvironment", AAZObjectType, ".integration_service_environment") + properties.set_prop("state", AAZStrType, ".state") + + access_control = _builder.get(".properties.accessControl") + if access_control is not None: + access_control.set_prop("actions", AAZObjectType, ".actions") + access_control.set_prop("contents", AAZObjectType, ".contents") + access_control.set_prop("triggers", AAZObjectType, ".triggers") + access_control.set_prop("workflowManagement", AAZObjectType, ".workflow_management") + + actions = _builder.get(".properties.accessControl.actions") + if actions is not None: + actions.set_prop("allowedCallerIpAddresses", AAZListType, ".allowed_caller_ip_addresses") + actions.set_prop("openAuthenticationPolicies", AAZObjectType, ".open_authentication_policies") + + allowed_caller_ip_addresses = _builder.get(".properties.accessControl.actions.allowedCallerIpAddresses") + if allowed_caller_ip_addresses is not None: + allowed_caller_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.actions.allowedCallerIpAddresses[]") + if _elements is not None: + _elements.set_prop("addressRange", AAZStrType, ".address_range") + + open_authentication_policies = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies") + if open_authentication_policies is not None: + open_authentication_policies.set_prop("policies", AAZDictType, ".policies") + + policies = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies.policies") + if policies is not None: + policies.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies.policies{}") + if _elements is not None: + _elements.set_prop("claims", AAZListType, ".claims") + _elements.set_prop("type", AAZStrType, ".type") + + claims = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies.policies{}.claims") + if claims is not None: + claims.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies.policies{}.claims[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("value", AAZStrType, ".value") + + contents = _builder.get(".properties.accessControl.contents") + if contents is not None: + contents.set_prop("allowedCallerIpAddresses", AAZListType, ".allowed_caller_ip_addresses") + contents.set_prop("openAuthenticationPolicies", AAZObjectType, ".open_authentication_policies") + + allowed_caller_ip_addresses = _builder.get(".properties.accessControl.contents.allowedCallerIpAddresses") + if allowed_caller_ip_addresses is not None: + allowed_caller_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.contents.allowedCallerIpAddresses[]") + if _elements is not None: + _elements.set_prop("addressRange", AAZStrType, ".address_range") + + open_authentication_policies = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies") + if open_authentication_policies is not None: + open_authentication_policies.set_prop("policies", AAZDictType, ".policies") + + policies = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies.policies") + if policies is not None: + policies.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies.policies{}") + if _elements is not None: + _elements.set_prop("claims", AAZListType, ".claims") + _elements.set_prop("type", AAZStrType, ".type") + + claims = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies.policies{}.claims") + if claims is not None: + claims.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies.policies{}.claims[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("value", AAZStrType, ".value") + + triggers = _builder.get(".properties.accessControl.triggers") + if triggers is not None: + triggers.set_prop("allowedCallerIpAddresses", AAZListType, ".allowed_caller_ip_addresses") + triggers.set_prop("openAuthenticationPolicies", AAZObjectType, ".open_authentication_policies") + + allowed_caller_ip_addresses = _builder.get(".properties.accessControl.triggers.allowedCallerIpAddresses") + if allowed_caller_ip_addresses is not None: + allowed_caller_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.triggers.allowedCallerIpAddresses[]") + if _elements is not None: + _elements.set_prop("addressRange", AAZStrType, ".address_range") + + open_authentication_policies = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies") + if open_authentication_policies is not None: + open_authentication_policies.set_prop("policies", AAZDictType, ".policies") + + policies = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies.policies") + if policies is not None: + policies.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies.policies{}") + if _elements is not None: + _elements.set_prop("claims", AAZListType, ".claims") + _elements.set_prop("type", AAZStrType, ".type") + + claims = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies.policies{}.claims") + if claims is not None: + claims.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies.policies{}.claims[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("value", AAZStrType, ".value") + + workflow_management = _builder.get(".properties.accessControl.workflowManagement") + if workflow_management is not None: + workflow_management.set_prop("allowedCallerIpAddresses", AAZListType, ".allowed_caller_ip_addresses") + workflow_management.set_prop("openAuthenticationPolicies", AAZObjectType, ".open_authentication_policies") + + allowed_caller_ip_addresses = _builder.get(".properties.accessControl.workflowManagement.allowedCallerIpAddresses") + if allowed_caller_ip_addresses is not None: + allowed_caller_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.workflowManagement.allowedCallerIpAddresses[]") + if _elements is not None: + _elements.set_prop("addressRange", AAZStrType, ".address_range") + + open_authentication_policies = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies") + if open_authentication_policies is not None: + open_authentication_policies.set_prop("policies", AAZDictType, ".policies") + + policies = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies.policies") + if policies is not None: + policies.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies.policies{}") + if _elements is not None: + _elements.set_prop("claims", AAZListType, ".claims") + _elements.set_prop("type", AAZStrType, ".type") + + claims = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies.policies{}.claims") + if claims is not None: + claims.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies.policies{}.claims[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("value", AAZStrType, ".value") + + definition = _builder.get(".properties.definition") + if definition is not None: + definition.set_anytype_elements(".") + + endpoints_configuration = _builder.get(".properties.endpointsConfiguration") + if endpoints_configuration is not None: + endpoints_configuration.set_prop("connector", AAZObjectType, ".connector") + endpoints_configuration.set_prop("workflow", AAZObjectType, ".workflow") + + connector = _builder.get(".properties.endpointsConfiguration.connector") + if connector is not None: + connector.set_prop("accessEndpointIpAddresses", AAZListType, ".access_endpoint_ip_addresses") + connector.set_prop("outgoingIpAddresses", AAZListType, ".outgoing_ip_addresses") + + access_endpoint_ip_addresses = _builder.get(".properties.endpointsConfiguration.connector.accessEndpointIpAddresses") + if access_endpoint_ip_addresses is not None: + access_endpoint_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.endpointsConfiguration.connector.accessEndpointIpAddresses[]") + if _elements is not None: + _elements.set_prop("address", AAZStrType, ".address") + + outgoing_ip_addresses = _builder.get(".properties.endpointsConfiguration.connector.outgoingIpAddresses") + if outgoing_ip_addresses is not None: + outgoing_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.endpointsConfiguration.connector.outgoingIpAddresses[]") + if _elements is not None: + _elements.set_prop("address", AAZStrType, ".address") + + workflow = _builder.get(".properties.endpointsConfiguration.workflow") + if workflow is not None: + workflow.set_prop("accessEndpointIpAddresses", AAZListType, ".access_endpoint_ip_addresses") + workflow.set_prop("outgoingIpAddresses", AAZListType, ".outgoing_ip_addresses") + + access_endpoint_ip_addresses = _builder.get(".properties.endpointsConfiguration.workflow.accessEndpointIpAddresses") + if access_endpoint_ip_addresses is not None: + access_endpoint_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.endpointsConfiguration.workflow.accessEndpointIpAddresses[]") + if _elements is not None: + _elements.set_prop("address", AAZStrType, ".address") + + outgoing_ip_addresses = _builder.get(".properties.endpointsConfiguration.workflow.outgoingIpAddresses") + if outgoing_ip_addresses is not None: + outgoing_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.endpointsConfiguration.workflow.outgoingIpAddresses[]") + if _elements is not None: + _elements.set_prop("address", AAZStrType, ".address") + + integration_account = _builder.get(".properties.integrationAccount") + if integration_account is not None: + integration_account.set_prop("id", AAZStrType, ".id") + + integration_service_environment = _builder.get(".properties.integrationServiceEnvironment") + if integration_service_environment is not None: + integration_service_environment.set_prop("id", AAZStrType, ".id") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.identity = AAZObjectType() + _schema_on_200_201.location = AAZStrType() + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200_201.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200_201.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.access_control = AAZObjectType( + serialized_name="accessControl", + ) + properties.access_endpoint = AAZStrType( + serialized_name="accessEndpoint", + flags={"read_only": True}, + ) + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.definition = AAZFreeFormDictType() + properties.endpoints_configuration = AAZObjectType( + serialized_name="endpointsConfiguration", + ) + properties.integration_account = AAZObjectType( + serialized_name="integrationAccount", + ) + _CreateHelper._build_schema_resource_reference_read(properties.integration_account) + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + _CreateHelper._build_schema_resource_reference_read(properties.integration_service_environment) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.sku = AAZObjectType() + properties.state = AAZStrType() + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + access_control = cls._schema_on_200_201.properties.access_control + access_control.actions = AAZObjectType() + _CreateHelper._build_schema_flow_access_control_configuration_policy_read(access_control.actions) + access_control.contents = AAZObjectType() + _CreateHelper._build_schema_flow_access_control_configuration_policy_read(access_control.contents) + access_control.triggers = AAZObjectType() + _CreateHelper._build_schema_flow_access_control_configuration_policy_read(access_control.triggers) + access_control.workflow_management = AAZObjectType( + serialized_name="workflowManagement", + ) + _CreateHelper._build_schema_flow_access_control_configuration_policy_read(access_control.workflow_management) + + endpoints_configuration = cls._schema_on_200_201.properties.endpoints_configuration + endpoints_configuration.connector = AAZObjectType() + _CreateHelper._build_schema_flow_endpoints_read(endpoints_configuration.connector) + endpoints_configuration.workflow = AAZObjectType() + _CreateHelper._build_schema_flow_endpoints_read(endpoints_configuration.workflow) + + sku = cls._schema_on_200_201.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.plan = AAZObjectType() + _CreateHelper._build_schema_resource_reference_read(sku.plan) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + _schema_flow_access_control_configuration_policy_read = None + + @classmethod + def _build_schema_flow_access_control_configuration_policy_read(cls, _schema): + if cls._schema_flow_access_control_configuration_policy_read is not None: + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + return + + cls._schema_flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read = AAZObjectType() + + flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read + flow_access_control_configuration_policy_read.allowed_caller_ip_addresses = AAZListType( + serialized_name="allowedCallerIpAddresses", + ) + flow_access_control_configuration_policy_read.open_authentication_policies = AAZObjectType( + serialized_name="openAuthenticationPolicies", + ) + + allowed_caller_ip_addresses = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrType( + serialized_name="addressRange", + ) + + open_authentication_policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies + open_authentication_policies.policies = AAZDictType() + + policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies + policies.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element + _element.claims = AAZListType() + _element.type = AAZStrType() + + claims = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrType() + _element.value = AAZStrType() + + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + + _schema_flow_endpoints_read = None + + @classmethod + def _build_schema_flow_endpoints_read(cls, _schema): + if cls._schema_flow_endpoints_read is not None: + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + return + + cls._schema_flow_endpoints_read = _schema_flow_endpoints_read = AAZObjectType() + + flow_endpoints_read = _schema_flow_endpoints_read + flow_endpoints_read.access_endpoint_ip_addresses = AAZListType( + serialized_name="accessEndpointIpAddresses", + ) + flow_endpoints_read.outgoing_ip_addresses = AAZListType( + serialized_name="outgoingIpAddresses", + ) + + access_endpoint_ip_addresses = _schema_flow_endpoints_read.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(access_endpoint_ip_addresses.Element) + + outgoing_ip_addresses = _schema_flow_endpoints_read.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(outgoing_ip_addresses.Element) + + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + + _schema.address = cls._schema_ip_address_read.address + + _schema_resource_reference_read = None + + @classmethod + def _build_schema_resource_reference_read(cls, _schema): + if cls._schema_resource_reference_read is not None: + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + return + + cls._schema_resource_reference_read = _schema_resource_reference_read = AAZObjectType() + + resource_reference_read = _schema_resource_reference_read + resource_reference_read.id = AAZStrType() + resource_reference_read.name = AAZStrType( + flags={"read_only": True}, + ) + resource_reference_read.type = AAZStrType( + flags={"read_only": True}, + ) + + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + + +__all__ = ["Create"] diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/_delete.py b/src/logic/azext_logic/aaz/latest/logic/workflow/_delete.py new file mode 100644 index 00000000000..04c8aa057eb --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/_delete.py @@ -0,0 +1,139 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic workflow delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a workflow. + + :example: Delete workflow + az logic workflow delete --resource-group rg --name workflow + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/workflows/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The workflow name.", + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkflowsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WorkflowsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workflowName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/_list.py b/src/logic/azext_logic/aaz/latest/logic/workflow/_list.py new file mode 100644 index 00000000000..89784885021 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/_list.py @@ -0,0 +1,612 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic workflow list", +) +class List(AAZCommand): + """List a list of workflows by subscription. + + :example: List all workflows in a resource group + az logic workflow list --resource-group rg + + :example: List all workflows in a subscription + az logic workflow list + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.logic/workflows", "2019-05-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/workflows", "2019-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + _args_schema.filter = AAZStrArg( + options=["--filter"], + help="The filter to apply on the operation. Options for filters include: State, Trigger, and ReferencedResourceId.", + ) + _args_schema.top = AAZIntArg( + options=["--top"], + help="The number of items to be included in the result.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.WorkflowsListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.WorkflowsListBySubscription(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkflowsListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$filter", self.ctx.args.filter, + ), + **self.serialize_query_param( + "$top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.access_control = AAZObjectType( + serialized_name="accessControl", + ) + properties.access_endpoint = AAZStrType( + serialized_name="accessEndpoint", + flags={"read_only": True}, + ) + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.definition = AAZFreeFormDictType() + properties.endpoints_configuration = AAZObjectType( + serialized_name="endpointsConfiguration", + ) + properties.integration_account = AAZObjectType( + serialized_name="integrationAccount", + ) + _ListHelper._build_schema_resource_reference_read(properties.integration_account) + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + _ListHelper._build_schema_resource_reference_read(properties.integration_service_environment) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.sku = AAZObjectType() + properties.state = AAZStrType() + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + access_control = cls._schema_on_200.value.Element.properties.access_control + access_control.actions = AAZObjectType() + _ListHelper._build_schema_flow_access_control_configuration_policy_read(access_control.actions) + access_control.contents = AAZObjectType() + _ListHelper._build_schema_flow_access_control_configuration_policy_read(access_control.contents) + access_control.triggers = AAZObjectType() + _ListHelper._build_schema_flow_access_control_configuration_policy_read(access_control.triggers) + access_control.workflow_management = AAZObjectType( + serialized_name="workflowManagement", + ) + _ListHelper._build_schema_flow_access_control_configuration_policy_read(access_control.workflow_management) + + endpoints_configuration = cls._schema_on_200.value.Element.properties.endpoints_configuration + endpoints_configuration.connector = AAZObjectType() + _ListHelper._build_schema_flow_endpoints_read(endpoints_configuration.connector) + endpoints_configuration.workflow = AAZObjectType() + _ListHelper._build_schema_flow_endpoints_read(endpoints_configuration.workflow) + + sku = cls._schema_on_200.value.Element.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.plan = AAZObjectType() + _ListHelper._build_schema_resource_reference_read(sku.plan) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class WorkflowsListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$filter", self.ctx.args.filter, + ), + **self.serialize_query_param( + "$top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.access_control = AAZObjectType( + serialized_name="accessControl", + ) + properties.access_endpoint = AAZStrType( + serialized_name="accessEndpoint", + flags={"read_only": True}, + ) + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.definition = AAZFreeFormDictType() + properties.endpoints_configuration = AAZObjectType( + serialized_name="endpointsConfiguration", + ) + properties.integration_account = AAZObjectType( + serialized_name="integrationAccount", + ) + _ListHelper._build_schema_resource_reference_read(properties.integration_account) + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + _ListHelper._build_schema_resource_reference_read(properties.integration_service_environment) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.sku = AAZObjectType() + properties.state = AAZStrType() + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + access_control = cls._schema_on_200.value.Element.properties.access_control + access_control.actions = AAZObjectType() + _ListHelper._build_schema_flow_access_control_configuration_policy_read(access_control.actions) + access_control.contents = AAZObjectType() + _ListHelper._build_schema_flow_access_control_configuration_policy_read(access_control.contents) + access_control.triggers = AAZObjectType() + _ListHelper._build_schema_flow_access_control_configuration_policy_read(access_control.triggers) + access_control.workflow_management = AAZObjectType( + serialized_name="workflowManagement", + ) + _ListHelper._build_schema_flow_access_control_configuration_policy_read(access_control.workflow_management) + + endpoints_configuration = cls._schema_on_200.value.Element.properties.endpoints_configuration + endpoints_configuration.connector = AAZObjectType() + _ListHelper._build_schema_flow_endpoints_read(endpoints_configuration.connector) + endpoints_configuration.workflow = AAZObjectType() + _ListHelper._build_schema_flow_endpoints_read(endpoints_configuration.workflow) + + sku = cls._schema_on_200.value.Element.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.plan = AAZObjectType() + _ListHelper._build_schema_resource_reference_read(sku.plan) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_flow_access_control_configuration_policy_read = None + + @classmethod + def _build_schema_flow_access_control_configuration_policy_read(cls, _schema): + if cls._schema_flow_access_control_configuration_policy_read is not None: + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + return + + cls._schema_flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read = AAZObjectType() + + flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read + flow_access_control_configuration_policy_read.allowed_caller_ip_addresses = AAZListType( + serialized_name="allowedCallerIpAddresses", + ) + flow_access_control_configuration_policy_read.open_authentication_policies = AAZObjectType( + serialized_name="openAuthenticationPolicies", + ) + + allowed_caller_ip_addresses = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrType( + serialized_name="addressRange", + ) + + open_authentication_policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies + open_authentication_policies.policies = AAZDictType() + + policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies + policies.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element + _element.claims = AAZListType() + _element.type = AAZStrType() + + claims = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrType() + _element.value = AAZStrType() + + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + + _schema_flow_endpoints_read = None + + @classmethod + def _build_schema_flow_endpoints_read(cls, _schema): + if cls._schema_flow_endpoints_read is not None: + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + return + + cls._schema_flow_endpoints_read = _schema_flow_endpoints_read = AAZObjectType() + + flow_endpoints_read = _schema_flow_endpoints_read + flow_endpoints_read.access_endpoint_ip_addresses = AAZListType( + serialized_name="accessEndpointIpAddresses", + ) + flow_endpoints_read.outgoing_ip_addresses = AAZListType( + serialized_name="outgoingIpAddresses", + ) + + access_endpoint_ip_addresses = _schema_flow_endpoints_read.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(access_endpoint_ip_addresses.Element) + + outgoing_ip_addresses = _schema_flow_endpoints_read.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(outgoing_ip_addresses.Element) + + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + + _schema.address = cls._schema_ip_address_read.address + + _schema_resource_reference_read = None + + @classmethod + def _build_schema_resource_reference_read(cls, _schema): + if cls._schema_resource_reference_read is not None: + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + return + + cls._schema_resource_reference_read = _schema_resource_reference_read = AAZObjectType() + + resource_reference_read = _schema_resource_reference_read + resource_reference_read.id = AAZStrType() + resource_reference_read.name = AAZStrType( + flags={"read_only": True}, + ) + resource_reference_read.type = AAZStrType( + flags={"read_only": True}, + ) + + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + + +__all__ = ["List"] diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/_show.py b/src/logic/azext_logic/aaz/latest/logic/workflow/_show.py new file mode 100644 index 00000000000..40785e5515e --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/_show.py @@ -0,0 +1,390 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic workflow show", +) +class Show(AAZCommand): + """Get a workflow. + + :example: Show workflow + az logic workflow show --resource-group rg --name workflow + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/workflows/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The workflow name.", + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkflowsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkflowsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workflowName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.access_control = AAZObjectType( + serialized_name="accessControl", + ) + properties.access_endpoint = AAZStrType( + serialized_name="accessEndpoint", + flags={"read_only": True}, + ) + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.definition = AAZFreeFormDictType() + properties.endpoints_configuration = AAZObjectType( + serialized_name="endpointsConfiguration", + ) + properties.integration_account = AAZObjectType( + serialized_name="integrationAccount", + ) + _ShowHelper._build_schema_resource_reference_read(properties.integration_account) + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + _ShowHelper._build_schema_resource_reference_read(properties.integration_service_environment) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.sku = AAZObjectType() + properties.state = AAZStrType() + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + access_control = cls._schema_on_200.properties.access_control + access_control.actions = AAZObjectType() + _ShowHelper._build_schema_flow_access_control_configuration_policy_read(access_control.actions) + access_control.contents = AAZObjectType() + _ShowHelper._build_schema_flow_access_control_configuration_policy_read(access_control.contents) + access_control.triggers = AAZObjectType() + _ShowHelper._build_schema_flow_access_control_configuration_policy_read(access_control.triggers) + access_control.workflow_management = AAZObjectType( + serialized_name="workflowManagement", + ) + _ShowHelper._build_schema_flow_access_control_configuration_policy_read(access_control.workflow_management) + + endpoints_configuration = cls._schema_on_200.properties.endpoints_configuration + endpoints_configuration.connector = AAZObjectType() + _ShowHelper._build_schema_flow_endpoints_read(endpoints_configuration.connector) + endpoints_configuration.workflow = AAZObjectType() + _ShowHelper._build_schema_flow_endpoints_read(endpoints_configuration.workflow) + + sku = cls._schema_on_200.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.plan = AAZObjectType() + _ShowHelper._build_schema_resource_reference_read(sku.plan) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_flow_access_control_configuration_policy_read = None + + @classmethod + def _build_schema_flow_access_control_configuration_policy_read(cls, _schema): + if cls._schema_flow_access_control_configuration_policy_read is not None: + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + return + + cls._schema_flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read = AAZObjectType() + + flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read + flow_access_control_configuration_policy_read.allowed_caller_ip_addresses = AAZListType( + serialized_name="allowedCallerIpAddresses", + ) + flow_access_control_configuration_policy_read.open_authentication_policies = AAZObjectType( + serialized_name="openAuthenticationPolicies", + ) + + allowed_caller_ip_addresses = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrType( + serialized_name="addressRange", + ) + + open_authentication_policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies + open_authentication_policies.policies = AAZDictType() + + policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies + policies.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element + _element.claims = AAZListType() + _element.type = AAZStrType() + + claims = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrType() + _element.value = AAZStrType() + + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + + _schema_flow_endpoints_read = None + + @classmethod + def _build_schema_flow_endpoints_read(cls, _schema): + if cls._schema_flow_endpoints_read is not None: + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + return + + cls._schema_flow_endpoints_read = _schema_flow_endpoints_read = AAZObjectType() + + flow_endpoints_read = _schema_flow_endpoints_read + flow_endpoints_read.access_endpoint_ip_addresses = AAZListType( + serialized_name="accessEndpointIpAddresses", + ) + flow_endpoints_read.outgoing_ip_addresses = AAZListType( + serialized_name="outgoingIpAddresses", + ) + + access_endpoint_ip_addresses = _schema_flow_endpoints_read.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(access_endpoint_ip_addresses.Element) + + outgoing_ip_addresses = _schema_flow_endpoints_read.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(outgoing_ip_addresses.Element) + + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + + _schema.address = cls._schema_ip_address_read.address + + _schema_resource_reference_read = None + + @classmethod + def _build_schema_resource_reference_read(cls, _schema): + if cls._schema_resource_reference_read is not None: + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + return + + cls._schema_resource_reference_read = _schema_resource_reference_read = AAZObjectType() + + resource_reference_read = _schema_resource_reference_read + resource_reference_read.id = AAZStrType() + resource_reference_read.name = AAZStrType( + flags={"read_only": True}, + ) + resource_reference_read.type = AAZStrType( + flags={"read_only": True}, + ) + + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + + +__all__ = ["Show"] diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/_update.py b/src/logic/azext_logic/aaz/latest/logic/workflow/_update.py new file mode 100644 index 00000000000..68dd43b768c --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/_update.py @@ -0,0 +1,1193 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic workflow update", +) +class Update(AAZCommand): + """Update a workflow. + + :example: Update workflow + az logic workflow update --resource-group rg --name workflow --definition workflow.json + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/workflows/{}", "2019-05-01"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The workflow name.", + required=True, + id_part="name", + ) + _args_schema.identity = AAZObjectArg( + options=["--identity"], + help="Managed service identity properties.", + nullable=True, + ) + _args_schema.location = AAZResourceLocationArg( + help="The resource location.", + nullable=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.access_control = AAZObjectArg( + options=["--access-control"], + help="The access control configuration.", + nullable=True, + ) + _args_schema.definition = AAZFreeFormDictArg( + options=["--definition"], + help="The definition.", + nullable=True, + blank={}, + ) + _args_schema.endpoints_configuration = AAZObjectArg( + options=["--endpoints-configuration"], + help="The endpoints configuration.", + nullable=True, + ) + _args_schema.integration_account = AAZObjectArg( + options=["--integration-account"], + help="The integration account.", + nullable=True, + ) + _args_schema.integration_service_environment = AAZObjectArg( + options=["--integration-service-environment"], + help="The integration service environment.", + nullable=True, + ) + _args_schema.state = AAZStrArg( + options=["--state"], + help="The state.", + nullable=True, + enum={"Completed": "Completed", "Deleted": "Deleted", "Disabled": "Disabled", "Enabled": "Enabled", "NotSpecified": "NotSpecified", "Suspended": "Suspended"}, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="The resource tags.", + nullable=True, + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="Type of managed service identity. The type 'SystemAssigned' includes an implicitly created identity. The type 'None' will remove any identities from the resource.", + enum={"None": "None", "SystemAssigned": "SystemAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZDictArg( + options=["user-assigned-identities"], + help="The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}", + nullable=True, + ) + + user_assigned_identities = cls._args_schema.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg( + nullable=True, + blank={}, + ) + + access_control = cls._args_schema.access_control + access_control.actions = AAZObjectArg( + options=["actions"], + help="The access control configuration for workflow actions.", + nullable=True, + ) + access_control.contents = AAZObjectArg( + options=["contents"], + help="The access control configuration for accessing workflow run contents.", + nullable=True, + ) + access_control.triggers = AAZObjectArg( + options=["triggers"], + help="The access control configuration for invoking workflow triggers.", + nullable=True, + ) + access_control.workflow_management = AAZObjectArg( + options=["workflow-management"], + help="The access control configuration for workflow management.", + nullable=True, + ) + + actions = cls._args_schema.access_control.actions + actions.allowed_caller_ip_addresses = AAZListArg( + options=["allowed-caller-ip-addresses"], + nullable=True, + ) + actions.open_authentication_policies = AAZObjectArg( + options=["open-authentication-policies"], + nullable=True, + ) + + allowed_caller_ip_addresses = cls._args_schema.access_control.actions.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.actions.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrArg( + options=["address-range"], + nullable=True, + ) + + open_authentication_policies = cls._args_schema.access_control.actions.open_authentication_policies + open_authentication_policies.policies = AAZDictArg( + options=["policies"], + nullable=True, + ) + + policies = cls._args_schema.access_control.actions.open_authentication_policies.policies + policies.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.actions.open_authentication_policies.policies.Element + _element.claims = AAZListArg( + options=["claims"], + nullable=True, + ) + _element.type = AAZStrArg( + options=["type"], + nullable=True, + enum={"AAD": "AAD"}, + ) + + claims = cls._args_schema.access_control.actions.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.actions.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrArg( + options=["name"], + nullable=True, + ) + _element.value = AAZStrArg( + options=["value"], + nullable=True, + ) + + contents = cls._args_schema.access_control.contents + contents.allowed_caller_ip_addresses = AAZListArg( + options=["allowed-caller-ip-addresses"], + nullable=True, + ) + contents.open_authentication_policies = AAZObjectArg( + options=["open-authentication-policies"], + nullable=True, + ) + + allowed_caller_ip_addresses = cls._args_schema.access_control.contents.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.contents.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrArg( + options=["address-range"], + nullable=True, + ) + + open_authentication_policies = cls._args_schema.access_control.contents.open_authentication_policies + open_authentication_policies.policies = AAZDictArg( + options=["policies"], + nullable=True, + ) + + policies = cls._args_schema.access_control.contents.open_authentication_policies.policies + policies.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.contents.open_authentication_policies.policies.Element + _element.claims = AAZListArg( + options=["claims"], + nullable=True, + ) + _element.type = AAZStrArg( + options=["type"], + nullable=True, + enum={"AAD": "AAD"}, + ) + + claims = cls._args_schema.access_control.contents.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.contents.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrArg( + options=["name"], + nullable=True, + ) + _element.value = AAZStrArg( + options=["value"], + nullable=True, + ) + + triggers = cls._args_schema.access_control.triggers + triggers.allowed_caller_ip_addresses = AAZListArg( + options=["allowed-caller-ip-addresses"], + nullable=True, + ) + triggers.open_authentication_policies = AAZObjectArg( + options=["open-authentication-policies"], + nullable=True, + ) + + allowed_caller_ip_addresses = cls._args_schema.access_control.triggers.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.triggers.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrArg( + options=["address-range"], + nullable=True, + ) + + open_authentication_policies = cls._args_schema.access_control.triggers.open_authentication_policies + open_authentication_policies.policies = AAZDictArg( + options=["policies"], + nullable=True, + ) + + policies = cls._args_schema.access_control.triggers.open_authentication_policies.policies + policies.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.triggers.open_authentication_policies.policies.Element + _element.claims = AAZListArg( + options=["claims"], + nullable=True, + ) + _element.type = AAZStrArg( + options=["type"], + nullable=True, + enum={"AAD": "AAD"}, + ) + + claims = cls._args_schema.access_control.triggers.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.triggers.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrArg( + options=["name"], + nullable=True, + ) + _element.value = AAZStrArg( + options=["value"], + nullable=True, + ) + + workflow_management = cls._args_schema.access_control.workflow_management + workflow_management.allowed_caller_ip_addresses = AAZListArg( + options=["allowed-caller-ip-addresses"], + nullable=True, + ) + workflow_management.open_authentication_policies = AAZObjectArg( + options=["open-authentication-policies"], + nullable=True, + ) + + allowed_caller_ip_addresses = cls._args_schema.access_control.workflow_management.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.workflow_management.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrArg( + options=["address-range"], + nullable=True, + ) + + open_authentication_policies = cls._args_schema.access_control.workflow_management.open_authentication_policies + open_authentication_policies.policies = AAZDictArg( + options=["policies"], + nullable=True, + ) + + policies = cls._args_schema.access_control.workflow_management.open_authentication_policies.policies + policies.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.workflow_management.open_authentication_policies.policies.Element + _element.claims = AAZListArg( + options=["claims"], + nullable=True, + ) + _element.type = AAZStrArg( + options=["type"], + nullable=True, + enum={"AAD": "AAD"}, + ) + + claims = cls._args_schema.access_control.workflow_management.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.access_control.workflow_management.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrArg( + options=["name"], + nullable=True, + ) + _element.value = AAZStrArg( + options=["value"], + nullable=True, + ) + + endpoints_configuration = cls._args_schema.endpoints_configuration + endpoints_configuration.connector = AAZObjectArg( + options=["connector"], + help="The connector endpoints.", + nullable=True, + ) + endpoints_configuration.workflow = AAZObjectArg( + options=["workflow"], + help="The workflow endpoints.", + nullable=True, + ) + + connector = cls._args_schema.endpoints_configuration.connector + connector.access_endpoint_ip_addresses = AAZListArg( + options=["access-endpoint-ip-addresses"], + nullable=True, + ) + connector.outgoing_ip_addresses = AAZListArg( + options=["outgoing-ip-addresses"], + nullable=True, + ) + + access_endpoint_ip_addresses = cls._args_schema.endpoints_configuration.connector.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.endpoints_configuration.connector.access_endpoint_ip_addresses.Element + _element.address = AAZStrArg( + options=["address"], + nullable=True, + ) + + outgoing_ip_addresses = cls._args_schema.endpoints_configuration.connector.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.endpoints_configuration.connector.outgoing_ip_addresses.Element + _element.address = AAZStrArg( + options=["address"], + nullable=True, + ) + + workflow = cls._args_schema.endpoints_configuration.workflow + workflow.access_endpoint_ip_addresses = AAZListArg( + options=["access-endpoint-ip-addresses"], + nullable=True, + ) + workflow.outgoing_ip_addresses = AAZListArg( + options=["outgoing-ip-addresses"], + nullable=True, + ) + + access_endpoint_ip_addresses = cls._args_schema.endpoints_configuration.workflow.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.endpoints_configuration.workflow.access_endpoint_ip_addresses.Element + _element.address = AAZStrArg( + options=["address"], + nullable=True, + ) + + outgoing_ip_addresses = cls._args_schema.endpoints_configuration.workflow.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.endpoints_configuration.workflow.outgoing_ip_addresses.Element + _element.address = AAZStrArg( + options=["address"], + nullable=True, + ) + + integration_account = cls._args_schema.integration_account + integration_account.id = AAZStrArg( + options=["id"], + nullable=True, + ) + + integration_service_environment = cls._args_schema.integration_service_environment + integration_service_environment.id = AAZStrArg( + options=["id"], + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkflowsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.WorkflowsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkflowsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workflowName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_workflow_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WorkflowsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workflowName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_workflow_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".identity.userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("accessControl", AAZObjectType, ".access_control") + properties.set_prop("definition", AAZFreeFormDictType, ".definition") + properties.set_prop("endpointsConfiguration", AAZObjectType, ".endpoints_configuration") + properties.set_prop("integrationAccount", AAZObjectType, ".integration_account") + properties.set_prop("integrationServiceEnvironment", AAZObjectType, ".integration_service_environment") + properties.set_prop("state", AAZStrType, ".state") + + access_control = _builder.get(".properties.accessControl") + if access_control is not None: + access_control.set_prop("actions", AAZObjectType, ".actions") + access_control.set_prop("contents", AAZObjectType, ".contents") + access_control.set_prop("triggers", AAZObjectType, ".triggers") + access_control.set_prop("workflowManagement", AAZObjectType, ".workflow_management") + + actions = _builder.get(".properties.accessControl.actions") + if actions is not None: + actions.set_prop("allowedCallerIpAddresses", AAZListType, ".allowed_caller_ip_addresses") + actions.set_prop("openAuthenticationPolicies", AAZObjectType, ".open_authentication_policies") + + allowed_caller_ip_addresses = _builder.get(".properties.accessControl.actions.allowedCallerIpAddresses") + if allowed_caller_ip_addresses is not None: + allowed_caller_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.actions.allowedCallerIpAddresses[]") + if _elements is not None: + _elements.set_prop("addressRange", AAZStrType, ".address_range") + + open_authentication_policies = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies") + if open_authentication_policies is not None: + open_authentication_policies.set_prop("policies", AAZDictType, ".policies") + + policies = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies.policies") + if policies is not None: + policies.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies.policies{}") + if _elements is not None: + _elements.set_prop("claims", AAZListType, ".claims") + _elements.set_prop("type", AAZStrType, ".type") + + claims = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies.policies{}.claims") + if claims is not None: + claims.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.actions.openAuthenticationPolicies.policies{}.claims[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("value", AAZStrType, ".value") + + contents = _builder.get(".properties.accessControl.contents") + if contents is not None: + contents.set_prop("allowedCallerIpAddresses", AAZListType, ".allowed_caller_ip_addresses") + contents.set_prop("openAuthenticationPolicies", AAZObjectType, ".open_authentication_policies") + + allowed_caller_ip_addresses = _builder.get(".properties.accessControl.contents.allowedCallerIpAddresses") + if allowed_caller_ip_addresses is not None: + allowed_caller_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.contents.allowedCallerIpAddresses[]") + if _elements is not None: + _elements.set_prop("addressRange", AAZStrType, ".address_range") + + open_authentication_policies = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies") + if open_authentication_policies is not None: + open_authentication_policies.set_prop("policies", AAZDictType, ".policies") + + policies = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies.policies") + if policies is not None: + policies.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies.policies{}") + if _elements is not None: + _elements.set_prop("claims", AAZListType, ".claims") + _elements.set_prop("type", AAZStrType, ".type") + + claims = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies.policies{}.claims") + if claims is not None: + claims.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.contents.openAuthenticationPolicies.policies{}.claims[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("value", AAZStrType, ".value") + + triggers = _builder.get(".properties.accessControl.triggers") + if triggers is not None: + triggers.set_prop("allowedCallerIpAddresses", AAZListType, ".allowed_caller_ip_addresses") + triggers.set_prop("openAuthenticationPolicies", AAZObjectType, ".open_authentication_policies") + + allowed_caller_ip_addresses = _builder.get(".properties.accessControl.triggers.allowedCallerIpAddresses") + if allowed_caller_ip_addresses is not None: + allowed_caller_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.triggers.allowedCallerIpAddresses[]") + if _elements is not None: + _elements.set_prop("addressRange", AAZStrType, ".address_range") + + open_authentication_policies = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies") + if open_authentication_policies is not None: + open_authentication_policies.set_prop("policies", AAZDictType, ".policies") + + policies = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies.policies") + if policies is not None: + policies.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies.policies{}") + if _elements is not None: + _elements.set_prop("claims", AAZListType, ".claims") + _elements.set_prop("type", AAZStrType, ".type") + + claims = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies.policies{}.claims") + if claims is not None: + claims.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.triggers.openAuthenticationPolicies.policies{}.claims[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("value", AAZStrType, ".value") + + workflow_management = _builder.get(".properties.accessControl.workflowManagement") + if workflow_management is not None: + workflow_management.set_prop("allowedCallerIpAddresses", AAZListType, ".allowed_caller_ip_addresses") + workflow_management.set_prop("openAuthenticationPolicies", AAZObjectType, ".open_authentication_policies") + + allowed_caller_ip_addresses = _builder.get(".properties.accessControl.workflowManagement.allowedCallerIpAddresses") + if allowed_caller_ip_addresses is not None: + allowed_caller_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.workflowManagement.allowedCallerIpAddresses[]") + if _elements is not None: + _elements.set_prop("addressRange", AAZStrType, ".address_range") + + open_authentication_policies = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies") + if open_authentication_policies is not None: + open_authentication_policies.set_prop("policies", AAZDictType, ".policies") + + policies = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies.policies") + if policies is not None: + policies.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies.policies{}") + if _elements is not None: + _elements.set_prop("claims", AAZListType, ".claims") + _elements.set_prop("type", AAZStrType, ".type") + + claims = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies.policies{}.claims") + if claims is not None: + claims.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.accessControl.workflowManagement.openAuthenticationPolicies.policies{}.claims[]") + if _elements is not None: + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("value", AAZStrType, ".value") + + definition = _builder.get(".properties.definition") + if definition is not None: + definition.set_anytype_elements(".") + + endpoints_configuration = _builder.get(".properties.endpointsConfiguration") + if endpoints_configuration is not None: + endpoints_configuration.set_prop("connector", AAZObjectType, ".connector") + endpoints_configuration.set_prop("workflow", AAZObjectType, ".workflow") + + connector = _builder.get(".properties.endpointsConfiguration.connector") + if connector is not None: + connector.set_prop("accessEndpointIpAddresses", AAZListType, ".access_endpoint_ip_addresses") + connector.set_prop("outgoingIpAddresses", AAZListType, ".outgoing_ip_addresses") + + access_endpoint_ip_addresses = _builder.get(".properties.endpointsConfiguration.connector.accessEndpointIpAddresses") + if access_endpoint_ip_addresses is not None: + access_endpoint_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.endpointsConfiguration.connector.accessEndpointIpAddresses[]") + if _elements is not None: + _elements.set_prop("address", AAZStrType, ".address") + + outgoing_ip_addresses = _builder.get(".properties.endpointsConfiguration.connector.outgoingIpAddresses") + if outgoing_ip_addresses is not None: + outgoing_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.endpointsConfiguration.connector.outgoingIpAddresses[]") + if _elements is not None: + _elements.set_prop("address", AAZStrType, ".address") + + workflow = _builder.get(".properties.endpointsConfiguration.workflow") + if workflow is not None: + workflow.set_prop("accessEndpointIpAddresses", AAZListType, ".access_endpoint_ip_addresses") + workflow.set_prop("outgoingIpAddresses", AAZListType, ".outgoing_ip_addresses") + + access_endpoint_ip_addresses = _builder.get(".properties.endpointsConfiguration.workflow.accessEndpointIpAddresses") + if access_endpoint_ip_addresses is not None: + access_endpoint_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.endpointsConfiguration.workflow.accessEndpointIpAddresses[]") + if _elements is not None: + _elements.set_prop("address", AAZStrType, ".address") + + outgoing_ip_addresses = _builder.get(".properties.endpointsConfiguration.workflow.outgoingIpAddresses") + if outgoing_ip_addresses is not None: + outgoing_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.endpointsConfiguration.workflow.outgoingIpAddresses[]") + if _elements is not None: + _elements.set_prop("address", AAZStrType, ".address") + + integration_account = _builder.get(".properties.integrationAccount") + if integration_account is not None: + integration_account.set_prop("id", AAZStrType, ".id") + + integration_service_environment = _builder.get(".properties.integrationServiceEnvironment") + if integration_service_environment is not None: + integration_service_environment.set_prop("id", AAZStrType, ".id") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_flow_access_control_configuration_policy_read = None + + @classmethod + def _build_schema_flow_access_control_configuration_policy_read(cls, _schema): + if cls._schema_flow_access_control_configuration_policy_read is not None: + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + return + + cls._schema_flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read = AAZObjectType() + + flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read + flow_access_control_configuration_policy_read.allowed_caller_ip_addresses = AAZListType( + serialized_name="allowedCallerIpAddresses", + ) + flow_access_control_configuration_policy_read.open_authentication_policies = AAZObjectType( + serialized_name="openAuthenticationPolicies", + ) + + allowed_caller_ip_addresses = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrType( + serialized_name="addressRange", + ) + + open_authentication_policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies + open_authentication_policies.policies = AAZDictType() + + policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies + policies.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element + _element.claims = AAZListType() + _element.type = AAZStrType() + + claims = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrType() + _element.value = AAZStrType() + + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + + _schema_flow_endpoints_read = None + + @classmethod + def _build_schema_flow_endpoints_read(cls, _schema): + if cls._schema_flow_endpoints_read is not None: + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + return + + cls._schema_flow_endpoints_read = _schema_flow_endpoints_read = AAZObjectType() + + flow_endpoints_read = _schema_flow_endpoints_read + flow_endpoints_read.access_endpoint_ip_addresses = AAZListType( + serialized_name="accessEndpointIpAddresses", + ) + flow_endpoints_read.outgoing_ip_addresses = AAZListType( + serialized_name="outgoingIpAddresses", + ) + + access_endpoint_ip_addresses = _schema_flow_endpoints_read.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(access_endpoint_ip_addresses.Element) + + outgoing_ip_addresses = _schema_flow_endpoints_read.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(outgoing_ip_addresses.Element) + + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + + _schema.address = cls._schema_ip_address_read.address + + _schema_resource_reference_read = None + + @classmethod + def _build_schema_resource_reference_read(cls, _schema): + if cls._schema_resource_reference_read is not None: + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + return + + cls._schema_resource_reference_read = _schema_resource_reference_read = AAZObjectType() + + resource_reference_read = _schema_resource_reference_read + resource_reference_read.id = AAZStrType() + resource_reference_read.name = AAZStrType( + flags={"read_only": True}, + ) + resource_reference_read.type = AAZStrType( + flags={"read_only": True}, + ) + + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + + _schema_workflow_read = None + + @classmethod + def _build_schema_workflow_read(cls, _schema): + if cls._schema_workflow_read is not None: + _schema.id = cls._schema_workflow_read.id + _schema.identity = cls._schema_workflow_read.identity + _schema.location = cls._schema_workflow_read.location + _schema.name = cls._schema_workflow_read.name + _schema.properties = cls._schema_workflow_read.properties + _schema.tags = cls._schema_workflow_read.tags + _schema.type = cls._schema_workflow_read.type + return + + cls._schema_workflow_read = _schema_workflow_read = AAZObjectType() + + workflow_read = _schema_workflow_read + workflow_read.id = AAZStrType( + flags={"read_only": True}, + ) + workflow_read.identity = AAZObjectType() + workflow_read.location = AAZStrType() + workflow_read.name = AAZStrType( + flags={"read_only": True}, + ) + workflow_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + workflow_read.tags = AAZDictType() + workflow_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_workflow_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = _schema_workflow_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = _schema_workflow_read.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = _schema_workflow_read.properties + properties.access_control = AAZObjectType( + serialized_name="accessControl", + ) + properties.access_endpoint = AAZStrType( + serialized_name="accessEndpoint", + flags={"read_only": True}, + ) + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.definition = AAZFreeFormDictType() + properties.endpoints_configuration = AAZObjectType( + serialized_name="endpointsConfiguration", + ) + properties.integration_account = AAZObjectType( + serialized_name="integrationAccount", + ) + cls._build_schema_resource_reference_read(properties.integration_account) + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + cls._build_schema_resource_reference_read(properties.integration_service_environment) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.sku = AAZObjectType() + properties.state = AAZStrType() + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + access_control = _schema_workflow_read.properties.access_control + access_control.actions = AAZObjectType() + cls._build_schema_flow_access_control_configuration_policy_read(access_control.actions) + access_control.contents = AAZObjectType() + cls._build_schema_flow_access_control_configuration_policy_read(access_control.contents) + access_control.triggers = AAZObjectType() + cls._build_schema_flow_access_control_configuration_policy_read(access_control.triggers) + access_control.workflow_management = AAZObjectType( + serialized_name="workflowManagement", + ) + cls._build_schema_flow_access_control_configuration_policy_read(access_control.workflow_management) + + endpoints_configuration = _schema_workflow_read.properties.endpoints_configuration + endpoints_configuration.connector = AAZObjectType() + cls._build_schema_flow_endpoints_read(endpoints_configuration.connector) + endpoints_configuration.workflow = AAZObjectType() + cls._build_schema_flow_endpoints_read(endpoints_configuration.workflow) + + sku = _schema_workflow_read.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.plan = AAZObjectType() + cls._build_schema_resource_reference_read(sku.plan) + + tags = _schema_workflow_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_workflow_read.id + _schema.identity = cls._schema_workflow_read.identity + _schema.location = cls._schema_workflow_read.location + _schema.name = cls._schema_workflow_read.name + _schema.properties = cls._schema_workflow_read.properties + _schema.tags = cls._schema_workflow_read.tags + _schema.type = cls._schema_workflow_read.type + + +__all__ = ["Update"] diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/identity/__cmd_group.py b/src/logic/azext_logic/aaz/latest/logic/workflow/identity/__cmd_group.py new file mode 100644 index 00000000000..c88df135992 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/identity/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "logic workflow identity", +) +class __CMDGroup(AAZCommandGroup): + """Manage workflow identity + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/logic/azext_logic/vendored_sdks/logic/_version.py b/src/logic/azext_logic/aaz/latest/logic/workflow/identity/__init__.py similarity index 57% rename from src/logic/azext_logic/vendored_sdks/logic/_version.py rename to src/logic/azext_logic/aaz/latest/logic/workflow/identity/__init__.py index 9f8bb24bdd9..9fa7324972a 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/_version.py +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/identity/__init__.py @@ -1,9 +1,13 @@ -# 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. -# -------------------------------------------------------------------------- +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- -VERSION = "10.0.0" +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._assign import * +from ._remove import * diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/identity/_assign.py b/src/logic/azext_logic/aaz/latest/logic/workflow/identity/_assign.py new file mode 100644 index 00000000000..967c7b3d316 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/identity/_assign.py @@ -0,0 +1,570 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic workflow identity assign", +) +class Assign(AAZCommand): + """Assign identities + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/workflows/{}", "2019-05-01", "identity"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self.SubresourceSelector(ctx=self.ctx, name="subresource") + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="The workflow name.", + required=True, + ) + + # define Arg Group "Workflow.identity" + + _args_schema = cls._args_schema + _args_schema.type = AAZStrArg( + options=["--type"], + arg_group="Workflow.identity", + help="Type of managed service identity. The type 'SystemAssigned' includes an implicitly created identity. The type 'None' will remove any identities from the resource.", + required=True, + enum={"None": "None", "SystemAssigned": "SystemAssigned", "UserAssigned": "UserAssigned"}, + ) + _args_schema.user_assigned_identities = AAZDictArg( + options=["--user-assigned-identities"], + arg_group="Workflow.identity", + help="The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}", + ) + + user_assigned_identities = cls._args_schema.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg( + blank={}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkflowsGet(ctx=self.ctx)() + self.pre_instance_create() + self.InstanceCreateByJson(ctx=self.ctx)() + self.post_instance_create(self.ctx.selectors.subresource.required()) + self.WorkflowsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_create(self): + pass + + @register_callback + def post_instance_create(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.selectors.subresource.required(), client_flatten=True) + return result + + class SubresourceSelector(AAZJsonSelector): + + def _get(self): + result = self.ctx.vars.instance + return result.identity + + def _set(self, value): + result = self.ctx.vars.instance + result.identity = value + return + + class WorkflowsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workflowName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _AssignHelper._build_schema_workflow_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WorkflowsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workflowName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _AssignHelper._build_schema_workflow_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceCreateByJson(AAZJsonInstanceCreateOperation): + + def __call__(self, *args, **kwargs): + self.ctx.selectors.subresource.set(self._create_instance()) + + def _create_instance(self): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType + ) + _builder.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + return _instance_value + + +class _AssignHelper: + """Helper class for Assign""" + + _schema_flow_access_control_configuration_policy_read = None + + @classmethod + def _build_schema_flow_access_control_configuration_policy_read(cls, _schema): + if cls._schema_flow_access_control_configuration_policy_read is not None: + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + return + + cls._schema_flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read = AAZObjectType() + + flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read + flow_access_control_configuration_policy_read.allowed_caller_ip_addresses = AAZListType( + serialized_name="allowedCallerIpAddresses", + ) + flow_access_control_configuration_policy_read.open_authentication_policies = AAZObjectType( + serialized_name="openAuthenticationPolicies", + ) + + allowed_caller_ip_addresses = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrType( + serialized_name="addressRange", + ) + + open_authentication_policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies + open_authentication_policies.policies = AAZDictType() + + policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies + policies.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element + _element.claims = AAZListType() + _element.type = AAZStrType() + + claims = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrType() + _element.value = AAZStrType() + + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + + _schema_flow_endpoints_read = None + + @classmethod + def _build_schema_flow_endpoints_read(cls, _schema): + if cls._schema_flow_endpoints_read is not None: + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + return + + cls._schema_flow_endpoints_read = _schema_flow_endpoints_read = AAZObjectType() + + flow_endpoints_read = _schema_flow_endpoints_read + flow_endpoints_read.access_endpoint_ip_addresses = AAZListType( + serialized_name="accessEndpointIpAddresses", + ) + flow_endpoints_read.outgoing_ip_addresses = AAZListType( + serialized_name="outgoingIpAddresses", + ) + + access_endpoint_ip_addresses = _schema_flow_endpoints_read.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(access_endpoint_ip_addresses.Element) + + outgoing_ip_addresses = _schema_flow_endpoints_read.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(outgoing_ip_addresses.Element) + + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + + _schema.address = cls._schema_ip_address_read.address + + _schema_resource_reference_read = None + + @classmethod + def _build_schema_resource_reference_read(cls, _schema): + if cls._schema_resource_reference_read is not None: + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + return + + cls._schema_resource_reference_read = _schema_resource_reference_read = AAZObjectType() + + resource_reference_read = _schema_resource_reference_read + resource_reference_read.id = AAZStrType() + resource_reference_read.name = AAZStrType( + flags={"read_only": True}, + ) + resource_reference_read.type = AAZStrType( + flags={"read_only": True}, + ) + + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + + _schema_workflow_read = None + + @classmethod + def _build_schema_workflow_read(cls, _schema): + if cls._schema_workflow_read is not None: + _schema.id = cls._schema_workflow_read.id + _schema.identity = cls._schema_workflow_read.identity + _schema.location = cls._schema_workflow_read.location + _schema.name = cls._schema_workflow_read.name + _schema.properties = cls._schema_workflow_read.properties + _schema.tags = cls._schema_workflow_read.tags + _schema.type = cls._schema_workflow_read.type + return + + cls._schema_workflow_read = _schema_workflow_read = AAZObjectType() + + workflow_read = _schema_workflow_read + workflow_read.id = AAZStrType( + flags={"read_only": True}, + ) + workflow_read.identity = AAZObjectType() + workflow_read.location = AAZStrType() + workflow_read.name = AAZStrType( + flags={"read_only": True}, + ) + workflow_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + workflow_read.tags = AAZDictType() + workflow_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_workflow_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = _schema_workflow_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = _schema_workflow_read.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = _schema_workflow_read.properties + properties.access_control = AAZObjectType( + serialized_name="accessControl", + ) + properties.access_endpoint = AAZStrType( + serialized_name="accessEndpoint", + flags={"read_only": True}, + ) + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.definition = AAZFreeFormDictType() + properties.endpoints_configuration = AAZObjectType( + serialized_name="endpointsConfiguration", + ) + properties.integration_account = AAZObjectType( + serialized_name="integrationAccount", + ) + cls._build_schema_resource_reference_read(properties.integration_account) + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + cls._build_schema_resource_reference_read(properties.integration_service_environment) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.sku = AAZObjectType() + properties.state = AAZStrType() + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + access_control = _schema_workflow_read.properties.access_control + access_control.actions = AAZObjectType() + cls._build_schema_flow_access_control_configuration_policy_read(access_control.actions) + access_control.contents = AAZObjectType() + cls._build_schema_flow_access_control_configuration_policy_read(access_control.contents) + access_control.triggers = AAZObjectType() + cls._build_schema_flow_access_control_configuration_policy_read(access_control.triggers) + access_control.workflow_management = AAZObjectType( + serialized_name="workflowManagement", + ) + cls._build_schema_flow_access_control_configuration_policy_read(access_control.workflow_management) + + endpoints_configuration = _schema_workflow_read.properties.endpoints_configuration + endpoints_configuration.connector = AAZObjectType() + cls._build_schema_flow_endpoints_read(endpoints_configuration.connector) + endpoints_configuration.workflow = AAZObjectType() + cls._build_schema_flow_endpoints_read(endpoints_configuration.workflow) + + sku = _schema_workflow_read.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.plan = AAZObjectType() + cls._build_schema_resource_reference_read(sku.plan) + + tags = _schema_workflow_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_workflow_read.id + _schema.identity = cls._schema_workflow_read.identity + _schema.location = cls._schema_workflow_read.location + _schema.name = cls._schema_workflow_read.name + _schema.properties = cls._schema_workflow_read.properties + _schema.tags = cls._schema_workflow_read.tags + _schema.type = cls._schema_workflow_read.type + + +__all__ = ["Assign"] diff --git a/src/logic/azext_logic/aaz/latest/logic/workflow/identity/_remove.py b/src/logic/azext_logic/aaz/latest/logic/workflow/identity/_remove.py new file mode 100644 index 00000000000..1e5366dcc56 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/workflow/identity/_remove.py @@ -0,0 +1,572 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic workflow identity remove", +) +class Remove(AAZCommand): + """Remove identities + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/workflows/{}", "2019-05-01", "identity"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self.SubresourceSelector(ctx=self.ctx, name="subresource") + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="The workflow name.", + required=True, + ) + + # define Arg Group "Workflow.identity" + + _args_schema = cls._args_schema + _args_schema.type = AAZStrArg( + options=["--type"], + arg_group="Workflow.identity", + help="Type of managed service identity. The type 'SystemAssigned' includes an implicitly created identity. The type 'None' will remove any identities from the resource.", + enum={"None": "None", "SystemAssigned": "SystemAssigned", "UserAssigned": "UserAssigned"}, + ) + _args_schema.user_assigned_identities = AAZDictArg( + options=["--user-assigned-identities"], + arg_group="Workflow.identity", + help="The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}", + nullable=True, + ) + + user_assigned_identities = cls._args_schema.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg( + nullable=True, + blank={}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkflowsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.selectors.subresource.required()) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.post_instance_update(self.ctx.selectors.subresource.required()) + self.WorkflowsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.selectors.subresource.required(), client_flatten=True) + return result + + class SubresourceSelector(AAZJsonSelector): + + def _get(self): + result = self.ctx.vars.instance + return result.identity + + def _set(self, value): + result = self.ctx.vars.instance + result.identity = value + return + + class WorkflowsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workflowName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _RemoveHelper._build_schema_workflow_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WorkflowsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workflowName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _RemoveHelper._build_schema_workflow_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.selectors.subresource.required()) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + return _instance_value + + +class _RemoveHelper: + """Helper class for Remove""" + + _schema_flow_access_control_configuration_policy_read = None + + @classmethod + def _build_schema_flow_access_control_configuration_policy_read(cls, _schema): + if cls._schema_flow_access_control_configuration_policy_read is not None: + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + return + + cls._schema_flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read = AAZObjectType() + + flow_access_control_configuration_policy_read = _schema_flow_access_control_configuration_policy_read + flow_access_control_configuration_policy_read.allowed_caller_ip_addresses = AAZListType( + serialized_name="allowedCallerIpAddresses", + ) + flow_access_control_configuration_policy_read.open_authentication_policies = AAZObjectType( + serialized_name="openAuthenticationPolicies", + ) + + allowed_caller_ip_addresses = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + allowed_caller_ip_addresses.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses.Element + _element.address_range = AAZStrType( + serialized_name="addressRange", + ) + + open_authentication_policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies + open_authentication_policies.policies = AAZDictType() + + policies = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies + policies.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element + _element.claims = AAZListType() + _element.type = AAZStrType() + + claims = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims + claims.Element = AAZObjectType() + + _element = _schema_flow_access_control_configuration_policy_read.open_authentication_policies.policies.Element.claims.Element + _element.name = AAZStrType() + _element.value = AAZStrType() + + _schema.allowed_caller_ip_addresses = cls._schema_flow_access_control_configuration_policy_read.allowed_caller_ip_addresses + _schema.open_authentication_policies = cls._schema_flow_access_control_configuration_policy_read.open_authentication_policies + + _schema_flow_endpoints_read = None + + @classmethod + def _build_schema_flow_endpoints_read(cls, _schema): + if cls._schema_flow_endpoints_read is not None: + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + return + + cls._schema_flow_endpoints_read = _schema_flow_endpoints_read = AAZObjectType() + + flow_endpoints_read = _schema_flow_endpoints_read + flow_endpoints_read.access_endpoint_ip_addresses = AAZListType( + serialized_name="accessEndpointIpAddresses", + ) + flow_endpoints_read.outgoing_ip_addresses = AAZListType( + serialized_name="outgoingIpAddresses", + ) + + access_endpoint_ip_addresses = _schema_flow_endpoints_read.access_endpoint_ip_addresses + access_endpoint_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(access_endpoint_ip_addresses.Element) + + outgoing_ip_addresses = _schema_flow_endpoints_read.outgoing_ip_addresses + outgoing_ip_addresses.Element = AAZObjectType() + cls._build_schema_ip_address_read(outgoing_ip_addresses.Element) + + _schema.access_endpoint_ip_addresses = cls._schema_flow_endpoints_read.access_endpoint_ip_addresses + _schema.outgoing_ip_addresses = cls._schema_flow_endpoints_read.outgoing_ip_addresses + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + + _schema.address = cls._schema_ip_address_read.address + + _schema_resource_reference_read = None + + @classmethod + def _build_schema_resource_reference_read(cls, _schema): + if cls._schema_resource_reference_read is not None: + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + return + + cls._schema_resource_reference_read = _schema_resource_reference_read = AAZObjectType() + + resource_reference_read = _schema_resource_reference_read + resource_reference_read.id = AAZStrType() + resource_reference_read.name = AAZStrType( + flags={"read_only": True}, + ) + resource_reference_read.type = AAZStrType( + flags={"read_only": True}, + ) + + _schema.id = cls._schema_resource_reference_read.id + _schema.name = cls._schema_resource_reference_read.name + _schema.type = cls._schema_resource_reference_read.type + + _schema_workflow_read = None + + @classmethod + def _build_schema_workflow_read(cls, _schema): + if cls._schema_workflow_read is not None: + _schema.id = cls._schema_workflow_read.id + _schema.identity = cls._schema_workflow_read.identity + _schema.location = cls._schema_workflow_read.location + _schema.name = cls._schema_workflow_read.name + _schema.properties = cls._schema_workflow_read.properties + _schema.tags = cls._schema_workflow_read.tags + _schema.type = cls._schema_workflow_read.type + return + + cls._schema_workflow_read = _schema_workflow_read = AAZObjectType() + + workflow_read = _schema_workflow_read + workflow_read.id = AAZStrType( + flags={"read_only": True}, + ) + workflow_read.identity = AAZObjectType() + workflow_read.location = AAZStrType() + workflow_read.name = AAZStrType( + flags={"read_only": True}, + ) + workflow_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + workflow_read.tags = AAZDictType() + workflow_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_workflow_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = _schema_workflow_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = _schema_workflow_read.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = _schema_workflow_read.properties + properties.access_control = AAZObjectType( + serialized_name="accessControl", + ) + properties.access_endpoint = AAZStrType( + serialized_name="accessEndpoint", + flags={"read_only": True}, + ) + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.definition = AAZFreeFormDictType() + properties.endpoints_configuration = AAZObjectType( + serialized_name="endpointsConfiguration", + ) + properties.integration_account = AAZObjectType( + serialized_name="integrationAccount", + ) + cls._build_schema_resource_reference_read(properties.integration_account) + properties.integration_service_environment = AAZObjectType( + serialized_name="integrationServiceEnvironment", + ) + cls._build_schema_resource_reference_read(properties.integration_service_environment) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.sku = AAZObjectType() + properties.state = AAZStrType() + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + access_control = _schema_workflow_read.properties.access_control + access_control.actions = AAZObjectType() + cls._build_schema_flow_access_control_configuration_policy_read(access_control.actions) + access_control.contents = AAZObjectType() + cls._build_schema_flow_access_control_configuration_policy_read(access_control.contents) + access_control.triggers = AAZObjectType() + cls._build_schema_flow_access_control_configuration_policy_read(access_control.triggers) + access_control.workflow_management = AAZObjectType( + serialized_name="workflowManagement", + ) + cls._build_schema_flow_access_control_configuration_policy_read(access_control.workflow_management) + + endpoints_configuration = _schema_workflow_read.properties.endpoints_configuration + endpoints_configuration.connector = AAZObjectType() + cls._build_schema_flow_endpoints_read(endpoints_configuration.connector) + endpoints_configuration.workflow = AAZObjectType() + cls._build_schema_flow_endpoints_read(endpoints_configuration.workflow) + + sku = _schema_workflow_read.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.plan = AAZObjectType() + cls._build_schema_resource_reference_read(sku.plan) + + tags = _schema_workflow_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_workflow_read.id + _schema.identity = cls._schema_workflow_read.identity + _schema.location = cls._schema_workflow_read.location + _schema.name = cls._schema_workflow_read.name + _schema.properties = cls._schema_workflow_read.properties + _schema.tags = cls._schema_workflow_read.tags + _schema.type = cls._schema_workflow_read.type + + +__all__ = ["Remove"] diff --git a/src/logic/azext_logic/azext_metadata.json b/src/logic/azext_logic/azext_metadata.json index 9491320bc7d..a6845fefaed 100644 --- a/src/logic/azext_logic/azext_metadata.json +++ b/src/logic/azext_logic/azext_metadata.json @@ -1,4 +1,3 @@ { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.48.0" + "azext.minCliCoreVersion": "2.54.0" } \ No newline at end of file diff --git a/src/logic/azext_logic/commands.py b/src/logic/azext_logic/commands.py index 42f0c1a991e..8e3fcb65480 100644 --- a/src/logic/azext_logic/commands.py +++ b/src/logic/azext_logic/commands.py @@ -1,12 +1,36 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools # -------------------------------------------------------------------------------------------- -# pylint: disable=wildcard-import -# pylint: disable=unused-wildcard-import - -from .generated.commands import * # noqa: F403 -try: - from .manual.commands import * # noqa: F403 -except ImportError: - pass + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements, line-too-long + +# from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): # pylint: disable=unused-argument + with self.command_group('logic integration-account'): + from azext_logic.custom import IntegrationAccountCreate, IntegrationAccountUpdate, IntegrationAccountImport, IntegrationAccountList + self.command_table['logic integration-account create'] = IntegrationAccountCreate(loader=self) + self.command_table['logic integration-account update'] = IntegrationAccountUpdate(loader=self) + self.command_table['logic integration-account import'] = IntegrationAccountImport(loader=self) + self.command_table['logic integration-account list'] = IntegrationAccountList(loader=self) + + with self.command_group('logic integration-account map'): + from azext_logic.custom import MapCreate, MapUpdate + self.command_table['logic integration-account map create'] = MapCreate(loader=self) + self.command_table['logic integration-account map update'] = MapUpdate(loader=self) + + with self.command_group('logic workflow'): + from azext_logic.custom import WorkflowCreate, WorkflowUpdate, WorkflowList + self.command_table['logic workflow create'] = WorkflowCreate(loader=self) + self.command_table['logic workflow update'] = WorkflowUpdate(loader=self) + self.command_table['logic workflow list'] = WorkflowList(loader=self) + + with self.command_group('logic workflow identity'): + from azext_logic.custom import IdentityAssign, IdentityRemove + self.command_table['logic workflow identity assign'] = IdentityAssign(loader=self) + self.command_table['logic workflow identity remove'] = IdentityRemove(loader=self) diff --git a/src/logic/azext_logic/custom.py b/src/logic/azext_logic/custom.py index d1fd3543ed0..5cd0ada6dd9 100644 --- a/src/logic/azext_logic/custom.py +++ b/src/logic/azext_logic/custom.py @@ -1,12 +1,303 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools # -------------------------------------------------------------------------------------------- -# pylint: disable=wildcard-import -# pylint: disable=unused-wildcard-import - -from .generated.custom import * # noqa: F403 -try: - from .manual.custom import * # noqa: F403 -except ImportError: - pass + +# pylint: disable=too-many-lines, wildcard-import +# pylint: disable=too-many-statements, line-too-long, protected-access + +from knack.log import get_logger +from azure.cli.core.aaz import has_value, register_command +from azure.cli.core.azclierror import RequiredArgumentMissingError +from azext_logic.aaz.latest.logic.workflow import Create as _WorkflowCreate +from azext_logic.aaz.latest.logic.workflow import Update as _WorkflowUpdate +from azext_logic.aaz.latest.logic.workflow import List as _WorkflowList +from azext_logic.aaz.latest.logic.workflow.identity import Assign as _IdentityAssign +from azext_logic.aaz.latest.logic.workflow.identity import Remove as _IdentityRemove +from azext_logic.aaz.latest.logic.integration_account import Create as _IntegrationAccountCreate +from azext_logic.aaz.latest.logic.integration_account import Update as _IntegrationAccountUpdate +from azext_logic.aaz.latest.logic.integration_account import List as _IntegrationAccountList +from azext_logic.aaz.latest.logic.integration_account.map import Create as _MapCreate +from azext_logic.aaz.latest.logic.integration_account.map import Update as _MapUpdate + +logger = get_logger(__name__) + + +class MapCreate(_MapCreate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZFileArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.map_content = AAZFileArg( + options=["--map-content"], + help="The content.", + ) + args_schema.content._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + if has_value(args.map_content): + args.content = args.map_content + + +class MapUpdate(_MapUpdate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZFileArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.map_content = AAZFileArg( + options=["--map-content"], + help="The content.", + ) + args_schema.content._registered = False + return args_schema + + def pre_instance_update(self, instance): + if has_value(self.ctx.args.content_type): + return + if instance.properties.map_type in ['Xslt', 'Xslt20', 'Xslt30']: + instance.properties.content_type = 'application/xml' + if instance.properties.map_type == 'Liquid': + instance.properties.content_type = 'text/plain' + + +class IntegrationAccountCreate(_IntegrationAccountCreate): + def pre_operations(self): + args = self.ctx.args + if not has_value(args.state): + args.state = 'Enabled' + + +class IntegrationAccountUpdate(_IntegrationAccountUpdate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.name._id_part = None + return args_schema + + +@register_command( + "logic integration-account import", +) +class IntegrationAccountImport(_IntegrationAccountCreate): + """Import an integration account. + + :example: Import integration account + az logic integration-account import --name integration-account-name --resource-group rg --input-path integration.json + """ + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZFreeFormDictArg, AAZFreeFormDictArgFormat + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.input_path = AAZFreeFormDictArg( + options=["--input-path"], + help="Path to a intergration-account file", + required=True, + fmt=AAZFreeFormDictArgFormat() + ) + args_schema.state._registered = False + args_schema.integration_service_environment._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + if not has_value(args.state): + args.state = 'Enabled' + + if 'properties' not in args.input_path: + raise RequiredArgumentMissingError("--input-path does not contain a 'properties' key") + input_path = args.input_path.to_serialized_data() + args.tags = input_path.get('tags', args.tags) + args.sku = input_path.get('sku', {}).get('name', args.sku) + args.integration_service_environment = input_path['properties'].get('integration_service_environment', None) + args.state = input_path['properties'].get('state', 'Enabled') + + +class WorkflowCreate(_WorkflowCreate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZBoolArg, AAZListArg, AAZResourceIdArg, AAZResourceIdArgFormat + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.mi_system_assigned = AAZBoolArg( + options=["--mi-system-assigned"], + help="Enable system assigned identity" + ) + args_schema.mi_user_assigned = AAZListArg( + options=["--mi-user-assigned"], + help="Space separated resource IDs to add user-assigned identities.", + ) + args_schema.mi_user_assigned.Element = AAZResourceIdArg( + fmt=AAZResourceIdArgFormat(template="/subscriptions/{subscription}/resourceGroups/{resource_group}" + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{}") + ) + args_schema.identity._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + if 'definition' not in args.definition: + raise RequiredArgumentMissingError("--definition does not contain a 'definition' key") + definition = args.definition.to_serialized_data() + args.access_control = definition.get('accessControl', args.access_control) + args.definition = definition['definition'] + if args.mi_system_assigned: + args.identity.type = "SystemAssigned" + if has_value(args.mi_user_assigned): + args.identity.type = "UserAssigned" if not args.identity.type else "SystemAssigned,UserAssigned" + user_assigned_identities = {} + for identity in args.mi_user_assigned: + user_assigned_identities.update({ + identity.to_serialized_data(): {} + }) + args.identity.user_assigned_identities = user_assigned_identities + + +class WorkflowUpdate(_WorkflowUpdate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.name._id_part = None + args_schema.identity._registered = False + args_schema.endpoints_configuration._registered = False + args_schema.integration_service_environment._registered = False + args_schema.integration_account._registered = False + args_schema.access_control._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + if has_value(args.definition) and 'definition' not in args.definition: + raise RequiredArgumentMissingError("--definition does not contain a 'definition' key") + if has_value(args.definition): + definition = args.definition.to_serialized_data() + args.definition = definition['definition'] + args.access_control = definition.get('accessControl', args.access_control) + + def pre_instance_update(self, instance): + self.ctx.args.location = instance.location + + +class IdentityAssign(_IdentityAssign): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZBoolArg, AAZListArg, AAZResourceIdArg, AAZResourceIdArgFormat + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.system_assigned = AAZBoolArg( + options=["--system-assigned"], + help="Enable system assigned identity" + ) + args_schema.user_assigned = AAZListArg( + options=["--user-assigned"], + help="Space separated resource IDs to add user-assigned identities.", + ) + args_schema.user_assigned.Element = AAZResourceIdArg( + fmt=AAZResourceIdArgFormat(template="/subscriptions/{subscription}/resourceGroups/{resource_group}" + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{}") + ) + args_schema.type._registered = False + args_schema.type._required = False + args_schema.user_assigned_identities._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + if args.system_assigned: + args.type = "SystemAssigned" + if has_value(args.user_assigned): + args.type = "UserAssigned" if not args.type else "SystemAssigned,UserAssigned" + user_assigned_identities = {} + for identity in args.user_assigned: + user_assigned_identities.update({ + identity.to_serialized_data(): {} + }) + args.user_assigned_identities = user_assigned_identities + + def pre_instance_create(self): + old_identity = self.ctx.vars.instance.identity + args = self.ctx.args + + if args.system_assigned: + args.type = "SystemAssigned" if not old_identity.type else "SystemAssigned,UserAssigned" + if has_value(args.user_assigned): + args.type = "UserAssigned" if not old_identity.type else "SystemAssigned,UserAssigned" + if not old_identity.type: + user_assigned_identities = {} + else: + user_assigned_identities = {} if 'UserAssigned' not in old_identity.type.to_serialized_data() else {**old_identity.user_assigned_identities.to_serialized_data()} + for identity in args.user_assigned: + user_assigned_identities.update({ + identity.to_serialized_data(): {} + }) + args.user_assigned_identities = user_assigned_identities + + +class IdentityRemove(_IdentityRemove): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZBoolArg, AAZListArg, AAZResourceIdArg, AAZResourceIdArgFormat + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.system_assigned = AAZBoolArg( + options=["--system-assigned"], + help="Enable system assigned identity" + ) + args_schema.user_assigned = AAZListArg( + options=["--user-assigned"], + help="Space separated resource IDs to add user-assigned identities.", + ) + args_schema.user_assigned.Element = AAZResourceIdArg( + fmt=AAZResourceIdArgFormat(template="/subscriptions/{subscription}/resourceGroups/{resource_group}" + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{}") + ) + args_schema.type._registered = False + args_schema.user_assigned_identities._registered = False + return args_schema + + def pre_instance_update(self, instance): + args = self.ctx.args + if has_value(args.user_assigned): + user_assigned_identities = instance.user_assigned_identities + for identity in args.user_assigned: + user_assigned_identities._data.pop(identity.to_serialized_data(), None) + args.user_assigned_identities = user_assigned_identities + if instance.user_assigned_identities and 'SystemAssigned' in instance.type.to_serialized_data(): + args.type = "SystemAssigned,UserAssigned" + if not instance.user_assigned_identities and 'SystemAssigned' in instance.type.to_serialized_data(): + args.type = 'SystemAssigned' + if args.system_assigned and instance.user_assigned_identities: + args.type = 'UserAssigned' + if args.system_assigned and instance.type.to_serialized_data() == 'SystemAssigned': + args.type = 'None' + if not instance.user_assigned_identities and instance.type.to_serialized_data() == 'UserAssigned': + args.type = 'None' + + def _output(self, *args, **kwargs): + if not self.ctx.vars.instance.identity.to_serialized_data(): + return {'type': None} + return self.deserialize_output(self.ctx.selectors.subresource.required(), client_flatten=True) + + +class IntegrationAccountList(_IntegrationAccountList): + def _output(self, *args, **kwargs): + args = self.ctx.args + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + if has_value(args.top): + next_link = None + if len(result) > self.ctx.args.top: + result = result[:args.top.to_serialized_data()] + return result, next_link + + +class WorkflowList(_WorkflowList): + def _output(self, *args, **kwargs): + args = self.ctx.args + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + if has_value(args.top): + next_link = None + if len(result) > self.ctx.args.top: + result = result[:args.top.to_serialized_data()] + return result, next_link diff --git a/src/logic/azext_logic/generated/__init__.py b/src/logic/azext_logic/generated/__init__.py deleted file mode 100644 index c9cfdc73e77..00000000000 --- a/src/logic/azext_logic/generated/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/logic/azext_logic/generated/_client_factory.py b/src/logic/azext_logic/generated/_client_factory.py deleted file mode 100644 index 76213b3a962..00000000000 --- a/src/logic/azext_logic/generated/_client_factory.py +++ /dev/null @@ -1,18 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -def cf_logic(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) - - -def cf_workflow(cli_ctx, *_): - return cf_logic(cli_ctx).workflows - - -def cf_integration_account(cli_ctx, *_): - return cf_logic(cli_ctx).integration_accounts diff --git a/src/logic/azext_logic/generated/_help.py b/src/logic/azext_logic/generated/_help.py deleted file mode 100644 index b5772ab8f22..00000000000 --- a/src/logic/azext_logic/generated/_help.py +++ /dev/null @@ -1,122 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long -# pylint: disable=too-many-lines - -from knack.help_files import helps - - -helps['logic workflow'] = """ - type: group - short-summary: logic workflow -""" - -helps['logic workflow list'] = """ - type: command - short-summary: 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" - - name: List all workflows in a subscription - text: |- - az logic workflow list -""" - -helps['logic workflow show'] = """ - type: command - short-summary: Gets a workflow. - examples: - - name: Get a workflow - text: |- - 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. - 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" -""" - -helps['logic workflow update'] = """ - type: command - 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" -""" - -helps['logic workflow delete'] = """ - type: command - short-summary: Deletes a workflow. - examples: - - name: Delete a workflow - text: |- - az logic workflow delete --resource-group "test_resource_group" --name "test_workflow" -""" - -helps['logic integration-account'] = """ - type: group - short-summary: logic integration-account -""" - -helps['logic integration-account list'] = """ - type: command - short-summary: 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" -""" - -helps['logic integration-account show'] = """ - type: command - 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" -""" - -helps['logic integration-account create'] = """ - type: command - short-summary: Creates or updates an integration account. - 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" -""" - -helps['logic integration-account update'] = """ - type: command - short-summary: Updates an integration account. - 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" -""" - - -helps['logic integration-account import'] = """ - type: command - short-summary: Import an integration account from a JSON file. - examples: - - name: Import an integration account. - text: |- - az logic integration-account import --name "test_integration_account" --resource-group "test_resource_group" --input-path "integration.json" -""" - -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 "test_integration_account" --resource-group "test_resource_group" -""" diff --git a/src/logic/azext_logic/generated/_params.py b/src/logic/azext_logic/generated/_params.py deleted file mode 100644 index c556515abe3..00000000000 --- a/src/logic/azext_logic/generated/_params.py +++ /dev/null @@ -1,130 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# pylint: disable=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 - - -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.') - - 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.') - - 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 https://github.com/Azure/azure-cli-extensions/blob/main/src/logic/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 https://github.com/Azure/azure-cli-extensions/blob/main/src/logic/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.') - - 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 https://github.com/Azure/azure-cli-extensions/blob/main/src/logic/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.') - - 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.') - - 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.') - - 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.') - - 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 https://github.com/Azure/azure-cli-extensions/blob/main/src/logic/README.md For more information')) - c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Sus' - 'pended']), help='The workflow state.') - - 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 https://github.com/Azure/azure-cli-extensions/blob/main/src/logic/README.md For more information')) - c.argument('state', arg_type=get_enum_type(['NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Sus' - 'pended']), help='The workflow state.') - - 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.') diff --git a/src/logic/azext_logic/generated/action.py b/src/logic/azext_logic/generated/action.py deleted file mode 100644 index 7cebd6c3391..00000000000 --- a/src/logic/azext_logic/generated/action.py +++ /dev/null @@ -1,70 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# pylint: disable=protected-access - -import argparse -from knack.util import CLIError - - -class AddIntegrationAccount(argparse.Action): - def __call__(self, parser, namespace, values, option_string=None): - action = self.get_action(values, option_string) - namespace.integration_account = action - - def get_action(self, values, option_string): # pylint: disable=no-self-use - try: - properties = dict(x.split('=', 1) for x in values) - 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 - return d - - -class AddIntegrationServiceEnvironment(argparse.Action): - def __call__(self, parser, namespace, values, option_string=None): - action = self.get_action(values, option_string) - namespace.integration_service_environment = action - - def get_action(self, values, option_string): # pylint: disable=no-self-use - try: - properties = dict(x.split('=', 1) for x in values) - 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 - return d - - -class AddKeyVault(argparse.Action): - def __call__(self, parser, namespace, values, option_string=None): - action = self.get_action(values, option_string) - namespace.key_vault = action - - def get_action(self, values, option_string): # pylint: disable=no-self-use - try: - properties = dict(x.split('=', 1) for x in values) - except ValueError: - raise CLIError( - 'usage error: {} [KEY=VALUE ...]'.format(option_string)) - d = {} - for k in properties: - kl = k.lower() - v = properties[k] - if kl == 'name': - d['name'] = v - elif kl == 'id': - d['id'] = v - return d diff --git a/src/logic/azext_logic/generated/commands.py b/src/logic/azext_logic/generated/commands.py deleted file mode 100644 index e024f019c9a..00000000000 --- a/src/logic/azext_logic/generated/commands.py +++ /dev/null @@ -1,38 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from azure.cli.core.commands import CliCommandType - - -def load_command_table(self, _): - - with self.command_group('logic', is_preview=True): - pass - - from azext_logic.generated._client_factory import cf_workflow - logic_workflow = CliCommandType( - operations_tmpl='azext_logic.vendored_sdks.logic.operations._workflow_operations#WorkflowOperations.{}', - client_factory=cf_workflow) - with self.command_group('logic workflow', logic_workflow, client_factory=cf_workflow) as g: - g.custom_command('list', 'logic_workflow_list') - 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) - - from azext_logic.generated._client_factory import cf_integration_account - logic_integration_account = CliCommandType( - operations_tmpl='azext_logic.vendored_sdks.logic.operations._integration_account_operations#IntegrationAccountO' - 'perations.{}', - client_factory=cf_integration_account) - with self.command_group('logic integration-account', logic_integration_account, - client_factory=cf_integration_account) 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') diff --git a/src/logic/azext_logic/generated/custom.py b/src/logic/azext_logic/generated/custom.py deleted file mode 100644 index 3fbf50d7677..00000000000 --- a/src/logic/azext_logic/generated/custom.py +++ /dev/null @@ -1,176 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# pylint: disable=too-many-lines - -import json -from knack.util import CLIError - - -def logic_workflow_list(cmd, client, - resource_group_name=None, - top=None, - filter=None): - if resource_group_name: - return client.list_by_resource_group(resource_group_name=resource_group_name, - top=top, - filter=filter) - return client.list_by_subscription(top=top, - filter=filter) - - -def logic_workflow_show(cmd, client, - resource_group_name, - name): - return client.get(resource_group_name=resource_group_name, - workflow_name=name) - - -def logic_workflow_create(cmd, client, - resource_group_name, - name, - definition, - location, - 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") - - return client.create_or_update(resource_group_name=resource_group_name, - workflow_name=name, - location=location, - tags=tags, - state=state, - endpoints_configuration=endpoints_configuration, - access_control=definition.get( - 'accessControl', access_control), - integration_account=integration_account, - integration_service_environment=integration_service_environment, - definition=definition['definition'], - parameters=definition.get('parameters', None)) - - -def logic_workflow_update(cmd, client, - 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, - resource_group_name, - name): - return client.delete(resource_group_name=resource_group_name, - workflow_name=name) - - -def logic_integration_account_list(cmd, client, - resource_group_name=None, - top=None): - if resource_group_name: - return client.list_by_resource_group(resource_group_name=resource_group_name, - top=top) - return client.list_by_subscription(top=top) - - -def logic_integration_account_show(cmd, client, - resource_group_name, - name): - return client.get(resource_group_name=resource_group_name, - integration_account_name=name) - - -def logic_integration_account_create(cmd, client, - resource_group_name, - 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) - return client.create_or_update(resource_group_name=resource_group_name, - integration_account_name=name, - location=location, - tags=tags, - sku={'name': sku}, - integration_service_environment=integration_service_environment, - state=state if state else 'Enabled') - # TODO: Work around for empty property serialization issue. - # Remove after LogicApp deploy the service fix. Contact: Rama Rayud" - - -def logic_integration_account_import(cmd, client, - resource_group_name, - name, - input_path, - location=None, - tags=None, - sku=None,): - - if 'properties' not in input_path: - raise CLIError(str(input_path) + - " does not contain a 'properties' key") - - integration_service_environment = input_path['properties'].get( - 'integrationServiceEnvironment', None) - return client.create_or_update(resource_group_name=resource_group_name, - integration_account_name=name, - location=input_path.get( - 'location', location), - tags=input_path.get('tags', tags), - sku=input_path.get('sku', {'name': sku}), - integration_service_environment=integration_service_environment, - state=input_path['properties'].get('state', 'Enabled')) - # TODO: Work around for empty property serialization issue. - # Remove after LogicApp deploy the service fix. Contact: Rama Rayud" - - -def logic_integration_account_update(cmd, client, - name, - resource_group_name, - tags=None, - sku=None, - integration_service_environment=None, - state=None): - - 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_delete(cmd, client, - resource_group_name, - name): - return client.delete(resource_group_name=resource_group_name, - integration_account_name=name) diff --git a/src/logic/azext_logic/manual/__init__.py b/src/logic/azext_logic/manual/__init__.py deleted file mode 100644 index c9cfdc73e77..00000000000 --- a/src/logic/azext_logic/manual/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/logic/azext_logic/manual/commands.py b/src/logic/azext_logic/manual/commands.py deleted file mode 100644 index d8f74c3d247..00000000000 --- a/src/logic/azext_logic/manual/commands.py +++ /dev/null @@ -1,11 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -def load_command_table(self, _): # pylint: disable=unused-argument - with self.command_group('logic integration-account map'): - from azext_logic.manual.custom import MapCreate, MapUpdate - self.command_table['logic integration-account map create'] = MapCreate(loader=self) - self.command_table['logic integration-account map update'] = MapUpdate(loader=self) diff --git a/src/logic/azext_logic/manual/custom.py b/src/logic/azext_logic/manual/custom.py deleted file mode 100644 index 13defa45b80..00000000000 --- a/src/logic/azext_logic/manual/custom.py +++ /dev/null @@ -1,182 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -# pylint: disable=too-many-lines, unused-argument, protected-access - -from knack.util import CLIError -from azure.cli.core.aaz import has_value -from azext_logic.aaz.latest.logic.integration_account.map import Create as _MapCreate -from azext_logic.aaz.latest.logic.integration_account.map import Update as _MapUpdate - - -def logic_workflow_create(cmd, client, - resource_group_name, - name, - definition, - location, - 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") - workflow = { - '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) - } - return client.create_or_update(resource_group_name=resource_group_name, - workflow_name=name, - workflow=workflow) - - -def logic_workflow_update(cmd, - client, - resource_group_name, - name, - definition=None, - tags=None, - state=None): - from azure.cli.core.azclierror import ValidationError - - if definition is not None and "definition" not in definition: - raise ValidationError(str(definition) + " does not contain a 'definition' key") - - workflow = client.get(resource_group_name=resource_group_name, workflow_name=name) - - return logic_workflow_create( - cmd, - client, - resource_group_name, - name, - definition=definition if definition else {"definition": workflow.definition}, - location=workflow.location, - tags=tags if tags else workflow.tags, - state=state if state else workflow.state, - endpoints_configuration=workflow.endpoints_configuration, - integration_account=workflow.integration_account, - integration_service_environment=workflow.integration_service_environment, - ) - - -def logic_integration_account_create(cmd, client, - resource_group_name, - name, - location=None, - tags=None, - sku=None, - integration_service_environment=None, - state=None): - import json - if isinstance(integration_service_environment, str): - integration_service_environment = json.loads( - integration_service_environment) - integration_account = { - 'location': location, - 'tags': tags, - 'sku': {'name': sku}, - 'integration_service_environment': integration_service_environment, - 'state': state if state else 'Enabled', - } - return client.create_or_update(resource_group_name=resource_group_name, - integration_account_name=name, - integration_account=integration_account) - - -def logic_integration_account_import(cmd, client, - resource_group_name, - name, - input_path, - location=None, - tags=None, - sku=None, ): - if 'properties' not in input_path: - raise CLIError(str(input_path) + - " does not contain a 'properties' key") - - integration_service_environment = input_path['properties'].get( - 'integrationServiceEnvironment', None) - integration_account = { - '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'), - } - return client.create_or_update(resource_group_name=resource_group_name, - integration_account_name=name, - integration_account=integration_account) - - -def logic_integration_account_update(cmd, client, - name, - resource_group_name, - tags=None, - sku=None, - integration_service_environment=None, - state=None): - import json - if isinstance(integration_service_environment, str): - integration_service_environment = json.loads( - integration_service_environment) - integration_account = { - 'location': None, - 'tags': tags, - 'sku': {'name': sku}, - 'integration_service_environment': integration_service_environment, - 'state': state, - } - return client.update(resource_group_name=resource_group_name, - integration_account_name=name, - integration_account=integration_account) - - -class MapCreate(_MapCreate): - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - from azure.cli.core.aaz import AAZFileArg - args_schema = super()._build_arguments_schema(*args, **kwargs) - args_schema.map_content = AAZFileArg( - options=["--map-content"], - help="The content.", - ) - args_schema.content._registered = False - return args_schema - - def pre_operations(self): - args = self.ctx.args - if has_value(args.map_content): - args.content = args.map_content - - -class MapUpdate(_MapUpdate): - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - from azure.cli.core.aaz import AAZFileArg - args_schema = super()._build_arguments_schema(*args, **kwargs) - args_schema.map_content = AAZFileArg( - options=["--map-content"], - help="The content.", - ) - args_schema.content._registered = False - return args_schema - - def pre_instance_update(self, instance): - if has_value(self.ctx.args.content_type): - return - if instance.properties.map_type in ['Xslt', 'Xslt20', 'Xslt30']: - instance.properties.content_type = 'application/xml' - if instance.properties.map_type == 'Liquid': - instance.properties.content_type = 'text/plain' diff --git a/src/logic/azext_logic/tests/latest/recordings/test_logic.yaml b/src/logic/azext_logic/tests/latest/recordings/test_logic.yaml index 31b702550ba..aff055443e1 100644 --- a/src/logic/azext_logic/tests/latest/recordings/test_logic.yaml +++ b/src/logic/azext_logic/tests/latest/recordings/test_logic.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"location": "centralus", "sku": {"name": "Standard"}, "properties": {"state": - "Enabled"}}' + body: '{"location": "centralus", "properties": {"state": "Enabled"}, "sku": {"name": + "Standard"}}' headers: Accept: - application/json @@ -18,7 +18,7 @@ interactions: ParameterSetName: - --location --sku --name --resource-group User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: @@ -32,11 +32,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:02 GMT + - Fri, 24 Nov 2023 07:36:55 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=5438b719719a236f0061a2df82ee876e245535582e51f65e9a5afcc69a780aee;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=5438b719719a236f0061a2df82ee876e245535582e51f65e9a5afcc69a780aee;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -47,8 +50,8 @@ interactions: code: 201 message: Created - request: - body: '{"location": "centralus", "sku": {"name": "Standard"}, "properties": {"state": - "Enabled"}}' + body: '{"location": "centralus", "properties": {"state": "Enabled"}, "sku": {"name": + "Standard"}}' headers: Accept: - application/json @@ -65,7 +68,7 @@ interactions: ParameterSetName: - --location --input-path --name --resource-group User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: @@ -79,11 +82,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:04 GMT + - Fri, 24 Nov 2023 07:36:56 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=6e079698df7882eaf22e06fefcd5651a3566a6f76cfbe4c50e9be46eda9ede95;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=6e079698df7882eaf22e06fefcd5651a3566a6f76cfbe4c50e9be46eda9ede95;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -121,12 +127,12 @@ interactions: ParameterSetName: - --resource-group --location --definition --name User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-24T07:37:00.5184606Z","changedTime":"2023-11-24T07:37:00.5151478Z","state":"Enabled","version":"08585007954649887230","accessEndpoint":"https://prod-03.centralus.logic.azure.com:443/workflows/ac81639b6ff0400f9ce36fdca8ac9206","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' headers: cache-control: - no-cache @@ -135,11 +141,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:10 GMT + - Fri, 24 Nov 2023 07:36:59 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -163,7 +172,7 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: @@ -177,11 +186,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:12 GMT + - Fri, 24 Nov 2023 07:37:02 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=98ea9fa6eaf31c7e77fa9d3f5a13d5d9b5ae0eaa634c1583eb0dd9158c80b7a4;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=98ea9fa6eaf31c7e77fa9d3f5a13d5d9b5ae0eaa634c1583eb0dd9158c80b7a4;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -207,12 +219,12 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-24T07:37:00.5184606Z","changedTime":"2023-11-24T07:37:00.5151478Z","state":"Enabled","version":"08585007954649887230","accessEndpoint":"https://prod-03.centralus.logic.azure.com:443/workflows/ac81639b6ff0400f9ce36fdca8ac9206","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' headers: cache-control: - no-cache @@ -221,11 +233,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:14 GMT + - Fri, 24 Nov 2023 07:37:03 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=6e079698df7882eaf22e06fefcd5651a3566a6f76cfbe4c50e9be46eda9ede95;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=6e079698df7882eaf22e06fefcd5651a3566a6f76cfbe4c50e9be46eda9ede95;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -253,7 +268,7 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts?api-version=2019-05-01 response: @@ -267,11 +282,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:17 GMT + - Fri, 24 Nov 2023 07:37:05 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -297,12 +315,12 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows?api-version=2019-05-01 response: body: - string: '{"value":[{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}]}' + string: '{"value":[{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-24T07:37:00.5184606Z","changedTime":"2023-11-24T07:37:00.5151478Z","state":"Enabled","version":"08585007954649887230","accessEndpoint":"https://prod-03.centralus.logic.azure.com:443/workflows/ac81639b6ff0400f9ce36fdca8ac9206","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}]}' headers: cache-control: - no-cache @@ -311,11 +329,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:18 GMT + - Fri, 24 Nov 2023 07:37:07 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -340,22 +361,24 @@ interactions: - logic integration-account list Connection: - keep-alive + ParameterSetName: + - --top User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Logic/integrationAccounts?api-version=2019-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Logic/integrationAccounts?$top=2&api-version=2019-05-01 response: body: - string: '{"value":[{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004","name":"cli_test_000004","type":"Microsoft.Logic/integrationAccounts","location":"centralus"},{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lgtest/providers/Microsoft.Logic/integrationAccounts/iacc1","name":"iacc1","type":"Microsoft.Logic/integrationAccounts","location":"eastus"}]}' + string: '{"value":[{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004","name":"cli_test_000004","type":"Microsoft.Logic/integrationAccounts","location":"centralus"},{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_djtazfrw443eq5hf3l4ba5l2dpqxkhddcuulupupjuek3pz5ob63bit45ghgvh5msg/providers/Microsoft.Logic/integrationAccounts/cli_test_q7wfkn7p44xq4bc","name":"cli_test_q7wfkn7p44xq4bc","type":"Microsoft.Logic/integrationAccounts","location":"centralus"},{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_logic_logic1patsf/providers/Microsoft.Logic/integrationAccounts/integration-account-name","name":"integration-account-name","type":"Microsoft.Logic/integrationAccounts","location":"eastus"},{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_logic_logic1patsf/providers/Microsoft.Logic/integrationAccounts/integration-account-name2","name":"integration-account-name2","type":"Microsoft.Logic/integrationAccounts","location":"eastus"}]}' headers: cache-control: - no-cache content-length: - - '591' + - '1367' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:20 GMT + - Fri, 24 Nov 2023 07:37:09 GMT expires: - '-1' pragma: @@ -367,8 +390,8 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - centralus:f6550be8-9491-48c7-8ce3-ba3904e96415 - - eastus:27bcf5e7-4583-4118-b80b-61e53d13ccb8 + - centralus:eb95bf20-925e-4ad6-9d65-5fa7eddbf8e9 + - eastus:dceb3999-7795-4e85-929b-ebc83905ff24 status: code: 200 message: OK @@ -383,29 +406,44 @@ interactions: - logic workflow list Connection: - keep-alive + ParameterSetName: + - --top User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Logic/workflows?api-version=2019-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Logic/workflows?$top=2&api-version=2019-05-01 response: body: - string: '{"value":[{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2019-11-18T06:41:01.5064237Z","changedTime":"2023-05-09T01:58:21.8749723Z","state":"Enabled","version":"08585180093836149808","accessEndpoint":"https://prod-29.westus.logic.azure.com:443/workflows/cf5bb036a7fa41d4ad8b964d5eea3343","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"Trigger_at_Mon,_Wed,_Sat_every_week":{"recurrence":{"frequency":"Week","interval":1,"schedule":{"hours":["18"],"weekDays":["Monday","Wednesday","Saturday"]},"timeZone":"China - Standard Time"},"evaluatedRecurrence":{"frequency":"Week","interval":1,"schedule":{"hours":["18"],"weekDays":["Monday","Wednesday","Saturday"]},"timeZone":"China - Standard Time"},"type":"Recurrence"}},"actions":{"Delete_resource_groups":{"foreach":"@body(''Filter_elements_except_resource_group_name_is_equal_to_\"AzureSDKTest_reserved\"'')","actions":{"Delete_a_resource_group":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(items(''Delete_resource_groups'')?[''name''])}","queries":{"x-ms-api-version":"2016-06-01"}}}},"runAfter":{"Filter_elements_except_resource_group_name_is_equal_to_\"AzureSDKTest_reserved\"":["Succeeded"]},"type":"Foreach"},"Filter_elements_except_resource_group_name_is_equal_to_\"AzureSDKTest_reserved\"":{"runAfter":{"List_resource_groups":["Succeeded"]},"type":"Query","inputs":{"from":"@body(''List_resource_groups'')?[''value'']","where":"@not(equals(item()?[''name''], - ''AzureSDKTest_reserved''))"}},"List_resource_groups":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups","queries":{"x-ms-api-version":"2016-06-01"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"arm_1":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/arm-1","connectionName":"arm-1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/arm"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/AzureSDKTest_ScheduledCleaner","name":"AzureSDKTest_ScheduledCleaner","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2020-04-24T06:33:36.5052747Z","changedTime":"2020-04-24T06:33:36.4986025Z","state":"Enabled","version":"08586138968690384726","accessEndpoint":"https://prod-123.westus.logic.azure.com:443/workflows/72b1a436cf5a4f65950d224869dd7484","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{},"triggers":{},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/FetchModules","name":"FetchModules","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2022-07-05T02:21:31.5244292Z","changedTime":"2023-05-11T10:14:57.8703848Z","state":"Enabled","version":"08585178067876160392","accessEndpoint":"https://prod-179.westus.logic.azure.com:443/workflows/9744517e1ea54c55b94046389d510479","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"Trigger_at_6pm_every_day":{"recurrence":{"frequency":"Day","interval":1,"schedule":{"hours":["18"]},"timeZone":"China + string: '{"value":[{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-24T07:37:00.5184606Z","changedTime":"2023-11-24T07:37:00.5151478Z","state":"Enabled","version":"08585007954649887230","accessEndpoint":"https://prod-03.centralus.logic.azure.com:443/workflows/ac81639b6ff0400f9ce36fdca8ac9206","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-23T16:16:04.1903946Z","changedTime":"2023-11-23T16:16:04.1895313Z","state":"Enabled","version":"08585008507213080502","accessEndpoint":"https://prod-07.centralus.logic.azure.com:443/workflows/65cd94e0e9c142828acba04e3b9751ce","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_logic_logic1patsfxuwdmtfanpjru5jhlvmljjhfm73hmshhccz6pu2szq5xnwm3y/providers/Microsoft.Logic/workflows/cli_test_pzt7rbo4wogrpeb","name":"cli_test_pzt7rbo4wogrpeb","type":"Microsoft.Logic/workflows","location":"centralus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2019-11-18T06:41:01.5064237Z","changedTime":"2023-08-05T09:36:28.0713386Z","state":"Enabled","version":"08585103786974170056","accessEndpoint":"https://prod-29.westus.logic.azure.com:443/workflows/cf5bb036a7fa41d4ad8b964d5eea3343","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"Trigger_at_6_pm_every_day":{"recurrence":{"frequency":"Day","interval":1,"schedule":{"hours":["18"]},"timeZone":"China Standard Time"},"evaluatedRecurrence":{"frequency":"Day","interval":1,"schedule":{"hours":["18"]},"timeZone":"China - Standard Time"},"type":"Recurrence"}},"actions":{"Delete_VM":{"foreach":"@body(''List_VM'')?[''value'']","actions":{"Delete_a_VM":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(split(toLower(items(''Delete_VM'')?[''id'']),''resourcegroups/'')[1])}","queries":{"x-ms-api-version":"2022-03-01"}}}},"runAfter":{"List_VM":["Succeeded"]},"type":"Foreach"},"Delete_VM_resourcegroup":{"foreach":"@body(''List_VM'')?[''value'']","actions":{"Delete_a_VM_resourcegroup":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(split(split(toLower(items(''Delete_VM_resourcegroup'')?[''id'']),''resourcegroups/'')[1],''/providers'')[0])}","queries":{"x-ms-api-version":"2016-06-01"}}}},"runAfter":{"List_VM":["Succeeded"]},"type":"Foreach"},"Delete_public_ip":{"foreach":"@body(''List_public_ip'')?[''value'']","actions":{"Delete_a_public_ip":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(split(toLower(items(''Delete_public_ip'')?[''id'']),''resourcegroups/'')[1])}","queries":{"x-ms-api-version":"2021-08-01"}}}},"runAfter":{"List_public_ip":["Succeeded"]},"type":"Foreach"},"Delete_public_ip_resourcegroup":{"foreach":"@body(''List_public_ip'')?[''value'']","actions":{"Delete_a_public_ip_resourcegroup":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(split(split(toLower(items(''Delete_public_ip_resourcegroup'')?[''id'']),''resourcegroups/'')[1],''/providers'')[0])}","queries":{"x-ms-api-version":"2016-06-01"}}}},"runAfter":{"List_public_ip":["Succeeded"]},"type":"Foreach"},"List_VM":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/providers/Microsoft.Compute/virtualMachines","queries":{"x-ms-api-version":"2022-03-01"}}},"List_public_ip":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/providers/Microsoft.Network/publicIPAddresses","queries":{"x-ms-api-version":"2021-08-01"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"arm_1":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/arm-1","connectionName":"arm-1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/arm"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/HighRiskResource_ScheduledCleaner","name":"HighRiskResource_ScheduledCleaner","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2019-11-25T03:03:51.6406922Z","changedTime":"2020-03-02T03:30:46.8880289Z","state":"Disabled","version":"08586184870386928444","accessEndpoint":"https://prod-52.westus.logic.azure.com:443/workflows/ad25d96f848444caaf7c4ec48853fbcf","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"Recurrence":{"recurrence":{"frequency":"Day","interval":3},"type":"Recurrence"}},"actions":{"List_resource_groups":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups","queries":{"x-ms-api-version":"2016-06-01"}}},"Run_query_and_list_results":{"runAfter":{"List_resource_groups":["Succeeded"]},"type":"ApiConnection","inputs":{"body":"[].eventTimestamp","host":{"connection":{"name":"@parameters(''$connections'')[''azuremonitorlogs''][''connectionId'']"}},"method":"post","path":"/queryData","queries":{"resourcegroups":"new-experiences","resourcename":"Microsoft.ClassicCompute","resourcetype":"virtualMachines","subscriptions":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","timerange":"60"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"arm":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/arm","connectionName":"arm","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/arm"},"azuremonitorlogs":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/azuremonitorlogs","connectionName":"azuremonitorlogs","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/azuremonitorlogs"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/TestLogicApp","name":"TestLogicApp","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T02:53:44.7803191Z","changedTime":"2023-06-26T02:58:14.6682465Z","state":"Enabled","version":"08585138585908197008","accessEndpoint":"https://prod-06.eastus.logic.azure.com:443/workflows/651218ee23a1404fadd59d57b182daf4","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"manual":{"type":"Request","kind":"Http","inputs":{"method":"POST","schema":{"properties":{"content":{"type":"string"},"subject":{"type":"string"},"to":{"type":"string"}},"type":"object"}}}},"actions":{"Send_an_email_(V2)":{"runAfter":{},"type":"ApiConnection","inputs":{"body":{"Body":"

@{triggerBody()?[''content'']}

","Importance":"Normal","Subject":"@triggerBody()?[''subject'']","To":"@triggerBody()?[''to'']"},"host":{"connection":{"name":"@parameters(''$connections'')[''office365''][''connectionId'']"}},"method":"post","path":"/v2/Mail"}}},"outputs":{}},"parameters":{"$connections":{"value":{"office365":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureClientToolsAutomation/providers/Microsoft.Web/connections/office365","connectionName":"office365","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/eastus/managedApis/office365"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.92.98.111"},{"address":"40.121.91.41"},{"address":"40.114.82.191"},{"address":"23.101.139.153"},{"address":"23.100.29.190"},{"address":"23.101.136.201"},{"address":"104.45.153.81"},{"address":"23.101.132.208"},{"address":"52.226.216.197"},{"address":"52.226.216.187"},{"address":"40.76.151.25"},{"address":"40.76.148.50"},{"address":"20.84.29.29"},{"address":"20.84.29.18"},{"address":"40.76.174.83"},{"address":"40.76.174.39"}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"},{"address":"52.226.216.209"},{"address":"40.76.151.124"},{"address":"20.84.29.150"},{"address":"40.76.174.148"}]},"connector":{"outgoingIpAddresses":[{"address":"40.71.249.139"},{"address":"40.71.249.205"},{"address":"40.114.40.132"},{"address":"40.71.11.80/28"},{"address":"40.71.15.160/27"},{"address":"52.188.157.160"},{"address":"20.88.153.176/28"},{"address":"20.88.153.192/27"},{"address":"52.151.221.184"},{"address":"52.151.221.119"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureClientToolsAutomation/providers/Microsoft.Logic/workflows/SendMail","name":"SendMail","type":"Microsoft.Logic/workflows","location":"eastus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:00:51.7499166Z","changedTime":"2023-06-26T03:07:04.8617385Z","state":"Enabled","version":"08585138580606248885","accessEndpoint":"https://prod-64.eastus.logic.azure.com:443/workflows/a33ef5180fe145109b3e7dca39c74243","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"manual":{"type":"Request","kind":"Http","inputs":{"method":"POST","schema":{"properties":{"content":{"type":"string"},"title":{"type":"string"},"to":{"type":"string"}},"type":"object"}}}},"actions":{"Create_a_chat":{"runAfter":{},"type":"ApiConnection","inputs":{"body":{"members":"@triggerBody()?[''to'']","topic":"@triggerBody()?[''title'']"},"host":{"connection":{"name":"@parameters(''$connections'')[''teams''][''connectionId'']"}},"method":"post","path":"/beta/chats"}},"Get_an_@mention_token_for_a_user":{"runAfter":{"Create_a_chat":["Succeeded"]},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''teams''][''connectionId'']"}},"method":"get","path":"/v1.0/users/@{encodeURIComponent(triggerBody()?[''to''])}"}},"Post_message_in_a_chat_or_channel":{"runAfter":{"Get_an_@mention_token_for_a_user":["Succeeded"]},"type":"ApiConnection","inputs":{"body":{"messageBody":"

Hi - @{body(''Get_an_@mention_token_for_a_user'')?[''atMention'']},
\n@{triggerBody()?[''content'']}

","recipient":"@body(''Create_a_chat'')?[''id'']"},"host":{"connection":{"name":"@parameters(''$connections'')[''teams''][''connectionId'']"}},"method":"post","path":"/beta/teams/conversation/message/poster/@{encodeURIComponent(''User'')}/location/@{encodeURIComponent(''Group - chat'')}"}}},"outputs":{}},"parameters":{"$connections":{"value":{"teams":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureClientToolsAutomation/providers/Microsoft.Web/connections/teams","connectionName":"teams","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/eastus/managedApis/teams"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.92.98.111"},{"address":"40.121.91.41"},{"address":"40.114.82.191"},{"address":"23.101.139.153"},{"address":"23.100.29.190"},{"address":"23.101.136.201"},{"address":"104.45.153.81"},{"address":"23.101.132.208"},{"address":"52.226.216.197"},{"address":"52.226.216.187"},{"address":"40.76.151.25"},{"address":"40.76.148.50"},{"address":"20.84.29.29"},{"address":"20.84.29.18"},{"address":"40.76.174.83"},{"address":"40.76.174.39"}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"},{"address":"52.226.216.209"},{"address":"40.76.151.124"},{"address":"20.84.29.150"},{"address":"40.76.174.148"}]},"connector":{"outgoingIpAddresses":[{"address":"40.71.249.139"},{"address":"40.71.249.205"},{"address":"40.114.40.132"},{"address":"40.71.11.80/28"},{"address":"40.71.15.160/27"},{"address":"52.188.157.160"},{"address":"20.88.153.176/28"},{"address":"20.88.153.192/27"},{"address":"52.151.221.184"},{"address":"52.151.221.119"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureClientToolsAutomation/providers/Microsoft.Logic/workflows/SendTeams","name":"SendTeams","type":"Microsoft.Logic/workflows","location":"eastus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T02:34:20.53214Z","changedTime":"2023-06-26T02:35:32.3882186Z","state":"Enabled","version":"08585138599531032717","accessEndpoint":"https://prod-57.eastus.logic.azure.com:443/workflows/b978151f07bd4058aec3acd528211234","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.92.98.111"},{"address":"40.121.91.41"},{"address":"40.114.82.191"},{"address":"23.101.139.153"},{"address":"23.100.29.190"},{"address":"23.101.136.201"},{"address":"104.45.153.81"},{"address":"23.101.132.208"},{"address":"52.226.216.197"},{"address":"52.226.216.187"},{"address":"40.76.151.25"},{"address":"40.76.148.50"},{"address":"20.84.29.29"},{"address":"20.84.29.18"},{"address":"40.76.174.83"},{"address":"40.76.174.39"}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"},{"address":"52.226.216.209"},{"address":"40.76.151.124"},{"address":"20.84.29.150"},{"address":"40.76.174.148"}]},"connector":{"outgoingIpAddresses":[{"address":"40.71.249.139"},{"address":"40.71.249.205"},{"address":"40.114.40.132"},{"address":"40.71.11.80/28"},{"address":"40.71.15.160/27"},{"address":"52.188.157.160"},{"address":"20.88.153.176/28"},{"address":"20.88.153.192/27"},{"address":"52.151.221.184"},{"address":"52.151.221.119"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lgtest/providers/Microsoft.Logic/workflows/wf1","name":"wf1","type":"Microsoft.Logic/workflows","location":"eastus","identity":{"type":"SystemAssigned","principalId":"d37820de-597b-4ce3-8887-b2c37eb80b91","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}]}' + Standard Time"},"type":"Recurrence"}},"actions":{"Delete_resource_groups":{"foreach":"@body(''Filter_elements_except_resource_group_name_is_equal_to_\"AzureSDKTest_reserved\"'')","actions":{"Delete_a_resource_group":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(items(''Delete_resource_groups'')?[''name''])}","queries":{"x-ms-api-version":"2016-06-01"}}}},"runAfter":{"Filter_elements_except_resource_group_name_is_equal_to_\"AzureSDKTest_reserved\"":["Succeeded"]},"type":"Foreach"},"Filter_elements_except_resource_group_name_is_equal_to_\"AzureSDKTest_reserved\"":{"runAfter":{"List_resource_groups":["Succeeded"]},"type":"Query","inputs":{"from":"@body(''List_resource_groups'')?[''value'']","where":"@not(equals(item()?[''name''], + ''AzureSDKTest_reserved''))"}},"List_resource_groups":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups","queries":{"x-ms-api-version":"2016-06-01"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"arm_1":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/arm-1","connectionName":"arm-1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/arm"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/AzureSDKTest_ScheduledCleaner","name":"AzureSDKTest_ScheduledCleaner","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2020-04-24T06:33:36.5052747Z","changedTime":"2020-04-24T06:33:36.4986025Z","state":"Enabled","version":"08586138968690384726","accessEndpoint":"https://prod-123.westus.logic.azure.com:443/workflows/72b1a436cf5a4f65950d224869dd7484","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{},"triggers":{},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/FetchModules","name":"FetchModules","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-24T02:14:27.786653Z","changedTime":"2023-11-24T06:30:09.2208755Z","state":"Enabled","version":"08585007994769748875","accessEndpoint":"https://prod-27.eastus.logic.azure.com:443/workflows/8a6ae431a0b240568a4de49e9f25291f","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"manual":{"type":"Request","kind":"Http","inputs":{"method":"POST","schema":{"properties":{"description":{"type":"string"},"title":{"type":"string"}},"type":"object"}}}},"actions":{"Create_a_work_item":{"runAfter":{},"type":"ApiConnection","inputs":{"body":{"area":"One\\Azure + CLI Tools\\Azure CLI","description":"

@{triggerBody()?[''description'']}

","dynamicFields":{"System.AssignedTo":"shiyingchen@microsoft.com","System.Tags":"az + cli codegen virtual assistant"},"iteration":"One\\Germanium","title":"@triggerBody()?[''title'']"},"host":{"connection":{"name":"@parameters(''$connections'')[''visualstudioteamservices_1''][''connectionId'']"}},"method":"patch","path":"/@{encodeURIComponent(''One'')}/_apis/wit/workitems/$@{encodeURIComponent(''Task'')}","queries":{"account":"msazure"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"visualstudioteamservices_1":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azClientToolsAssistant-rg/providers/Microsoft.Web/connections/visualstudioteamservices-3","connectionName":"visualstudioteamservices-3","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/eastus/managedApis/visualstudioteamservices"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.92.98.111"},{"address":"40.121.91.41"},{"address":"40.114.82.191"},{"address":"23.101.139.153"},{"address":"23.100.29.190"},{"address":"23.101.136.201"},{"address":"104.45.153.81"},{"address":"23.101.132.208"},{"address":"52.226.216.197"},{"address":"52.226.216.187"},{"address":"40.76.151.25"},{"address":"40.76.148.50"},{"address":"20.84.29.29"},{"address":"20.84.29.18"},{"address":"40.76.174.83"},{"address":"40.76.174.39"}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"},{"address":"52.226.216.209"},{"address":"40.76.151.124"},{"address":"20.84.29.150"},{"address":"40.76.174.148"}]},"connector":{"outgoingIpAddresses":[{"address":"40.71.249.139"},{"address":"40.71.249.205"},{"address":"40.114.40.132"},{"address":"40.71.11.80/28"},{"address":"40.71.15.160/27"},{"address":"52.188.157.160"},{"address":"20.88.153.176/28"},{"address":"20.88.153.192/27"},{"address":"52.151.221.184"},{"address":"52.151.221.119"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azClientToolsAssistant-rg/providers/Microsoft.Logic/workflows/AutoAdoCreationApp","name":"AutoAdoCreationApp","type":"Microsoft.Logic/workflows","location":"eastus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-08T09:16:25.0980768Z","changedTime":"2023-11-10T02:58:52.2971507Z","state":"Enabled","version":"08585020217531987473","accessEndpoint":"https://prod-31.eastus.logic.azure.com:443/workflows/6237dfeab2134e9d9b5f90f8523be8ae","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"manual":{"type":"Request","kind":"Http","inputs":{"method":"POST","schema":{"properties":{"channelId":{"type":"string"},"question":{"type":"string"},"subject":{"type":"string"},"summary":{"type":"string"},"tagId":{"type":"string"},"tagName":{"type":"string"},"teamId":{"type":"string"},"userId":{"type":"string"},"userName":{"type":"string"}},"type":"object"}}}},"actions":{"Invoke_an_HTTP_request":{"runAfter":{},"type":"ApiConnection","inputs":{"body":{"body":"@{base64(concat(''{'',''\n'','' \"subject\": + \"'',triggerBody()?[''subject''],''\",'',''\n'','' \"body\": {'',''\n'','' \"content\": + \"

Hi '',triggerBody()?[''tagName''],'', could you + help '',triggerBody()?[''userName''],'' with the question + below?

 

Summary

'',triggerBody()?[''summary''],''

+

 

Raw question

'',triggerBody()?[''question''],''

\",'',''\n'','' \"contentType\": + \"html\"'',''\n'','' },'',''\n'','' \"mentions\": ['',''\n'','' {'',''\n'','' \"id\": + 0,'',''\n'','' \"mentionText\": \"'',triggerBody()?[''tagName''],''\",'',''\n'','' \"mentioned\": + {'',''\n'','' \"tag\": {'',''\n'','' \"@odata.type\": + \"microsoft.graph.teamworkTagIdentity\",'',''\n'','' \"id\": + \"'',triggerBody()?[''tagId''],''\",'',''\n'','' \"displayName\": + \"'',triggerBody()?[''tagName''],''\"'',''\n'','' }'',''\n'','' }'',''\n'','' },'',''\n'','' {'',''\n'','' \"id\": + 1,'',''\n'','' \"mentionText\": \"'',triggerBody()?[''userName''],''\",'',''\n'','' \"mentioned\": + {'',''\n'','' \"user\": {'',''\n'','' \"userIdentityType\": + \"aadUser\",'',''\n'','' \"id\": \"'',triggerBody()?[''userId''],''\",'',''\n'','' \"displayName\": + \"'',triggerBody()?[''userName''],''\"'',''\n'','' }'',''\n'','' }'',''\n'','' }'',''\n'','' ]'',''\n'',''}'',''\n''))}","headers":{"Content-Type":"application/json"},"method":"POST","url":"https://graph.microsoft.com/v1.0/teams/@{triggerBody()?[''teamId'']}/channels/@{triggerBody()?[''channelId'']}/messages"},"host":{"connection":{"name":"@parameters(''$connections'')[''webcontents''][''connectionId'']"}},"method":"post","path":"/codeless/InvokeHttp"}}},"outputs":{}},"parameters":{"$connections":{"value":{"webcontents":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azClientToolsAssistant-rg/providers/Microsoft.Web/connections/webcontents","connectionName":"webcontents","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/eastus/managedApis/webcontents"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.92.98.111"},{"address":"40.121.91.41"},{"address":"40.114.82.191"},{"address":"23.101.139.153"},{"address":"23.100.29.190"},{"address":"23.101.136.201"},{"address":"104.45.153.81"},{"address":"23.101.132.208"},{"address":"52.226.216.197"},{"address":"52.226.216.187"},{"address":"40.76.151.25"},{"address":"40.76.148.50"},{"address":"20.84.29.29"},{"address":"20.84.29.18"},{"address":"40.76.174.83"},{"address":"40.76.174.39"}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"},{"address":"52.226.216.209"},{"address":"40.76.151.124"},{"address":"20.84.29.150"},{"address":"40.76.174.148"}]},"connector":{"outgoingIpAddresses":[{"address":"40.71.249.139"},{"address":"40.71.249.205"},{"address":"40.114.40.132"},{"address":"40.71.11.80/28"},{"address":"40.71.15.160/27"},{"address":"52.188.157.160"},{"address":"20.88.153.176/28"},{"address":"20.88.153.192/27"},{"address":"52.151.221.184"},{"address":"52.151.221.119"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azClientToolsAssistant-rg/providers/Microsoft.Logic/workflows/postchannelmessage","name":"postchannelmessage","type":"Microsoft.Logic/workflows","location":"eastus"}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Logic/workflows?%24top=2&api-version=2019-05-01&%24skiptoken=5ZNdb6JAFIb%2fC0l7VcpgwQYTs7G7jAWLVphzcOdulFEpw0dgFLXpfy%2f9EXu11%2b%2f5Sp7nfBqVvOi3vCo6Y%2fJppH7CIDEmxlHrpptYVikqcZClrPSjuJ1a%2bbiry4njPFndadvt2rzReV11Ftna%2b7HzbJv2dk9MJ8uEKeTuydxtvdHzaE881yNW09bnPJNtZ0X5rq27eq8f3%2bpDvrP6ui32qu67X3cjR9fNdHQvmtw8D7XD%2bOmI2J5JXJPY90PeFcPWupDVVF7DE98cCczpNZsrIlLvlIzQDT7qPEp8JwCPMoYrYYMO8j7fluhkNDxnRCuZBOPgwz9GbN0HYNNkc0yEKnpWNVRS2qabbBVjSAFxHis6ZkUci1K7Q76Iie2LG31HPyyh1A7Qv72kLxC9xilCdFmrrEO1TLBwKdxoEiu4AOMrxIaB4qtYYZcWPFnfaAg2Fgliu6Uxi6CZI5u5qLBlBX8Xir8ie1klGOLQBzFyCuzFGe7BJXDkV6KDitw9ZcaD4c%2f%2bP3TR9Z%2bhA3c5oEmZzeegftAeAZCniOs%2bgjCN08sa58UP6jbz%2bQZV83vA5iDCBQdVIsoBGV2sFaeDBhD9wQUW4MI19IyvB0O05exwaOVBaJmxH5uHp5vFkfH1DQ%3d%3d"}' headers: cache-control: - no-cache content-length: - - '26660' + - '19060' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:21 GMT + - Fri, 24 Nov 2023 07:37:11 GMT expires: - '-1' pragma: @@ -417,16 +455,58 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - centralus:d58073ee-0322-4c48-92d9-4163ecd033db - - westus:1a4e5b1d-c6e9-4697-8cdf-5ae5c7e094ea - - eastus:360f061b-f86b-487d-b519-8156d0d61e13 + - centralus:a8cba9d1-d6ef-4a57-9f8d-166dc17958d7 + - westus:d7482d82-98b3-4879-82c3-0f6b6b8dde60 + - eastus:a44db809-1826-4568-8f68-38634734b04c x-ms-ratelimit-remaining-subscription-resource-requests: - '19999' status: code: 200 message: OK - request: - body: '{"sku": {"name": "Basic"}}' + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account update + Connection: + - keep-alive + ParameterSetName: + - --sku --name --resource-group + User-Agent: + - AZURECLI/2.54.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_000002?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002","name":"cli_test_000002","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_logic","date":"2023-11-24T07:36:51Z","module":"logic"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '345' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Nov 2023 07:37:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "sku": {"name": "Basic"}}' headers: Accept: - application/json @@ -437,13 +517,13 @@ interactions: Connection: - keep-alive Content-Length: - - '26' + - '48' Content-Type: - application/json ParameterSetName: - --sku --name --resource-group User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: @@ -457,11 +537,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:28 GMT + - Fri, 24 Nov 2023 07:37:14 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=6e079698df7882eaf22e06fefcd5651a3566a6f76cfbe4c50e9be46eda9ede95;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=6e079698df7882eaf22e06fefcd5651a3566a6f76cfbe4c50e9be46eda9ede95;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -489,12 +572,54 @@ interactions: ParameterSetName: - --resource-group --tag --definition --name User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001","name":"cli_test_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_logic","date":"2023-11-24T07:36:47Z","module":"logic"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '345' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Nov 2023 07:37:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --tag --definition --name + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-24T07:37:00.5184606Z","changedTime":"2023-11-24T07:37:00.5151478Z","state":"Enabled","version":"08585007954649887230","accessEndpoint":"https://prod-03.centralus.logic.azure.com:443/workflows/ac81639b6ff0400f9ce36fdca8ac9206","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' headers: cache-control: - no-cache @@ -503,11 +628,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:30 GMT + - Fri, 24 Nov 2023 07:37:17 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=c7e558761f58304444ef69618be1b9c131674d1fae66a08eb93775ce72c520da;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=c7e558761f58304444ef69618be1b9c131674d1fae66a08eb93775ce72c520da;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -522,25 +650,24 @@ interactions: code: 200 message: OK - request: - body: '{"location": "centralus", "tags": {"atag": "123"}, "properties": {"state": - "Enabled", "endpointsConfiguration": {"workflow": {"outgoingIpAddresses": [{"address": - "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, - {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, - {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, - {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}], - "accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": "40.77.111.254"}, - {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, {"address": "13.86.98.126"}, - {"address": "20.109.202.37"}]}, "connector": {"outgoingIpAddresses": [{"address": - "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, - {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, - {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}}, - "definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + body: '{"location": "centralus", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": {}, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": {"$connections": {"defaultValue": {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}, "recurrence": {"frequency": "Minute", "interval": 2}, "splitOn": "@triggerBody()?[''value'']", - "type": "ApiConnection"}}}}}' + "type": "ApiConnection"}}}, "endpointsConfiguration": {"connector": {"outgoingIpAddresses": + [{"address": "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, + {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, + {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}, + "workflow": {"accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": + "40.77.111.254"}, {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, + {"address": "13.86.98.126"}, {"address": "20.109.202.37"}], "outgoingIpAddresses": + [{"address": "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, + {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, + {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, + {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}]}}, + "provisioningState": "Succeeded", "state": "Enabled"}, "tags": {"atag": "123"}}' headers: Accept: - application/json @@ -551,18 +678,18 @@ interactions: Connection: - keep-alive Content-Length: - - '1676' + - '1710' Content-Type: - application/json ParameterSetName: - --resource-group --tag --definition --name User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:32.6571013Z","changedTime":"2023-06-26T03:43:32.6393672Z","state":"Enabled","version":"08585138558740241614","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"123"}}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-24T07:37:18.4439271Z","changedTime":"2023-11-24T07:37:18.4291122Z","state":"Enabled","version":"08585007954470527371","accessEndpoint":"https://prod-03.centralus.logic.azure.com:443/workflows/ac81639b6ff0400f9ce36fdca8ac9206","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"123"}}' headers: cache-control: - no-cache @@ -571,11 +698,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:37 GMT + - Fri, 24 Nov 2023 07:37:19 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=404c30ae164cea1996847a74bb6b599076bae071bff69e3a69c7f1aed31d448b;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=404c30ae164cea1996847a74bb6b599076bae071bff69e3a69c7f1aed31d448b;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -603,12 +733,54 @@ interactions: ParameterSetName: - --resource-group --tag --name User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001","name":"cli_test_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_logic","date":"2023-11-24T07:36:47Z","module":"logic"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '345' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Nov 2023 07:37:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --tag --name + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:32.6393672Z","state":"Enabled","version":"08585138558740241614","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"123"}}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-24T07:37:00.5184606Z","changedTime":"2023-11-24T07:37:18.4291122Z","state":"Enabled","version":"08585007954470527371","accessEndpoint":"https://prod-03.centralus.logic.azure.com:443/workflows/ac81639b6ff0400f9ce36fdca8ac9206","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"123"}}' headers: cache-control: - no-cache @@ -617,11 +789,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:40 GMT + - Fri, 24 Nov 2023 07:37:21 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=eac69d9633b62a80172d43feba694263b4d9fccb8b9d953b364b8fc058f6e946;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=eac69d9633b62a80172d43feba694263b4d9fccb8b9d953b364b8fc058f6e946;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -636,26 +811,25 @@ interactions: code: 200 message: OK - request: - body: '{"location": "centralus", "tags": {"atag": "foo"}, "properties": {"state": - "Enabled", "endpointsConfiguration": {"workflow": {"outgoingIpAddresses": [{"address": - "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, - {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, - {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, - {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}], - "accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": "40.77.111.254"}, - {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, {"address": "13.86.98.126"}, - {"address": "20.109.202.37"}]}, "connector": {"outgoingIpAddresses": [{"address": - "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, - {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, - {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}}, - "definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + body: '{"location": "centralus", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "contentVersion": "1.0.0.0", "parameters": {"$connections": {"defaultValue": {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"recurrence": {"frequency": "Minute", "interval": 2}, "evaluatedRecurrence": {"frequency": "Minute", "interval": 2}, "splitOn": "@triggerBody()?[''value'']", "type": "ApiConnection", "inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}}}, - "actions": {}, "outputs": {}}}}' + "actions": {}, "outputs": {}}, "endpointsConfiguration": {"connector": {"outgoingIpAddresses": + [{"address": "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, + {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, + {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}, + "workflow": {"accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": + "40.77.111.254"}, {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, + {"address": "13.86.98.126"}, {"address": "20.109.202.37"}], "outgoingIpAddresses": + [{"address": "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, + {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, + {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, + {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}]}}, + "provisioningState": "Succeeded", "state": "Enabled"}, "tags": {"atag": "foo"}}' headers: Accept: - application/json @@ -666,18 +840,18 @@ interactions: Connection: - keep-alive Content-Length: - - '1739' + - '1773' Content-Type: - application/json ParameterSetName: - --resource-group --tag --name User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:40.9525999Z","changedTime":"2023-06-26T03:43:40.9440926Z","state":"Enabled","version":"08585138558645467342","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"foo"}}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-24T07:37:22.7970418Z","changedTime":"2023-11-24T07:37:22.7829504Z","state":"Enabled","version":"08585007954427886257","accessEndpoint":"https://prod-03.centralus.logic.azure.com:443/workflows/ac81639b6ff0400f9ce36fdca8ac9206","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"foo"}}' headers: cache-control: - no-cache @@ -686,11 +860,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Jun 2023 03:43:44 GMT + - Fri, 24 Nov 2023 07:37:24 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -708,7 +885,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -720,7 +897,7 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: @@ -732,11 +909,14 @@ interactions: content-length: - '0' date: - - Mon, 26 Jun 2023 03:43:54 GMT + - Fri, 24 Nov 2023 07:37:31 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=404c30ae164cea1996847a74bb6b599076bae071bff69e3a69c7f1aed31d448b;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=404c30ae164cea1996847a74bb6b599076bae071bff69e3a69c7f1aed31d448b;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -750,7 +930,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -762,7 +942,7 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: @@ -774,11 +954,14 @@ interactions: content-length: - '0' date: - - Mon, 26 Jun 2023 03:43:59 GMT + - Fri, 24 Nov 2023 07:37:34 GMT expires: - '-1' pragma: - no-cache + set-cookie: + - ARRAffinity=404c30ae164cea1996847a74bb6b599076bae071bff69e3a69c7f1aed31d448b;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=404c30ae164cea1996847a74bb6b599076bae071bff69e3a69c7f1aed31d448b;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: diff --git a/src/logic/azext_logic/tests/latest/recordings/test_workflow_identity.yaml b/src/logic/azext_logic/tests/latest/recordings/test_workflow_identity.yaml new file mode 100644 index 00000000000..4c289c679f2 --- /dev/null +++ b/src/logic/azext_logic/tests/latest/recordings/test_workflow_identity.yaml @@ -0,0 +1,1137 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + ParameterSetName: + - --name -g + User-Agent: + - AZURECLI/2.54.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_workflow_identity","date":"2023-11-29T03:34:48Z","module":"logic"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '359' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:34:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 1B440B7076944973AA2E6DDA9CB811FB Ref B: TYO201100113009 Ref C: 2023-11-29T03:34:49Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "westus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - --name -g + User-Agent: + - AZURECLI/2.54.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity000006?api-version=2023-01-31 + response: + body: + string: '{"location":"westus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity000006","name":"identity000006","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","principalId":"4426521a-b503-4f42-9f3b-1cbe45963b4a","clientId":"70b427e2-0286-45fb-866d-5585e2ce7f6c"}}' + headers: + cache-control: + - no-cache + content-length: + - '446' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:34:51 GMT + expires: + - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity000006 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 81BEE8E619EC4D0EB1EB9C58E3A38FF9 Ref B: TYO201100115023 Ref C: 2023-11-29T03:34:49Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --definition --name --mi-system-assigned + User-Agent: + - AZURECLI/2.54.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_workflow_identity","date":"2023-11-29T03:34:48Z","module":"logic"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '359' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:34:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: CED486FF24BB4FF4B184ABF3026A54EA Ref B: TYO201100117035 Ref C: 2023-11-29T03:34:52Z' + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "location": "westus", "properties": + {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "actions": {}, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": {"$connections": + {"defaultValue": {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": + {"inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}, + "recurrence": {"frequency": "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", + "type": "ApiConnection"}}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow create + Connection: + - keep-alive + Content-Length: + - '719' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --definition --name --mi-system-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000002?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:34:54.7186543Z","changedTime":"2023-11-29T03:34:54.7031591Z","state":"Enabled","version":"08585003779908855223","accessEndpoint":"https://prod-133.westus.logic.azure.com:443/workflows/60616d273c1c4e4fb12937c712663b3e","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000002","name":"workflow000002","type":"Microsoft.Logic/workflows","location":"westus","identity":{"type":"SystemAssigned","principalId":"c3e00032-6f8f-4d45-92d6-30c976d3397e","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' + headers: + cache-control: + - no-cache + content-length: + - '2739' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:34:54 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=c2b9d69c51fd5a6df044daf7280a107ee9fa39e756a902b2cf656c1a7f494e34;Path=/;HttpOnly;Secure;Domain=management.westus.logic.azure.com + - ARRAffinitySameSite=c2b9d69c51fd5a6df044daf7280a107ee9fa39e756a902b2cf656c1a7f494e34;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.westus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 8785198F8B6E4903BFD6944D0EEC8929 Ref B: TYO201100117047 Ref C: 2023-11-29T03:34:52Z' + status: + code: 201 + message: Created +- request: + body: '{"identity": {"type": "UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity000006": + {}}}, "location": "centralus", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "actions": {}, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": {"$connections": + {"defaultValue": {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": + {"inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}, + "recurrence": {"frequency": "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", + "type": "ApiConnection"}}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow create + Connection: + - keep-alive + Content-Length: + - '913' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --location --definition --name --mi-user-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000003?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:34:58.0631844Z","changedTime":"2023-11-29T03:34:58.0555693Z","state":"Enabled","version":"08585003779875687665","accessEndpoint":"https://prod-17.centralus.logic.azure.com:443/workflows/ea6723da8efc49aebd17c06f38bd6f1f","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000003","name":"workflow000003","type":"Microsoft.Logic/workflows","location":"centralus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity000006":{"principalId":"4426521a-b503-4f42-9f3b-1cbe45963b4a","clientId":"70b427e2-0286-45fb-866d-5585e2ce7f6c"}}}}' + headers: + cache-control: + - no-cache + content-length: + - '2414' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:34:57 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 278C8423F10746D4A787BEC532182692 Ref B: TYO201100116021 Ref C: 2023-11-29T03:34:55Z' + status: + code: 201 + message: Created +- request: + body: '{"location": "centralus", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "actions": {}, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": {"$connections": + {"defaultValue": {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": + {"inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}, + "recurrence": {"frequency": "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", + "type": "ApiConnection"}}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow create + Connection: + - keep-alive + Content-Length: + - '682' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --location --definition --name + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:00.0872794Z","changedTime":"2023-11-29T03:35:00.0754599Z","state":"Enabled","version":"08585003779854095715","accessEndpoint":"https://prod-14.centralus.logic.azure.com:443/workflows/b09ea218d1d744f08d0155b09fcec480","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004","name":"workflow000004","type":"Microsoft.Logic/workflows","location":"centralus"}' + headers: + cache-control: + - no-cache + content-length: + - '2087' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:34:59 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=c7e558761f58304444ef69618be1b9c131674d1fae66a08eb93775ce72c520da;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=c7e558761f58304444ef69618be1b9c131674d1fae66a08eb93775ce72c520da;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: B2D2C8021BD243448E7C9A90AC611CED Ref B: TYO201100115033 Ref C: 2023-11-29T03:34:58Z' + status: + code: 201 + message: Created +- request: + body: '{"location": "centralus", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "actions": {}, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": {"$connections": + {"defaultValue": {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": + {"inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}, + "recurrence": {"frequency": "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", + "type": "ApiConnection"}}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow create + Connection: + - keep-alive + Content-Length: + - '682' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --location --definition --name + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:02.2628102Z","changedTime":"2023-11-29T03:35:02.2504772Z","state":"Enabled","version":"08585003779832353749","accessEndpoint":"https://prod-21.centralus.logic.azure.com:443/workflows/10f5a5157ae84f7c8da62175b9df8ec4","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005","name":"workflow000005","type":"Microsoft.Logic/workflows","location":"centralus"}' + headers: + cache-control: + - no-cache + content-length: + - '2087' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:01 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=03653a5ff26f7e0adf0cd33338b896ea4ee4856ba3918ba0940d9b1fda36f29c;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=03653a5ff26f7e0adf0cd33338b896ea4ee4856ba3918ba0940d9b1fda36f29c;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 517E39DFA5874D6EBFB52C88D1C9A503 Ref B: TYO201100116023 Ref C: 2023-11-29T03:35:00Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity assign + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --system-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:00.0872794Z","changedTime":"2023-11-29T03:35:00.0754599Z","state":"Enabled","version":"08585003779854095715","accessEndpoint":"https://prod-14.centralus.logic.azure.com:443/workflows/b09ea218d1d744f08d0155b09fcec480","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004","name":"workflow000004","type":"Microsoft.Logic/workflows","location":"centralus"}' + headers: + cache-control: + - no-cache + content-length: + - '2087' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:03 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=404c30ae164cea1996847a74bb6b599076bae071bff69e3a69c7f1aed31d448b;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=404c30ae164cea1996847a74bb6b599076bae071bff69e3a69c7f1aed31d448b;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '19999' + x-msedge-ref: + - 'Ref A: E25F62B936914CCDBD4829A7644823DB Ref B: TYO201100114019 Ref C: 2023-11-29T03:35:03Z' + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "location": "centralus", "properties": + {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", "parameters": {"$connections": {"defaultValue": + {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"recurrence": + {"frequency": "Minute", "interval": 1}, "evaluatedRecurrence": {"frequency": + "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", "type": "ApiConnection", + "inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}}}, + "actions": {}, "outputs": {}}, "endpointsConfiguration": {"connector": {"outgoingIpAddresses": + [{"address": "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, + {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, + {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}, + "workflow": {"accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": + "40.77.111.254"}, {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, + {"address": "13.86.98.126"}, {"address": "20.109.202.37"}], "outgoingIpAddresses": + [{"address": "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, + {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, + {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, + {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}]}}, + "provisioningState": "Succeeded", "state": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity assign + Connection: + - keep-alive + Content-Length: + - '1788' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --system-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:06.0897508Z","changedTime":"2023-11-29T03:35:06.0778161Z","state":"Enabled","version":"08585003779794083933","accessEndpoint":"https://prod-14.centralus.logic.azure.com:443/workflows/b09ea218d1d744f08d0155b09fcec480","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004","name":"workflow000004","type":"Microsoft.Logic/workflows","location":"centralus","identity":{"type":"SystemAssigned","principalId":"fe7544f2-688a-4d52-9169-93fde4a23462","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' + headers: + cache-control: + - no-cache + content-length: + - '2227' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:05 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=6e079698df7882eaf22e06fefcd5651a3566a6f76cfbe4c50e9be46eda9ede95;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=6e079698df7882eaf22e06fefcd5651a3566a6f76cfbe4c50e9be46eda9ede95;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 81B340B79E8746FB8C386807AC9E3F84 Ref B: TYO201100114019 Ref C: 2023-11-29T03:35:04Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity assign + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --user-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:02.2628102Z","changedTime":"2023-11-29T03:35:02.2504772Z","state":"Enabled","version":"08585003779832353749","accessEndpoint":"https://prod-21.centralus.logic.azure.com:443/workflows/10f5a5157ae84f7c8da62175b9df8ec4","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005","name":"workflow000005","type":"Microsoft.Logic/workflows","location":"centralus"}' + headers: + cache-control: + - no-cache + content-length: + - '2087' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:08 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=0632ca9db79921cff52d39e8281a50ff464d1c11d97e789130cd466b9287fce9;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=0632ca9db79921cff52d39e8281a50ff464d1c11d97e789130cd466b9287fce9;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '19999' + x-msedge-ref: + - 'Ref A: F220C6435A9143839CBA23C7A9855319 Ref B: TYO201100113037 Ref C: 2023-11-29T03:35:07Z' + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity000006": + {}}}, "location": "centralus", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", "parameters": {"$connections": {"defaultValue": + {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"recurrence": + {"frequency": "Minute", "interval": 1}, "evaluatedRecurrence": {"frequency": + "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", "type": "ApiConnection", + "inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}}}, + "actions": {}, "outputs": {}}, "endpointsConfiguration": {"connector": {"outgoingIpAddresses": + [{"address": "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, + {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, + {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}, + "workflow": {"accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": + "40.77.111.254"}, {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, + {"address": "13.86.98.126"}, {"address": "20.109.202.37"}], "outgoingIpAddresses": + [{"address": "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, + {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, + {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, + {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}]}}, + "provisioningState": "Succeeded", "state": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity assign + Connection: + - keep-alive + Content-Length: + - '1979' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --user-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:10.0534718Z","changedTime":"2023-11-29T03:35:10.0400656Z","state":"Enabled","version":"08585003779755611795","accessEndpoint":"https://prod-21.centralus.logic.azure.com:443/workflows/10f5a5157ae84f7c8da62175b9df8ec4","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005","name":"workflow000005","type":"Microsoft.Logic/workflows","location":"centralus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity000006":{"principalId":"4426521a-b503-4f42-9f3b-1cbe45963b4a","clientId":"70b427e2-0286-45fb-866d-5585e2ce7f6c"}}}}' + headers: + cache-control: + - no-cache + content-length: + - '2414' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:10 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=746146f9b8a568138e0f8e8d19178ca6868557dc4149a92ed430f901c8a2c233;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: EAF9AA44B5784464946225031ECB09E1 Ref B: TYO201100113037 Ref C: 2023-11-29T03:35:08Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity remove + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --system-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000002?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:34:54.7186543Z","changedTime":"2023-11-29T03:34:54.7031591Z","state":"Enabled","version":"08585003779908855223","accessEndpoint":"https://prod-133.westus.logic.azure.com:443/workflows/60616d273c1c4e4fb12937c712663b3e","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000002","name":"workflow000002","type":"Microsoft.Logic/workflows","location":"westus","identity":{"type":"SystemAssigned","principalId":"c3e00032-6f8f-4d45-92d6-30c976d3397e","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' + headers: + cache-control: + - no-cache + content-length: + - '2739' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:10 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=19396397bf4da0fe0e219a6840c79cf0242e514db462093f829c995b7a5c4f5f;Path=/;HttpOnly;Secure;Domain=management.westus.logic.azure.com + - ARRAffinitySameSite=19396397bf4da0fe0e219a6840c79cf0242e514db462093f829c995b7a5c4f5f;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.westus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '19998' + x-msedge-ref: + - 'Ref A: 66A8926713F44B159F7459FF95C72D19 Ref B: TYO201100113049 Ref C: 2023-11-29T03:35:10Z' + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "None"}, "location": "westus", "properties": {"definition": + {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", "parameters": {"$connections": {"defaultValue": + {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"recurrence": + {"frequency": "Minute", "interval": 1}, "evaluatedRecurrence": {"frequency": + "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", "type": "ApiConnection", + "inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}}}, + "actions": {}, "outputs": {}}, "endpointsConfiguration": {"connector": {"outgoingIpAddresses": + [{"address": "13.93.148.62"}, {"address": "104.42.122.49"}, {"address": "40.112.195.87"}, + {"address": "13.86.223.32/27"}, {"address": "40.112.243.160/28"}, {"address": + "20.59.77.0/27"}, {"address": "20.66.6.112/28"}]}, "workflow": {"accessEndpointIpAddresses": + [{"address": "52.160.90.237"}, {"address": "138.91.188.137"}, {"address": "13.91.252.184"}, + {"address": "157.56.160.212"}, {"address": "104.40.34.112"}, {"address": "52.160.68.27"}, + {"address": "13.88.168.158"}, {"address": "104.42.40.164"}, {"address": "13.87.207.79"}, + {"address": "13.87.204.210"}, {"address": "168.62.9.100"}], "outgoingIpAddresses": + [{"address": "52.160.92.112"}, {"address": "40.118.244.241"}, {"address": "40.118.241.243"}, + {"address": "157.56.162.53"}, {"address": "157.56.167.147"}, {"address": "104.42.49.145"}, + {"address": "40.83.164.80"}, {"address": "104.42.38.32"}, {"address": "13.86.223.0"}, + {"address": "13.86.223.1"}, {"address": "13.86.223.2"}, {"address": "13.86.223.3"}, + {"address": "13.86.223.4"}, {"address": "13.86.223.5"}, {"address": "104.40.34.169"}, + {"address": "104.40.32.148"}, {"address": "52.160.70.221"}, {"address": "52.160.70.105"}, + {"address": "13.91.81.221"}, {"address": "13.64.231.196"}, {"address": "13.87.204.182"}, + {"address": "40.78.65.193"}, {"address": "13.87.207.39"}, {"address": "104.42.44.28"}, + {"address": "40.83.134.97"}, {"address": "40.78.65.112"}, {"address": "168.62.9.74"}, + {"address": "168.62.28.191"}]}}, "provisioningState": "Succeeded", "state": + "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity remove + Connection: + - keep-alive + Content-Length: + - '2330' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --system-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000002?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:12.6307515Z","changedTime":"2023-11-29T03:35:12.6116044Z","state":"Enabled","version":"08585003779728633821","accessEndpoint":"https://prod-133.westus.logic.azure.com:443/workflows/60616d273c1c4e4fb12937c712663b3e","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000002","name":"workflow000002","type":"Microsoft.Logic/workflows","location":"westus"}' + headers: + cache-control: + - no-cache + content-length: + - '2599' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:12 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a523388b79bc4bdb5ad8eb038e5f69a139004d717b20e79737f959c8bd6bd07d;Path=/;HttpOnly;Secure;Domain=management.westus.logic.azure.com + - ARRAffinitySameSite=a523388b79bc4bdb5ad8eb038e5f69a139004d717b20e79737f959c8bd6bd07d;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.westus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-msedge-ref: + - 'Ref A: 4B9A987CFD8849808D92C2847D0235F6 Ref B: TYO201100113049 Ref C: 2023-11-29T03:35:11Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity remove + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --user-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000003?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:34:58.0631844Z","changedTime":"2023-11-29T03:34:58.0555693Z","state":"Enabled","version":"08585003779875687665","accessEndpoint":"https://prod-17.centralus.logic.azure.com:443/workflows/ea6723da8efc49aebd17c06f38bd6f1f","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000003","name":"workflow000003","type":"Microsoft.Logic/workflows","location":"centralus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity000006":{"principalId":"4426521a-b503-4f42-9f3b-1cbe45963b4a","clientId":"70b427e2-0286-45fb-866d-5585e2ce7f6c"}}}}' + headers: + cache-control: + - no-cache + content-length: + - '2414' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:14 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=f9874cfcec5b209c3abef41406e1b5ce057493cc5d949e7c78aaa4e7d5a7ddf1;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=f9874cfcec5b209c3abef41406e1b5ce057493cc5d949e7c78aaa4e7d5a7ddf1;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '19998' + x-msedge-ref: + - 'Ref A: D8772726A84B46AAB6B6D8EBFB0B532A Ref B: TYO201100113027 Ref C: 2023-11-29T03:35:13Z' + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "None", "userAssignedIdentities": {}}, "location": + "centralus", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", "parameters": {"$connections": {"defaultValue": + {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"recurrence": + {"frequency": "Minute", "interval": 1}, "evaluatedRecurrence": {"frequency": + "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", "type": "ApiConnection", + "inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}}}, + "actions": {}, "outputs": {}}, "endpointsConfiguration": {"connector": {"outgoingIpAddresses": + [{"address": "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, + {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, + {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}, + "workflow": {"accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": + "40.77.111.254"}, {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, + {"address": "13.86.98.126"}, {"address": "20.109.202.37"}], "outgoingIpAddresses": + [{"address": "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, + {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, + {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, + {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}]}}, + "provisioningState": "Succeeded", "state": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity remove + Connection: + - keep-alive + Content-Length: + - '1808' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --user-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000003?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:15.3206259Z","changedTime":"2023-11-29T03:35:15.2881994Z","state":"Enabled","version":"08585003779702064008","accessEndpoint":"https://prod-17.centralus.logic.azure.com:443/workflows/ea6723da8efc49aebd17c06f38bd6f1f","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000003","name":"workflow000003","type":"Microsoft.Logic/workflows","location":"centralus"}' + headers: + cache-control: + - no-cache + content-length: + - '2087' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:15 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=f9874cfcec5b209c3abef41406e1b5ce057493cc5d949e7c78aaa4e7d5a7ddf1;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=f9874cfcec5b209c3abef41406e1b5ce057493cc5d949e7c78aaa4e7d5a7ddf1;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: A23F21D35FB14F9F806A2A5BF11FAE69 Ref B: TYO201100113027 Ref C: 2023-11-29T03:35:14Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity remove + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --system-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:00.0872794Z","changedTime":"2023-11-29T03:35:06.0778161Z","state":"Enabled","version":"08585003779794083933","accessEndpoint":"https://prod-14.centralus.logic.azure.com:443/workflows/b09ea218d1d744f08d0155b09fcec480","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004","name":"workflow000004","type":"Microsoft.Logic/workflows","location":"centralus","identity":{"type":"SystemAssigned","principalId":"fe7544f2-688a-4d52-9169-93fde4a23462","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' + headers: + cache-control: + - no-cache + content-length: + - '2227' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:17 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=f9874cfcec5b209c3abef41406e1b5ce057493cc5d949e7c78aaa4e7d5a7ddf1;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=f9874cfcec5b209c3abef41406e1b5ce057493cc5d949e7c78aaa4e7d5a7ddf1;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '19999' + x-msedge-ref: + - 'Ref A: 68F51CA8269C4AAC94D67F3DF7BEB63D Ref B: TYO201100113017 Ref C: 2023-11-29T03:35:16Z' + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "None"}, "location": "centralus", "properties": {"definition": + {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", "parameters": {"$connections": {"defaultValue": + {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"recurrence": + {"frequency": "Minute", "interval": 1}, "evaluatedRecurrence": {"frequency": + "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", "type": "ApiConnection", + "inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}}}, + "actions": {}, "outputs": {}}, "endpointsConfiguration": {"connector": {"outgoingIpAddresses": + [{"address": "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, + {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, + {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}, + "workflow": {"accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": + "40.77.111.254"}, {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, + {"address": "13.86.98.126"}, {"address": "20.109.202.37"}], "outgoingIpAddresses": + [{"address": "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, + {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, + {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, + {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}]}}, + "provisioningState": "Succeeded", "state": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity remove + Connection: + - keep-alive + Content-Length: + - '1778' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --system-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:19.3897772Z","changedTime":"2023-11-29T03:35:19.3820078Z","state":"Enabled","version":"08585003779661073597","accessEndpoint":"https://prod-14.centralus.logic.azure.com:443/workflows/b09ea218d1d744f08d0155b09fcec480","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000004","name":"workflow000004","type":"Microsoft.Logic/workflows","location":"centralus"}' + headers: + cache-control: + - no-cache + content-length: + - '2087' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:19 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=5438b719719a236f0061a2df82ee876e245535582e51f65e9a5afcc69a780aee;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=5438b719719a236f0061a2df82ee876e245535582e51f65e9a5afcc69a780aee;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 995229D100C5484FAD7B6772F7EFA57D Ref B: TYO201100113017 Ref C: 2023-11-29T03:35:17Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity remove + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --user-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:02.2628102Z","changedTime":"2023-11-29T03:35:10.0400656Z","state":"Enabled","version":"08585003779755611795","accessEndpoint":"https://prod-21.centralus.logic.azure.com:443/workflows/10f5a5157ae84f7c8da62175b9df8ec4","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005","name":"workflow000005","type":"Microsoft.Logic/workflows","location":"centralus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity000006":{"principalId":"4426521a-b503-4f42-9f3b-1cbe45963b4a","clientId":"70b427e2-0286-45fb-866d-5585e2ce7f6c"}}}}' + headers: + cache-control: + - no-cache + content-length: + - '2414' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:20 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=5438b719719a236f0061a2df82ee876e245535582e51f65e9a5afcc69a780aee;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=5438b719719a236f0061a2df82ee876e245535582e51f65e9a5afcc69a780aee;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '19997' + x-msedge-ref: + - 'Ref A: 10119729039845FD820F7C435D8698F2 Ref B: TYO201100113049 Ref C: 2023-11-29T03:35:20Z' + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "None", "userAssignedIdentities": {}}, "location": + "centralus", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", "parameters": {"$connections": {"defaultValue": + {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"recurrence": + {"frequency": "Minute", "interval": 1}, "evaluatedRecurrence": {"frequency": + "Minute", "interval": 1}, "splitOn": "@triggerBody()?[''value'']", "type": "ApiConnection", + "inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, + "method": "get", "path": "/OnNewFeed", "queries": {"feedUrl": "http://feeds.reuters.com/reuters/topNews"}}}}, + "actions": {}, "outputs": {}}, "endpointsConfiguration": {"connector": {"outgoingIpAddresses": + [{"address": "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, + {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, + {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}, + "workflow": {"accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": + "40.77.111.254"}, {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, + {"address": "13.86.98.126"}, {"address": "20.109.202.37"}], "outgoingIpAddresses": + [{"address": "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, + {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, + {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, + {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}]}}, + "provisioningState": "Succeeded", "state": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic workflow identity remove + Connection: + - keep-alive + Content-Length: + - '1808' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --user-assigned + User-Agent: + - AZURECLI/2.54.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005?api-version=2019-05-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-11-29T03:35:22.4903288Z","changedTime":"2023-11-29T03:35:22.4757571Z","state":"Enabled","version":"08585003779630588465","accessEndpoint":"https://prod-21.centralus.logic.azure.com:443/workflows/10f5a5157ae84f7c8da62175b9df8ec4","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/workflows/workflow000005","name":"workflow000005","type":"Microsoft.Logic/workflows","location":"centralus"}' + headers: + cache-control: + - no-cache + content-length: + - '2087' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Nov 2023 03:35:22 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=5438b719719a236f0061a2df82ee876e245535582e51f65e9a5afcc69a780aee;Path=/;HttpOnly;Secure;Domain=management.centralus.logic.azure.com + - ARRAffinitySameSite=5438b719719a236f0061a2df82ee876e245535582e51f65e9a5afcc69a780aee;Path=/;HttpOnly;SameSite=None;Secure;Domain=management.centralus.logic.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 5FFB06AD6F2B4427830D72DEE123FFB0 Ref B: TYO201100113049 Ref C: 2023-11-29T03:35:20Z' + status: + code: 200 + message: OK +version: 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 da162445930..43ec1137839 100644 --- a/src/logic/azext_logic/tests/latest/test_logic_scenario.py +++ b/src/logic/azext_logic/tests/latest/test_logic_scenario.py @@ -4,11 +4,12 @@ # -------------------------------------------------------------------------------------------- import os +import time from azure.cli.testsdk import JMESPathCheck from azure.cli.testsdk import ScenarioTest from azure.cli.testsdk import ResourceGroupPreparer, record_only - +from azure.cli.testsdk.scenario_tests import AllowLargeResponse TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) @@ -73,11 +74,13 @@ def test_logic(self, resource_group): '--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 integration-account list --top 2', checks=[ + self.check('length(@)', 2) + ]) - self.cmd('az logic workflow list', - checks=[JMESPathCheck('[0].name', self.kwargs.get('testWorkflow', ''))]) + self.cmd('az logic workflow list --top 2', checks=[ + self.check('length(@)', 2) + ]) self.cmd('az logic integration-account update ' '--sku Basic ' @@ -143,3 +146,87 @@ def test_integration_account_map(self): self.exists('[0].contentLink.uri') ]) self.cmd('logic integration-account map delete -g {rg} -n {map} --integration-account {account} -y') + + @AllowLargeResponse() + @ResourceGroupPreparer() + def test_workflow_identity(self): + curr_dir = os.path.dirname(os.path.realpath(__file__)) + self.kwargs.update({ + 'workflow1': self.create_random_name('workflow', 15), + 'workflow2': self.create_random_name('workflow', 15), + 'workflow3': self.create_random_name('workflow', 15), + 'workflow4': self.create_random_name('workflow', 15), + 'definition_path': os.path.join(curr_dir, 'workflow.json'), + 'identity1': self.create_random_name('identity', 15) + }) + identity1 = self.cmd('identity create --name {identity1} -g {rg}') + self.kwargs['identity_id1'] = identity1.get_output_in_json()['id'] + self.cmd('az logic workflow create ' + '--resource-group "{rg}" ' + '--definition "{definition_path}" ' + '--name "{workflow1}" ' + '--mi-system-assigned', + checks=[ + self.check('identity.type', 'SystemAssigned') + ]) + self.cmd('az logic workflow create ' + '--resource-group "{rg}" ' + '--location "centralus" ' + '--definition "{definition_path}" ' + '--name "{workflow2}" ' + '--mi-user-assigned {identity_id1} {identity_id1}', + checks=[ + self.check('identity.type', 'UserAssigned') + ]) + self.cmd('az logic workflow create ' + '--resource-group "{rg}" ' + '--location "centralus" ' + '--definition "{definition_path}" ' + '--name "{workflow3}"') + self.cmd('az logic workflow create ' + '--resource-group "{rg}" ' + '--location "centralus" ' + '--definition "{definition_path}" ' + '--name "{workflow4}"') + self.cmd('az logic workflow identity assign ' + '--resource-group "{rg}" ' + '--name "{workflow3}" ' + '--system-assigned', + checks=[ + self.check('type', 'SystemAssigned') + ]) + self.cmd('az logic workflow identity assign ' + '--resource-group "{rg}" ' + '--name "{workflow4}" ' + '--user-assigned {identity_id1}', + checks=[ + self.check('type', 'UserAssigned') + ]) + self.cmd('az logic workflow identity remove ' + '--resource-group "{rg}" ' + '--name "{workflow1}" ' + '--system-assigned', + checks=[ + self.check('type', None) + ]) + self.cmd('az logic workflow identity remove ' + '--resource-group "{rg}" ' + '--name "{workflow2}" ' + '--user-assigned {identity_id1}', + checks=[ + self.check('type', None) + ]) + self.cmd('az logic workflow identity remove ' + '--resource-group "{rg}" ' + '--name "{workflow3}" ' + '--system-assigned', + checks=[ + self.check('identity.type', None) + ]) + self.cmd('az logic workflow identity remove ' + '--resource-group "{rg}" ' + '--name "{workflow4}" ' + '--user-assigned {identity_id1}', + checks=[ + self.check('type', None) + ]) diff --git a/src/logic/azext_logic/vendored_sdks/__init__.py b/src/logic/azext_logic/vendored_sdks/__init__.py deleted file mode 100644 index be1a152630c..00000000000 --- a/src/logic/azext_logic/vendored_sdks/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/src/logic/azext_logic/vendored_sdks/logic/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/__init__.py deleted file mode 100644 index ff14d90f557..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._logic_management_client import LogicManagementClient -from ._version import VERSION - -__version__ = VERSION -__all__ = ['LogicManagementClient'] - -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() diff --git a/src/logic/azext_logic/vendored_sdks/logic/_configuration.py b/src/logic/azext_logic/vendored_sdks/logic/_configuration.py deleted file mode 100644 index dd393060c67..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/_configuration.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy - -from ._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials import TokenCredential - - -class LogicManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes - """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.TokenCredential - :param subscription_id: The subscription id. - :type subscription_id: str - :keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this - default value may result in unsupported behavior. - :paramtype api_version: str - """ - - def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: - super(LogicManagementClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - 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.") - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-logic/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> 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.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 = ARMChallengeAuthenticationPolicy(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 deleted file mode 100644 index 97028a93e61..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/_logic_management_client.py +++ /dev/null @@ -1,201 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, TYPE_CHECKING - -from msrest import Deserializer, Serializer - -from azure.core.rest import HttpRequest, HttpResponse -from azure.mgmt.core import ARMPipelineClient - -from . import models -from ._configuration import LogicManagementClientConfiguration -from .operations import IntegrationAccountAgreementsOperations, IntegrationAccountAssembliesOperations, IntegrationAccountBatchConfigurationsOperations, IntegrationAccountCertificatesOperations, IntegrationAccountMapsOperations, IntegrationAccountPartnersOperations, IntegrationAccountSchemasOperations, IntegrationAccountSessionsOperations, IntegrationAccountsOperations, IntegrationServiceEnvironmentManagedApiOperationsOperations, IntegrationServiceEnvironmentManagedApisOperations, IntegrationServiceEnvironmentNetworkHealthOperations, IntegrationServiceEnvironmentSkusOperations, IntegrationServiceEnvironmentsOperations, Operations, WorkflowRunActionRepetitionsOperations, WorkflowRunActionRepetitionsRequestHistoriesOperations, WorkflowRunActionRequestHistoriesOperations, WorkflowRunActionScopeRepetitionsOperations, WorkflowRunActionsOperations, WorkflowRunOperationsOperations, WorkflowRunsOperations, WorkflowTriggerHistoriesOperations, WorkflowTriggersOperations, WorkflowVersionTriggersOperations, WorkflowVersionsOperations, WorkflowsOperations - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials import TokenCredential - -class LogicManagementClient: # pylint: disable=too-many-instance-attributes - """REST API for Azure Logic Apps. - - :ivar workflows: WorkflowsOperations operations - :vartype workflows: azure.mgmt.logic.operations.WorkflowsOperations - :ivar workflow_versions: WorkflowVersionsOperations operations - :vartype workflow_versions: azure.mgmt.logic.operations.WorkflowVersionsOperations - :ivar workflow_triggers: WorkflowTriggersOperations operations - :vartype workflow_triggers: azure.mgmt.logic.operations.WorkflowTriggersOperations - :ivar workflow_version_triggers: WorkflowVersionTriggersOperations operations - :vartype workflow_version_triggers: - azure.mgmt.logic.operations.WorkflowVersionTriggersOperations - :ivar workflow_trigger_histories: WorkflowTriggerHistoriesOperations operations - :vartype workflow_trigger_histories: - azure.mgmt.logic.operations.WorkflowTriggerHistoriesOperations - :ivar workflow_runs: WorkflowRunsOperations operations - :vartype workflow_runs: azure.mgmt.logic.operations.WorkflowRunsOperations - :ivar workflow_run_actions: WorkflowRunActionsOperations operations - :vartype workflow_run_actions: azure.mgmt.logic.operations.WorkflowRunActionsOperations - :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitionsOperations operations - :vartype workflow_run_action_repetitions: - azure.mgmt.logic.operations.WorkflowRunActionRepetitionsOperations - :ivar workflow_run_action_repetitions_request_histories: - WorkflowRunActionRepetitionsRequestHistoriesOperations operations - :vartype workflow_run_action_repetitions_request_histories: - azure.mgmt.logic.operations.WorkflowRunActionRepetitionsRequestHistoriesOperations - :ivar workflow_run_action_request_histories: WorkflowRunActionRequestHistoriesOperations - operations - :vartype workflow_run_action_request_histories: - azure.mgmt.logic.operations.WorkflowRunActionRequestHistoriesOperations - :ivar workflow_run_action_scope_repetitions: WorkflowRunActionScopeRepetitionsOperations - operations - :vartype workflow_run_action_scope_repetitions: - azure.mgmt.logic.operations.WorkflowRunActionScopeRepetitionsOperations - :ivar workflow_run_operations: WorkflowRunOperationsOperations operations - :vartype workflow_run_operations: azure.mgmt.logic.operations.WorkflowRunOperationsOperations - :ivar integration_accounts: IntegrationAccountsOperations operations - :vartype integration_accounts: azure.mgmt.logic.operations.IntegrationAccountsOperations - :ivar integration_account_assemblies: IntegrationAccountAssembliesOperations operations - :vartype integration_account_assemblies: - azure.mgmt.logic.operations.IntegrationAccountAssembliesOperations - :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurationsOperations - operations - :vartype integration_account_batch_configurations: - azure.mgmt.logic.operations.IntegrationAccountBatchConfigurationsOperations - :ivar integration_account_schemas: IntegrationAccountSchemasOperations operations - :vartype integration_account_schemas: - azure.mgmt.logic.operations.IntegrationAccountSchemasOperations - :ivar integration_account_maps: IntegrationAccountMapsOperations operations - :vartype integration_account_maps: azure.mgmt.logic.operations.IntegrationAccountMapsOperations - :ivar integration_account_partners: IntegrationAccountPartnersOperations operations - :vartype integration_account_partners: - azure.mgmt.logic.operations.IntegrationAccountPartnersOperations - :ivar integration_account_agreements: IntegrationAccountAgreementsOperations operations - :vartype integration_account_agreements: - azure.mgmt.logic.operations.IntegrationAccountAgreementsOperations - :ivar integration_account_certificates: IntegrationAccountCertificatesOperations operations - :vartype integration_account_certificates: - azure.mgmt.logic.operations.IntegrationAccountCertificatesOperations - :ivar integration_account_sessions: IntegrationAccountSessionsOperations operations - :vartype integration_account_sessions: - azure.mgmt.logic.operations.IntegrationAccountSessionsOperations - :ivar integration_service_environments: IntegrationServiceEnvironmentsOperations operations - :vartype integration_service_environments: - azure.mgmt.logic.operations.IntegrationServiceEnvironmentsOperations - :ivar integration_service_environment_skus: IntegrationServiceEnvironmentSkusOperations - operations - :vartype integration_service_environment_skus: - azure.mgmt.logic.operations.IntegrationServiceEnvironmentSkusOperations - :ivar integration_service_environment_network_health: - IntegrationServiceEnvironmentNetworkHealthOperations operations - :vartype integration_service_environment_network_health: - azure.mgmt.logic.operations.IntegrationServiceEnvironmentNetworkHealthOperations - :ivar integration_service_environment_managed_apis: - IntegrationServiceEnvironmentManagedApisOperations operations - :vartype integration_service_environment_managed_apis: - azure.mgmt.logic.operations.IntegrationServiceEnvironmentManagedApisOperations - :ivar integration_service_environment_managed_api_operations: - IntegrationServiceEnvironmentManagedApiOperationsOperations operations - :vartype integration_service_environment_managed_api_operations: - azure.mgmt.logic.operations.IntegrationServiceEnvironmentManagedApiOperationsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.logic.operations.Operations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription id. - :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". - :type base_url: str - :keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this - default value may result in unsupported behavior. - :paramtype api_version: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - """ - - def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any - ) -> None: - self._config = LogicManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - self._serialize.client_side_validation = False - self.workflows = WorkflowsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_versions = WorkflowVersionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_triggers = WorkflowTriggersOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_version_triggers = WorkflowVersionTriggersOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger_histories = WorkflowTriggerHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_runs = WorkflowRunsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_actions = WorkflowRunActionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetitions_request_histories = WorkflowRunActionRepetitionsRequestHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_request_histories = WorkflowRunActionRequestHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_scope_repetitions = WorkflowRunActionScopeRepetitionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_operations = WorkflowRunOperationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_accounts = IntegrationAccountsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_assemblies = IntegrationAccountAssembliesOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_schemas = IntegrationAccountSchemasOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_maps = IntegrationAccountMapsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_partners = IntegrationAccountPartnersOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_agreements = IntegrationAccountAgreementsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_certificates = IntegrationAccountCertificatesOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_sessions = IntegrationAccountSessionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environments = IntegrationServiceEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_skus = IntegrationServiceEnvironmentSkusOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_network_health = IntegrationServiceEnvironmentNetworkHealthOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_apis = IntegrationServiceEnvironmentManagedApisOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api_operations = IntegrationServiceEnvironmentManagedApiOperationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse - """ - - request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> LogicManagementClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/src/logic/azext_logic/vendored_sdks/logic/_patch.py b/src/logic/azext_logic/vendored_sdks/logic/_patch.py deleted file mode 100644 index 74e48ecd07c..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/_patch.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -def patch_sdk(): - pass \ No newline at end of file diff --git a/src/logic/azext_logic/vendored_sdks/logic/_vendor.py b/src/logic/azext_logic/vendored_sdks/logic/_vendor.py deleted file mode 100644 index 138f663c53a..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/_vendor.py +++ /dev/null @@ -1,27 +0,0 @@ -# -------------------------------------------------------------------------- -# 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 azure.core.pipeline.transport import HttpRequest - -def _convert_request(request, files=None): - data = request.content if not files else None - request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) - if files: - request.set_formdata_body(files) - return request - -def _format_url_section(template, **kwargs): - components = template.split("/") - while components: - try: - return template.format(**kwargs) - except KeyError as key: - formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] - template = "/".join(components) diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py deleted file mode 100644 index 23b8536c72c..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._logic_management_client import LogicManagementClient -__all__ = ['LogicManagementClient'] - -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py deleted file mode 100644 index 1b842703551..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy - -from .._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - - -class LogicManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes - """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 - :keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this - default value may result in unsupported behavior. - :paramtype api_version: str - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: - super(LogicManagementClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - 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.") - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-logic/{}'.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 = AsyncARMChallengeAuthenticationPolicy(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 deleted file mode 100644 index 9585250c94f..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py +++ /dev/null @@ -1,200 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING - -from msrest import Deserializer, Serializer - -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.mgmt.core import AsyncARMPipelineClient - -from .. import models -from ._configuration import LogicManagementClientConfiguration -from .operations import IntegrationAccountAgreementsOperations, IntegrationAccountAssembliesOperations, IntegrationAccountBatchConfigurationsOperations, IntegrationAccountCertificatesOperations, IntegrationAccountMapsOperations, IntegrationAccountPartnersOperations, IntegrationAccountSchemasOperations, IntegrationAccountSessionsOperations, IntegrationAccountsOperations, IntegrationServiceEnvironmentManagedApiOperationsOperations, IntegrationServiceEnvironmentManagedApisOperations, IntegrationServiceEnvironmentNetworkHealthOperations, IntegrationServiceEnvironmentSkusOperations, IntegrationServiceEnvironmentsOperations, Operations, WorkflowRunActionRepetitionsOperations, WorkflowRunActionRepetitionsRequestHistoriesOperations, WorkflowRunActionRequestHistoriesOperations, WorkflowRunActionScopeRepetitionsOperations, WorkflowRunActionsOperations, WorkflowRunOperationsOperations, WorkflowRunsOperations, WorkflowTriggerHistoriesOperations, WorkflowTriggersOperations, WorkflowVersionTriggersOperations, WorkflowVersionsOperations, WorkflowsOperations - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -class LogicManagementClient: # pylint: disable=too-many-instance-attributes - """REST API for Azure Logic Apps. - - :ivar workflows: WorkflowsOperations operations - :vartype workflows: azure.mgmt.logic.aio.operations.WorkflowsOperations - :ivar workflow_versions: WorkflowVersionsOperations operations - :vartype workflow_versions: azure.mgmt.logic.aio.operations.WorkflowVersionsOperations - :ivar workflow_triggers: WorkflowTriggersOperations operations - :vartype workflow_triggers: azure.mgmt.logic.aio.operations.WorkflowTriggersOperations - :ivar workflow_version_triggers: WorkflowVersionTriggersOperations operations - :vartype workflow_version_triggers: - azure.mgmt.logic.aio.operations.WorkflowVersionTriggersOperations - :ivar workflow_trigger_histories: WorkflowTriggerHistoriesOperations operations - :vartype workflow_trigger_histories: - azure.mgmt.logic.aio.operations.WorkflowTriggerHistoriesOperations - :ivar workflow_runs: WorkflowRunsOperations operations - :vartype workflow_runs: azure.mgmt.logic.aio.operations.WorkflowRunsOperations - :ivar workflow_run_actions: WorkflowRunActionsOperations operations - :vartype workflow_run_actions: azure.mgmt.logic.aio.operations.WorkflowRunActionsOperations - :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitionsOperations operations - :vartype workflow_run_action_repetitions: - azure.mgmt.logic.aio.operations.WorkflowRunActionRepetitionsOperations - :ivar workflow_run_action_repetitions_request_histories: - WorkflowRunActionRepetitionsRequestHistoriesOperations operations - :vartype workflow_run_action_repetitions_request_histories: - azure.mgmt.logic.aio.operations.WorkflowRunActionRepetitionsRequestHistoriesOperations - :ivar workflow_run_action_request_histories: WorkflowRunActionRequestHistoriesOperations - operations - :vartype workflow_run_action_request_histories: - azure.mgmt.logic.aio.operations.WorkflowRunActionRequestHistoriesOperations - :ivar workflow_run_action_scope_repetitions: WorkflowRunActionScopeRepetitionsOperations - operations - :vartype workflow_run_action_scope_repetitions: - azure.mgmt.logic.aio.operations.WorkflowRunActionScopeRepetitionsOperations - :ivar workflow_run_operations: WorkflowRunOperationsOperations operations - :vartype workflow_run_operations: - azure.mgmt.logic.aio.operations.WorkflowRunOperationsOperations - :ivar integration_accounts: IntegrationAccountsOperations operations - :vartype integration_accounts: azure.mgmt.logic.aio.operations.IntegrationAccountsOperations - :ivar integration_account_assemblies: IntegrationAccountAssembliesOperations operations - :vartype integration_account_assemblies: - azure.mgmt.logic.aio.operations.IntegrationAccountAssembliesOperations - :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurationsOperations - operations - :vartype integration_account_batch_configurations: - azure.mgmt.logic.aio.operations.IntegrationAccountBatchConfigurationsOperations - :ivar integration_account_schemas: IntegrationAccountSchemasOperations operations - :vartype integration_account_schemas: - azure.mgmt.logic.aio.operations.IntegrationAccountSchemasOperations - :ivar integration_account_maps: IntegrationAccountMapsOperations operations - :vartype integration_account_maps: - azure.mgmt.logic.aio.operations.IntegrationAccountMapsOperations - :ivar integration_account_partners: IntegrationAccountPartnersOperations operations - :vartype integration_account_partners: - azure.mgmt.logic.aio.operations.IntegrationAccountPartnersOperations - :ivar integration_account_agreements: IntegrationAccountAgreementsOperations operations - :vartype integration_account_agreements: - azure.mgmt.logic.aio.operations.IntegrationAccountAgreementsOperations - :ivar integration_account_certificates: IntegrationAccountCertificatesOperations operations - :vartype integration_account_certificates: - azure.mgmt.logic.aio.operations.IntegrationAccountCertificatesOperations - :ivar integration_account_sessions: IntegrationAccountSessionsOperations operations - :vartype integration_account_sessions: - azure.mgmt.logic.aio.operations.IntegrationAccountSessionsOperations - :ivar integration_service_environments: IntegrationServiceEnvironmentsOperations operations - :vartype integration_service_environments: - azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentsOperations - :ivar integration_service_environment_skus: IntegrationServiceEnvironmentSkusOperations - operations - :vartype integration_service_environment_skus: - azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentSkusOperations - :ivar integration_service_environment_network_health: - IntegrationServiceEnvironmentNetworkHealthOperations operations - :vartype integration_service_environment_network_health: - azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentNetworkHealthOperations - :ivar integration_service_environment_managed_apis: - IntegrationServiceEnvironmentManagedApisOperations operations - :vartype integration_service_environment_managed_apis: - azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentManagedApisOperations - :ivar integration_service_environment_managed_api_operations: - IntegrationServiceEnvironmentManagedApiOperationsOperations operations - :vartype integration_service_environment_managed_api_operations: - azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentManagedApiOperationsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.logic.aio.operations.Operations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription id. - :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". - :type base_url: str - :keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this - default value may result in unsupported behavior. - :paramtype api_version: str - :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: str = "https://management.azure.com", - **kwargs: Any - ) -> None: - self._config = LogicManagementClientConfiguration(credential=credential, subscription_id=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._serialize.client_side_validation = False - self.workflows = WorkflowsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_versions = WorkflowVersionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_triggers = WorkflowTriggersOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_version_triggers = WorkflowVersionTriggersOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger_histories = WorkflowTriggerHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_runs = WorkflowRunsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_actions = WorkflowRunActionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetitions_request_histories = WorkflowRunActionRepetitionsRequestHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_request_histories = WorkflowRunActionRequestHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_scope_repetitions = WorkflowRunActionScopeRepetitionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_operations = WorkflowRunOperationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_accounts = IntegrationAccountsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_assemblies = IntegrationAccountAssembliesOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_schemas = IntegrationAccountSchemasOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_maps = IntegrationAccountMapsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_partners = IntegrationAccountPartnersOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_agreements = IntegrationAccountAgreementsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_certificates = IntegrationAccountCertificatesOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_account_sessions = IntegrationAccountSessionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environments = IntegrationServiceEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_skus = IntegrationServiceEnvironmentSkusOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_network_health = IntegrationServiceEnvironmentNetworkHealthOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_apis = IntegrationServiceEnvironmentManagedApisOperations(self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api_operations = IntegrationServiceEnvironmentManagedApiOperationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse - """ - - request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) - - 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/_patch.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_patch.py deleted file mode 100644 index 74e48ecd07c..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/_patch.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -def patch_sdk(): - pass \ No newline at end of file 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 deleted file mode 100644 index 5c557560db0..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._workflows_operations import WorkflowsOperations -from ._workflow_versions_operations import WorkflowVersionsOperations -from ._workflow_triggers_operations import WorkflowTriggersOperations -from ._workflow_version_triggers_operations import WorkflowVersionTriggersOperations -from ._workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations -from ._workflow_runs_operations import WorkflowRunsOperations -from ._workflow_run_actions_operations import WorkflowRunActionsOperations -from ._workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations -from ._workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations -from ._workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations -from ._workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations -from ._workflow_run_operations_operations import WorkflowRunOperationsOperations -from ._integration_accounts_operations import IntegrationAccountsOperations -from ._integration_account_assemblies_operations import IntegrationAccountAssembliesOperations -from ._integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations -from ._integration_account_schemas_operations import IntegrationAccountSchemasOperations -from ._integration_account_maps_operations import IntegrationAccountMapsOperations -from ._integration_account_partners_operations import IntegrationAccountPartnersOperations -from ._integration_account_agreements_operations import IntegrationAccountAgreementsOperations -from ._integration_account_certificates_operations import IntegrationAccountCertificatesOperations -from ._integration_account_sessions_operations import IntegrationAccountSessionsOperations -from ._integration_service_environments_operations import IntegrationServiceEnvironmentsOperations -from ._integration_service_environment_skus_operations import IntegrationServiceEnvironmentSkusOperations -from ._integration_service_environment_network_health_operations import IntegrationServiceEnvironmentNetworkHealthOperations -from ._integration_service_environment_managed_apis_operations import IntegrationServiceEnvironmentManagedApisOperations -from ._integration_service_environment_managed_api_operations_operations import IntegrationServiceEnvironmentManagedApiOperationsOperations -from ._operations import Operations - -__all__ = [ - 'WorkflowsOperations', - 'WorkflowVersionsOperations', - 'WorkflowTriggersOperations', - 'WorkflowVersionTriggersOperations', - 'WorkflowTriggerHistoriesOperations', - 'WorkflowRunsOperations', - 'WorkflowRunActionsOperations', - 'WorkflowRunActionRepetitionsOperations', - 'WorkflowRunActionRepetitionsRequestHistoriesOperations', - 'WorkflowRunActionRequestHistoriesOperations', - 'WorkflowRunActionScopeRepetitionsOperations', - 'WorkflowRunOperationsOperations', - 'IntegrationAccountsOperations', - 'IntegrationAccountAssembliesOperations', - 'IntegrationAccountBatchConfigurationsOperations', - 'IntegrationAccountSchemasOperations', - 'IntegrationAccountMapsOperations', - 'IntegrationAccountPartnersOperations', - 'IntegrationAccountAgreementsOperations', - 'IntegrationAccountCertificatesOperations', - 'IntegrationAccountSessionsOperations', - 'IntegrationServiceEnvironmentsOperations', - 'IntegrationServiceEnvironmentSkusOperations', - 'IntegrationServiceEnvironmentNetworkHealthOperations', - 'IntegrationServiceEnvironmentManagedApisOperations', - 'IntegrationServiceEnvironmentManagedApiOperationsOperations', - 'Operations', -] diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py deleted file mode 100644 index 5407f919c22..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py +++ /dev/null @@ -1,407 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_account_agreements_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountAgreementsOperations: - """IntegrationAccountAgreementsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: - AgreementType. Default value is None. - :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[~azure.mgmt.logic.models.IntegrationAccountAgreementListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreementListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - agreement_name=agreement_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - agreement: "_models.IntegrationAccountAgreement", - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(agreement, 'IntegrationAccountAgreement') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - agreement_name=agreement_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - agreement_name=agreement_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - list_content_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_content_callback_url: - :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - agreement_name=agreement_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_assemblies_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assemblies_operations.py deleted file mode 100644 index c73abcb18d2..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assemblies_operations.py +++ /dev/null @@ -1,387 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_account_assemblies_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountAssembliesOperations: - """IntegrationAccountAssembliesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.AssemblyCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.AssemblyCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - assembly_artifact_name=assembly_artifact_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - assembly_artifact: "_models.AssemblyDefinition", - **kwargs: Any - ) -> "_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 assembly_artifact: The assembly artifact. - :type assembly_artifact: ~azure.mgmt.logic.models.AssemblyDefinition - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(assembly_artifact, 'AssemblyDefinition') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - assembly_artifact_name=assembly_artifact_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - assembly_artifact_name=assembly_artifact_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - assembly_artifact_name=assembly_artifact_name, - api_version=api_version, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_configurations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configurations_operations.py deleted file mode 100644 index 4149df4ecee..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configurations_operations.py +++ /dev/null @@ -1,326 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_account_batch_configurations_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountBatchConfigurationsOperations: - """IntegrationAccountBatchConfigurationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.BatchConfigurationCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchConfigurationCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - batch_configuration_name=batch_configuration_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - batch_configuration: "_models.BatchConfiguration", - **kwargs: Any - ) -> "_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_configuration: The batch configuration. - :type batch_configuration: ~azure.mgmt.logic.models.BatchConfiguration - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(batch_configuration, 'BatchConfiguration') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - batch_configuration_name=batch_configuration_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - batch_configuration_name=batch_configuration_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_certificates_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificates_operations.py deleted file mode 100644 index 39925a3f11a..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificates_operations.py +++ /dev/null @@ -1,331 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_account_certificates_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountCertificatesOperations: - """IntegrationAccountCertificatesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - **kwargs: Any - ) -> 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. Default value is None. - :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[~azure.mgmt.logic.models.IntegrationAccountCertificateListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificateListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - certificate_name=certificate_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - certificate: "_models.IntegrationAccountCertificate", - **kwargs: Any - ) -> "_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 certificate: The integration account certificate. - :type certificate: ~azure.mgmt.logic.models.IntegrationAccountCertificate - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(certificate, 'IntegrationAccountCertificate') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - certificate_name=certificate_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - certificate_name=certificate_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_maps_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_maps_operations.py deleted file mode 100644 index 26a7b9d372b..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_maps_operations.py +++ /dev/null @@ -1,409 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_account_maps_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountMapsOperations: - """IntegrationAccountMapsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: MapType. - Default value is None. - :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[~azure.mgmt.logic.models.IntegrationAccountMapListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountMapListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - map_name=map_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - map: "_models.IntegrationAccountMap", - **kwargs: Any - ) -> "_models.IntegrationAccountMap": - """Creates or updates an integration account map. If the map is larger than 4 MB, you need to - store the map in an Azure blob and use the blob's Shared Access Signature (SAS) URL as the - 'contentLink' property value. - - :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: The integration account map. - :type map: ~azure.mgmt.logic.models.IntegrationAccountMap - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(map, 'IntegrationAccountMap') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - map_name=map_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - map_name=map_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - list_content_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_content_callback_url: - :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - map_name=map_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_partners_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partners_operations.py deleted file mode 100644 index cb733877681..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partners_operations.py +++ /dev/null @@ -1,407 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_account_partners_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountPartnersOperations: - """IntegrationAccountPartnersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: PartnerType. - Default value is None. - :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[~azure.mgmt.logic.models.IntegrationAccountPartnerListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartnerListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - partner_name=partner_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - partner: "_models.IntegrationAccountPartner", - **kwargs: Any - ) -> "_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: The integration account partner. - :type partner: ~azure.mgmt.logic.models.IntegrationAccountPartner - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(partner, 'IntegrationAccountPartner') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - partner_name=partner_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - partner_name=partner_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - list_content_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_content_callback_url: - :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - partner_name=partner_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_schemas_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schemas_operations.py deleted file mode 100644 index 59d98b7d3d9..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schemas_operations.py +++ /dev/null @@ -1,407 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_account_schemas_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountSchemasOperations: - """IntegrationAccountSchemasOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: SchemaType. - Default value is None. - :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[~azure.mgmt.logic.models.IntegrationAccountSchemaListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchemaListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - schema_name=schema_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - schema: "_models.IntegrationAccountSchema", - **kwargs: Any - ) -> "_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: The integration account schema. - :type schema: ~azure.mgmt.logic.models.IntegrationAccountSchema - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(schema, 'IntegrationAccountSchema') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - schema_name=schema_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - schema_name=schema_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - list_content_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_content_callback_url: - :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - schema_name=schema_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_sessions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_sessions_operations.py deleted file mode 100644 index 6a781d525c6..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_sessions_operations.py +++ /dev/null @@ -1,337 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_account_sessions_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountSessionsOperations: - """IntegrationAccountSessionsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: ChangedTime. - Default value is None. - :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[~azure.mgmt.logic.models.IntegrationAccountSessionListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSessionListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - integration_account_name: str, - session_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - session_name=session_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - session_name: str, - session: "_models.IntegrationAccountSession", - **kwargs: Any - ) -> "_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 session: The integration account session. - :type session: ~azure.mgmt.logic.models.IntegrationAccountSession - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(session, 'IntegrationAccountSession') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - session_name=session_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - session_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - session_name=session_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_accounts_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_accounts_operations.py deleted file mode 100644 index bac3564469d..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_accounts_operations.py +++ /dev/null @@ -1,746 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_accounts_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_list_callback_url_request, build_list_key_vault_keys_request, build_log_tracking_events_request, build_regenerate_access_key_request, build_update_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountsOperations: - """IntegrationAccountsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list_by_subscription( - self, - top: Optional[int] = None, - **kwargs: Any - ) -> AsyncIterable["_models.IntegrationAccountListResult"]: - """Gets a list of integration accounts by subscription. - - :param top: The number of items to be included in the result. Default value is None. - :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[~azure.mgmt.logic.models.IntegrationAccountListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - template_url=self.list_by_subscription.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace - def list_by_resource_group( - self, - resource_group_name: str, - top: Optional[int] = None, - **kwargs: Any - ) -> 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. Default value is None. - :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[~azure.mgmt.logic.models.IntegrationAccountListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - top=top, - template_url=self.list_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - integration_account: "_models.IntegrationAccount", - **kwargs: Any - ) -> "_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 integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_account, 'IntegrationAccount') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - integration_account_name: str, - integration_account: "_models.IntegrationAccount", - **kwargs: Any - ) -> "_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 integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_account, 'IntegrationAccount') - - request = build_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def list_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - parameters: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 parameters: The callback URL parameters. - :type parameters: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(parameters, 'GetCallbackUrlParameters') - - request = build_list_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_key_vault_keys( - self, - resource_group_name: str, - integration_account_name: str, - list_key_vault_keys: "_models.ListKeyVaultKeysDefinition", - **kwargs: Any - ) -> 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 list_key_vault_keys: The key vault parameters. - :type list_key_vault_keys: ~azure.mgmt.logic.models.ListKeyVaultKeysDefinition - :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[~azure.mgmt.logic.models.KeyVaultKeyCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyVaultKeyCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - _json = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') - - request = build_list_key_vault_keys_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_key_vault_keys.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - _json = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') - - request = build_list_key_vault_keys_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - - return AsyncItemPaged( - get_next, extract_data - ) - list_key_vault_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys"} # type: ignore - - @distributed_trace_async - async def log_tracking_events( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - log_tracking_events: "_models.TrackingEventsDefinition", - **kwargs: Any - ) -> 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 log_tracking_events: The callback URL parameters. - :type log_tracking_events: ~azure.mgmt.logic.models.TrackingEventsDefinition - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') - - request = build_log_tracking_events_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.log_tracking_events.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - log_tracking_events.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents"} # type: ignore - - - @distributed_trace_async - async def regenerate_access_key( - self, - resource_group_name: str, - integration_account_name: str, - regenerate_access_key: "_models.RegenerateActionParameter", - **kwargs: Any - ) -> "_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 regenerate_access_key: The access key type. - :type regenerate_access_key: ~azure.mgmt.logic.models.RegenerateActionParameter - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(regenerate_access_key, 'RegenerateActionParameter') - - request = build_regenerate_access_key_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.regenerate_access_key.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_service_environment_managed_api_operations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py deleted file mode 100644 index 16bc0f4b2cb..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py +++ /dev/null @@ -1,134 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_service_environment_managed_api_operations_operations import build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentManagedApiOperationsOperations: - """IntegrationServiceEnvironmentManagedApiOperationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.ApiOperationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiOperationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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_apis_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_apis_operations.py deleted file mode 100644 index d816c840903..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_apis_operations.py +++ /dev/null @@ -1,441 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar, Union - -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 -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_service_environment_managed_apis_operations import build_delete_request_initial, build_get_request, build_list_request, build_put_request_initial -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentManagedApisOperations: - """IntegrationServiceEnvironmentManagedApisOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.IntegrationServiceEnvironmentManagedApiListResult"]: - """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 IntegrationServiceEnvironmentManagedApiListResult - or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApiListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IntegrationServiceEnvironmentManagedApiListResult", 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any - ) -> "_models.IntegrationServiceEnvironmentManagedApi": - """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: IntegrationServiceEnvironmentManagedApi, or the result of cls(response) - :rtype: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', 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, - integration_service_environment_managed_api: "_models.IntegrationServiceEnvironmentManagedApi", - **kwargs: Any - ) -> "_models.IntegrationServiceEnvironmentManagedApi": - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_service_environment_managed_api, 'IntegrationServiceEnvironmentManagedApi') - - request = build_put_request_initial( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self._put_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', 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 - - - @distributed_trace_async - async def begin_put( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - integration_service_environment_managed_api: "_models.IntegrationServiceEnvironmentManagedApi", - **kwargs: Any - ) -> AsyncLROPoller["_models.IntegrationServiceEnvironmentManagedApi"]: - """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 - :param integration_service_environment_managed_api: The integration service environment managed - api. - :type integration_service_environment_managed_api: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi - :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: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a 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 - IntegrationServiceEnvironmentManagedApi or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] - 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, - integration_service_environment_managed_api=integration_service_environment_managed_api, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **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 - ) - 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( # pylint: disable=inconsistent-return-statements - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - template_url=self._delete_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, 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 - - - @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any - ) -> 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: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a 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 - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - 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, - api_version=api_version, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **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 - ) - 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 deleted file mode 100644 index 3c7864aac3e..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_service_environment_network_health_operations import build_get_request -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: ~azure.mgmt.logic.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 - - @distributed_trace_async - async def get( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> 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, ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_skus_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_skus_operations.py deleted file mode 100644 index c5fd6c5d254..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_skus_operations.py +++ /dev/null @@ -1,129 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_service_environment_skus_operations import build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentSkusOperations: - """IntegrationServiceEnvironmentSkusOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentSkuList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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/_integration_service_environments_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environments_operations.py deleted file mode 100644 index 1da1e65e6e8..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environments_operations.py +++ /dev/null @@ -1,632 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar, Union - -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 -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._integration_service_environments_operations import build_create_or_update_request_initial, build_delete_request, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_restart_request, build_update_request_initial -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentsOperations: - """IntegrationServiceEnvironmentsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list_by_subscription( - self, - top: Optional[int] = None, - **kwargs: Any - ) -> AsyncIterable["_models.IntegrationServiceEnvironmentListResult"]: - """Gets a list of integration service environments by subscription. - - :param top: The number of items to be included in the result. Default value is None. - :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[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - template_url=self.list_by_subscription.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace - def list_by_resource_group( - self, - resource_group: str, - top: Optional[int] = None, - **kwargs: Any - ) -> 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. Default value is None. - :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[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - api_version=api_version, - top=top, - template_url=self.list_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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, - integration_service_environment: "_models.IntegrationServiceEnvironment", - **kwargs: Any - ) -> "_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', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') - - request = build_create_or_update_request_initial( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self._create_or_update_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, 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 - - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group: str, - integration_service_environment_name: str, - integration_service_environment: "_models.IntegrationServiceEnvironment", - **kwargs: Any - ) -> 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 integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a 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[~azure.mgmt.logic.models.IntegrationServiceEnvironment] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - 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, - integration_service_environment=integration_service_environment, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **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 - ) - 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, - integration_service_environment: "_models.IntegrationServiceEnvironment", - **kwargs: Any - ) -> "_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', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') - - request = build_update_request_initial( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self._update_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, 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 - - - @distributed_trace_async - async def begin_update( - self, - resource_group: str, - integration_service_environment_name: str, - integration_service_environment: "_models.IntegrationServiceEnvironment", - **kwargs: Any - ) -> 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 integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a 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[~azure.mgmt.logic.models.IntegrationServiceEnvironment] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - 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, - integration_service_environment=integration_service_environment, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **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 - ) - 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 - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def restart( # pylint: disable=inconsistent-return-statements - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_restart_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.restart.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operations.py deleted file mode 100644 index 72b737962ae..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operations.py +++ /dev/null @@ -1,115 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._operations import build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class Operations: - """Operations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.OperationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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_run_action_repetitions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_operations.py deleted file mode 100644 index dc12b996735..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_operations.py +++ /dev/null @@ -1,308 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_run_action_repetitions_operations import build_get_request, build_list_expression_traces_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionRepetitionsOperations: - """WorkflowRunActionRepetitionsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_expression_traces( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.ExpressionTraces] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressionTraces"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_expression_traces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=self.list_expression_traces.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_expression_traces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - - return AsyncItemPaged( - get_next, extract_data - ) - list_expression_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py deleted file mode 100644 index 9b4e69a86e8..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py +++ /dev/null @@ -1,220 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_run_action_repetitions_request_histories_operations import build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionRepetitionsRequestHistoriesOperations: - """WorkflowRunActionRepetitionsRequestHistoriesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.RequestHistoryListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - 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: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - 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, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_histories_operations.py deleted file mode 100644 index 96b34877709..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_histories_operations.py +++ /dev/null @@ -1,211 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_run_action_request_histories_operations import build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionRequestHistoriesOperations: - """WorkflowRunActionRequestHistoriesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.RequestHistoryListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - request_history_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - request_history_name=request_history_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_repetitions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py deleted file mode 100644 index b575d2d0768..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py +++ /dev/null @@ -1,211 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_run_action_scope_repetitions_operations import build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionScopeRepetitionsOperations: - """WorkflowRunActionScopeRepetitionsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_actions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_actions_operations.py deleted file mode 100644 index 05eead647e8..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_actions_operations.py +++ /dev/null @@ -1,305 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_run_actions_operations import build_get_request, build_list_expression_traces_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionsOperations: - """WorkflowRunActionsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status. - Default value is None. - :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[~azure.mgmt.logic.models.WorkflowRunActionListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_expression_traces( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> 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[~azure.mgmt.logic.models.ExpressionTraces] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressionTraces"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_expression_traces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.list_expression_traces.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_expression_traces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - - return AsyncItemPaged( - get_next, extract_data - ) - list_expression_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations_operations.py deleted file mode 100644 index e26956721ac..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_run_operations_operations import build_get_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunOperationsOperations: - """WorkflowRunOperationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - operation_id: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - operation_id=operation_id, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_runs_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_runs_operations.py deleted file mode 100644 index 55d700a18ad..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_runs_operations.py +++ /dev/null @@ -1,262 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_runs_operations import build_cancel_request, build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunsOperations: - """WorkflowRunsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. Default value is None. - :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[~azure.mgmt.logic.models.WorkflowRunListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def cancel( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_cancel_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - api_version=api_version, - template_url=self.cancel.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_histories_operations.py deleted file mode 100644 index 2c29d10e3d4..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_histories_operations.py +++ /dev/null @@ -1,278 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_trigger_histories_operations import build_get_request, build_list_request, build_resubmit_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowTriggerHistoriesOperations: - """WorkflowTriggerHistoriesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. Default value is None. - :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[~azure.mgmt.logic.models.WorkflowTriggerHistoryListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerHistoryListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - history_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - history_name=history_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def resubmit( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - history_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_resubmit_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - history_name=history_name, - api_version=api_version, - template_url=self.resubmit.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_triggers_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_triggers_operations.py deleted file mode 100644 index 589bbcfd817..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_triggers_operations.py +++ /dev/null @@ -1,513 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_triggers_operations import build_get_request, build_get_schema_json_request, build_list_callback_url_request, build_list_request, build_reset_request, build_run_request, build_set_state_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowTriggersOperations: - """WorkflowTriggersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Default value is None. - :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[~azure.mgmt.logic.models.WorkflowTriggerListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def reset( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_reset_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.reset.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def run( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_run_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.run.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def get_schema_json( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_schema_json_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.get_schema_json.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def set_state( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - set_state: "_models.SetTriggerStateActionDefinition", - **kwargs: Any - ) -> 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 set_state: The workflow trigger state. - :type set_state: ~azure.mgmt.logic.models.SetTriggerStateActionDefinition - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(set_state, 'SetTriggerStateActionDefinition') - - request = build_set_state_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.set_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def list_callback_url( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_list_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.list_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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_triggers_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_triggers_operations.py deleted file mode 100644 index d4017437b6b..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_triggers_operations.py +++ /dev/null @@ -1,121 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_version_triggers_operations import build_list_callback_url_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowVersionTriggersOperations: - """WorkflowVersionTriggersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace_async - async def list_callback_url( - self, - resource_group_name: str, - workflow_name: str, - version_id: str, - trigger_name: str, - parameters: Optional["_models.GetCallbackUrlParameters"] = None, - **kwargs: Any - ) -> "_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 parameters: The callback URL parameters. Default value is None. - :type parameters: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if parameters is not None: - _json = self._serialize.body(parameters, 'GetCallbackUrlParameters') - else: - _json = None - - request = build_list_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - version_id=version_id, - trigger_name=trigger_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/aio/operations/_workflow_versions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_versions_operations.py deleted file mode 100644 index 943b46a2bbb..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_versions_operations.py +++ /dev/null @@ -1,198 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -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 -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflow_versions_operations import build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowVersionsOperations: - """WorkflowVersionsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - top: Optional[int] = None, - **kwargs: Any - ) -> 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. Default value is None. - :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[~azure.mgmt.logic.models.WorkflowVersionListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowVersionListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - version_id: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - version_id=version_id, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/_workflows_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflows_operations.py deleted file mode 100644 index c4d57bd7ebb..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflows_operations.py +++ /dev/null @@ -1,1068 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar, Union - -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 -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._workflows_operations import build_create_or_update_request, build_delete_request, build_disable_request, build_enable_request, build_generate_upgraded_definition_request, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_list_callback_url_request, build_list_swagger_request, build_move_request_initial, build_regenerate_access_key_request, build_update_request, build_validate_by_location_request, build_validate_by_resource_group_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowsOperations: - """WorkflowsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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 - - @distributed_trace - def list_by_subscription( - self, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.WorkflowListResult"]: - """Gets a list of workflows by subscription. - - :param top: The number of items to be included in the result. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. Default value is None. - :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[~azure.mgmt.logic.models.WorkflowListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list_by_subscription.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace - def list_by_resource_group( - self, - resource_group_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> 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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. Default value is None. - :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[~azure.mgmt.logic.models.WorkflowListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - 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( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - workflow_name: str, - workflow: "_models.Workflow", - **kwargs: Any - ) -> "_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 workflow: The workflow. - :type workflow: ~azure.mgmt.logic.models.Workflow - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(workflow, 'Workflow') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def disable( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_disable_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.disable.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def enable( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_enable_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.enable.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def generate_upgraded_definition( - self, - resource_group_name: str, - workflow_name: str, - parameters: "_models.GenerateUpgradedDefinitionParameters", - **kwargs: Any - ) -> Any: - """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 parameters: Parameters for generating an upgraded definition. - :type parameters: ~azure.mgmt.logic.models.GenerateUpgradedDefinitionParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: any, or the result of cls(response) - :rtype: any - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') - - request = build_generate_upgraded_definition_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.generate_upgraded_definition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def list_callback_url( - self, - resource_group_name: str, - workflow_name: str, - list_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_callback_url: Which callback url to list. - :type list_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_callback_url, 'GetCallbackUrlParameters') - - request = build_list_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def list_swagger( - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> Any: - """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: any, or the result of cls(response) - :rtype: any - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_list_swagger_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.list_swagger.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - move: "_models.WorkflowReference", - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(move, 'WorkflowReference') - - request = build_move_request_initial( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self._move_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, 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 - - - @distributed_trace_async - async def begin_move( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - move: "_models.WorkflowReference", - **kwargs: Any - ) -> 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 move: The workflow to move. - :type move: ~azure.mgmt.logic.models.WorkflowReference - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a 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 - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - 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, - move=move, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **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 - ) - 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 - - @distributed_trace_async - async def regenerate_access_key( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - key_type: "_models.RegenerateActionParameter", - **kwargs: Any - ) -> 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 access key type. - :type key_type: ~azure.mgmt.logic.models.RegenerateActionParameter - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(key_type, 'RegenerateActionParameter') - - request = build_regenerate_access_key_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.regenerate_access_key.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def validate_by_resource_group( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - validate: "_models.Workflow", - **kwargs: Any - ) -> 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 validate: The workflow. - :type validate: ~azure.mgmt.logic.models.Workflow - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(validate, 'Workflow') - - request = build_validate_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.validate_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace_async - async def validate_by_location( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - location: str, - workflow_name: str, - validate: "_models.Workflow", - **kwargs: Any - ) -> 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 validate: The workflow. - :type validate: ~azure.mgmt.logic.models.Workflow - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(validate, 'Workflow') - - request = build_validate_by_location_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - location=location, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.validate_by_location.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/models/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py deleted file mode 100644 index 5c09cf9afc9..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py +++ /dev/null @@ -1,517 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._models_py3 import AS2AcknowledgementConnectionSettings -from ._models_py3 import AS2AgreementContent -from ._models_py3 import AS2EnvelopeSettings -from ._models_py3 import AS2ErrorSettings -from ._models_py3 import AS2MdnSettings -from ._models_py3 import AS2MessageConnectionSettings -from ._models_py3 import AS2OneWayAgreement -from ._models_py3 import AS2ProtocolSettings -from ._models_py3 import AS2SecuritySettings -from ._models_py3 import AS2ValidationSettings -from ._models_py3 import AgreementContent -from ._models_py3 import ApiDeploymentParameterMetadata -from ._models_py3 import ApiDeploymentParameterMetadataSet -from ._models_py3 import ApiOperation -from ._models_py3 import ApiOperationAnnotation -from ._models_py3 import ApiOperationListResult -from ._models_py3 import ApiOperationPropertiesDefinition -from ._models_py3 import ApiReference -from ._models_py3 import ApiResourceBackendService -from ._models_py3 import ApiResourceDefinitions -from ._models_py3 import ApiResourceGeneralInformation -from ._models_py3 import ApiResourceMetadata -from ._models_py3 import ApiResourcePolicies -from ._models_py3 import ApiResourceProperties -from ._models_py3 import ArtifactContentPropertiesDefinition -from ._models_py3 import ArtifactProperties -from ._models_py3 import AssemblyCollection -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 -from ._models_py3 import ContentLink -from ._models_py3 import Correlation -from ._models_py3 import EdifactAcknowledgementSettings -from ._models_py3 import EdifactAgreementContent -from ._models_py3 import EdifactDelimiterOverride -from ._models_py3 import EdifactEnvelopeOverride -from ._models_py3 import EdifactEnvelopeSettings -from ._models_py3 import EdifactFramingSettings -from ._models_py3 import EdifactMessageFilter -from ._models_py3 import EdifactMessageIdentifier -from ._models_py3 import EdifactOneWayAgreement -from ._models_py3 import EdifactProcessingSettings -from ._models_py3 import EdifactProtocolSettings -from ._models_py3 import EdifactSchemaReference -from ._models_py3 import EdifactValidationOverride -from ._models_py3 import EdifactValidationSettings -from ._models_py3 import ErrorInfo -from ._models_py3 import ErrorProperties -from ._models_py3 import ErrorResponse -from ._models_py3 import Expression -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 -from ._models_py3 import GetCallbackUrlParameters -from ._models_py3 import IntegrationAccount -from ._models_py3 import IntegrationAccountAgreement -from ._models_py3 import IntegrationAccountAgreementFilter -from ._models_py3 import IntegrationAccountAgreementListResult -from ._models_py3 import IntegrationAccountCertificate -from ._models_py3 import IntegrationAccountCertificateListResult -from ._models_py3 import IntegrationAccountListResult -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 -from ._models_py3 import IntegrationAccountSchema -from ._models_py3 import IntegrationAccountSchemaFilter -from ._models_py3 import IntegrationAccountSchemaListResult -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 IntegrationServiceEnvironmentManagedApi -from ._models_py3 import IntegrationServiceEnvironmentManagedApiDeploymentParameters -from ._models_py3 import IntegrationServiceEnvironmentManagedApiListResult -from ._models_py3 import IntegrationServiceEnvironmentManagedApiProperties -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 -from ._models_py3 import IntegrationServiceEnvironmentSkuDefinitionSku -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 ManagedServiceIdentity -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 -from ._models_py3 import Request -from ._models_py3 import RequestHistory -from ._models_py3 import RequestHistoryListResult -from ._models_py3 import RequestHistoryProperties -from ._models_py3 import Resource -from ._models_py3 import ResourceReference -from ._models_py3 import Response -from ._models_py3 import RetryHistory -from ._models_py3 import RunActionCorrelation -from ._models_py3 import RunCorrelation -from ._models_py3 import SetTriggerStateActionDefinition -from ._models_py3 import Sku -from ._models_py3 import SubResource -from ._models_py3 import SwaggerCustomDynamicList -from ._models_py3 import SwaggerCustomDynamicProperties -from ._models_py3 import SwaggerCustomDynamicSchema -from ._models_py3 import SwaggerCustomDynamicTree -from ._models_py3 import SwaggerCustomDynamicTreeCommand -from ._models_py3 import SwaggerCustomDynamicTreeParameter -from ._models_py3 import SwaggerCustomDynamicTreeSettings -from ._models_py3 import SwaggerExternalDocumentation -from ._models_py3 import SwaggerSchema -from ._models_py3 import SwaggerXml -from ._models_py3 import TrackingEvent -from ._models_py3 import TrackingEventErrorInfo -from ._models_py3 import TrackingEventsDefinition -from ._models_py3 import UserAssignedIdentity -from ._models_py3 import Workflow -from ._models_py3 import WorkflowFilter -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 -from ._models_py3 import WorkflowRunActionListResult -from ._models_py3 import WorkflowRunActionRepetitionDefinition -from ._models_py3 import WorkflowRunActionRepetitionDefinitionCollection -from ._models_py3 import WorkflowRunActionRepetitionProperties -from ._models_py3 import WorkflowRunFilter -from ._models_py3 import WorkflowRunListResult -from ._models_py3 import WorkflowRunTrigger -from ._models_py3 import WorkflowTrigger -from ._models_py3 import WorkflowTriggerCallbackUrl -from ._models_py3 import WorkflowTriggerFilter -from ._models_py3 import WorkflowTriggerHistory -from ._models_py3 import WorkflowTriggerHistoryFilter -from ._models_py3 import WorkflowTriggerHistoryListResult -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 -from ._models_py3 import X12AcknowledgementSettings -from ._models_py3 import X12AgreementContent -from ._models_py3 import X12DelimiterOverrides -from ._models_py3 import X12EnvelopeOverride -from ._models_py3 import X12EnvelopeSettings -from ._models_py3 import X12FramingSettings -from ._models_py3 import X12MessageFilter -from ._models_py3 import X12MessageIdentifier -from ._models_py3 import X12OneWayAgreement -from ._models_py3 import X12ProcessingSettings -from ._models_py3 import X12ProtocolSettings -from ._models_py3 import X12SchemaReference -from ._models_py3 import X12SecuritySettings -from ._models_py3 import X12ValidationOverride -from ._models_py3 import X12ValidationSettings - - -from ._logic_management_client_enums import ( - AgreementType, - ApiDeploymentParameterVisibility, - ApiTier, - ApiType, - AzureAsyncOperationState, - DayOfWeek, - DaysOfWeek, - EdifactCharacterSet, - EdifactDecimalIndicator, - EncryptionAlgorithm, - ErrorResponseCode, - EventLevel, - HashingAlgorithm, - IntegrationAccountSkuName, - IntegrationServiceEnvironmentAccessEndpointType, - IntegrationServiceEnvironmentNetworkDependencyCategoryType, - IntegrationServiceEnvironmentNetworkDependencyHealthState, - IntegrationServiceEnvironmentNetworkEndPointAccessibilityState, - IntegrationServiceEnvironmentSkuName, - IntegrationServiceEnvironmentSkuScaleType, - KeyType, - ManagedServiceIdentityType, - MapType, - MessageFilterType, - OpenAuthenticationProviderType, - ParameterType, - PartnerType, - RecurrenceFrequency, - SchemaType, - SegmentTerminatorSuffix, - SigningAlgorithm, - SkuName, - StatusAnnotation, - SwaggerSchemaType, - TrackEventsOperationOptions, - TrackingRecordType, - TrailingSeparatorPolicy, - UsageIndicator, - WorkflowProvisioningState, - WorkflowState, - WorkflowStatus, - WorkflowTriggerProvisioningState, - WsdlImportMethod, - X12CharacterSet, - X12DateFormat, - X12TimeFormat, -) - -__all__ = [ - 'AS2AcknowledgementConnectionSettings', - 'AS2AgreementContent', - 'AS2EnvelopeSettings', - 'AS2ErrorSettings', - 'AS2MdnSettings', - 'AS2MessageConnectionSettings', - 'AS2OneWayAgreement', - 'AS2ProtocolSettings', - 'AS2SecuritySettings', - 'AS2ValidationSettings', - 'AgreementContent', - 'ApiDeploymentParameterMetadata', - 'ApiDeploymentParameterMetadataSet', - 'ApiOperation', - 'ApiOperationAnnotation', - 'ApiOperationListResult', - 'ApiOperationPropertiesDefinition', - 'ApiReference', - 'ApiResourceBackendService', - 'ApiResourceDefinitions', - 'ApiResourceGeneralInformation', - 'ApiResourceMetadata', - 'ApiResourcePolicies', - 'ApiResourceProperties', - 'ArtifactContentPropertiesDefinition', - 'ArtifactProperties', - 'AssemblyCollection', - 'AssemblyDefinition', - 'AssemblyProperties', - 'AzureResourceErrorInfo', - 'B2BPartnerContent', - 'BatchConfiguration', - 'BatchConfigurationCollection', - 'BatchConfigurationProperties', - 'BatchReleaseCriteria', - 'BusinessIdentity', - 'CallbackUrl', - 'ContentHash', - 'ContentLink', - 'Correlation', - 'EdifactAcknowledgementSettings', - 'EdifactAgreementContent', - 'EdifactDelimiterOverride', - 'EdifactEnvelopeOverride', - 'EdifactEnvelopeSettings', - 'EdifactFramingSettings', - 'EdifactMessageFilter', - 'EdifactMessageIdentifier', - 'EdifactOneWayAgreement', - 'EdifactProcessingSettings', - 'EdifactProtocolSettings', - 'EdifactSchemaReference', - 'EdifactValidationOverride', - 'EdifactValidationSettings', - 'ErrorInfo', - 'ErrorProperties', - 'ErrorResponse', - 'Expression', - 'ExpressionRoot', - 'ExpressionTraces', - 'ExtendedErrorInfo', - 'FlowAccessControlConfiguration', - 'FlowAccessControlConfigurationPolicy', - 'FlowEndpoints', - 'FlowEndpointsConfiguration', - 'GenerateUpgradedDefinitionParameters', - 'GetCallbackUrlParameters', - 'IntegrationAccount', - 'IntegrationAccountAgreement', - 'IntegrationAccountAgreementFilter', - 'IntegrationAccountAgreementListResult', - 'IntegrationAccountCertificate', - 'IntegrationAccountCertificateListResult', - 'IntegrationAccountListResult', - 'IntegrationAccountMap', - 'IntegrationAccountMapFilter', - 'IntegrationAccountMapListResult', - 'IntegrationAccountMapPropertiesParametersSchema', - 'IntegrationAccountPartner', - 'IntegrationAccountPartnerFilter', - 'IntegrationAccountPartnerListResult', - 'IntegrationAccountSchema', - 'IntegrationAccountSchemaFilter', - 'IntegrationAccountSchemaListResult', - 'IntegrationAccountSession', - 'IntegrationAccountSessionFilter', - 'IntegrationAccountSessionListResult', - 'IntegrationAccountSku', - 'IntegrationServiceEnvironmenEncryptionConfiguration', - 'IntegrationServiceEnvironmenEncryptionKeyReference', - 'IntegrationServiceEnvironment', - 'IntegrationServiceEnvironmentAccessEndpoint', - 'IntegrationServiceEnvironmentListResult', - 'IntegrationServiceEnvironmentManagedApi', - 'IntegrationServiceEnvironmentManagedApiDeploymentParameters', - 'IntegrationServiceEnvironmentManagedApiListResult', - 'IntegrationServiceEnvironmentManagedApiProperties', - 'IntegrationServiceEnvironmentNetworkDependency', - 'IntegrationServiceEnvironmentNetworkDependencyHealth', - 'IntegrationServiceEnvironmentNetworkEndpoint', - 'IntegrationServiceEnvironmentProperties', - 'IntegrationServiceEnvironmentSku', - 'IntegrationServiceEnvironmentSkuCapacity', - 'IntegrationServiceEnvironmentSkuDefinition', - 'IntegrationServiceEnvironmentSkuDefinitionSku', - 'IntegrationServiceEnvironmentSkuList', - 'IntegrationServiceEnvironmentSubnetNetworkHealth', - 'IpAddress', - 'IpAddressRange', - 'JsonSchema', - 'KeyVaultKey', - 'KeyVaultKeyAttributes', - 'KeyVaultKeyCollection', - 'KeyVaultKeyReference', - 'KeyVaultKeyReferenceKeyVault', - 'KeyVaultReference', - 'ListKeyVaultKeysDefinition', - 'ManagedApi', - 'ManagedApiListResult', - 'ManagedServiceIdentity', - 'NetworkConfiguration', - 'OpenAuthenticationAccessPolicies', - 'OpenAuthenticationAccessPolicy', - 'OpenAuthenticationPolicyClaim', - 'Operation', - 'OperationDisplay', - 'OperationListResult', - 'OperationResult', - 'OperationResultProperties', - 'PartnerContent', - 'RecurrenceSchedule', - 'RecurrenceScheduleOccurrence', - 'RegenerateActionParameter', - 'RepetitionIndex', - 'Request', - 'RequestHistory', - 'RequestHistoryListResult', - 'RequestHistoryProperties', - 'Resource', - 'ResourceReference', - 'Response', - 'RetryHistory', - 'RunActionCorrelation', - 'RunCorrelation', - 'SetTriggerStateActionDefinition', - 'Sku', - 'SubResource', - 'SwaggerCustomDynamicList', - 'SwaggerCustomDynamicProperties', - 'SwaggerCustomDynamicSchema', - 'SwaggerCustomDynamicTree', - 'SwaggerCustomDynamicTreeCommand', - 'SwaggerCustomDynamicTreeParameter', - 'SwaggerCustomDynamicTreeSettings', - 'SwaggerExternalDocumentation', - 'SwaggerSchema', - 'SwaggerXml', - 'TrackingEvent', - 'TrackingEventErrorInfo', - 'TrackingEventsDefinition', - 'UserAssignedIdentity', - 'Workflow', - 'WorkflowFilter', - 'WorkflowListResult', - 'WorkflowOutputParameter', - 'WorkflowParameter', - 'WorkflowReference', - 'WorkflowRun', - 'WorkflowRunAction', - 'WorkflowRunActionFilter', - 'WorkflowRunActionListResult', - 'WorkflowRunActionRepetitionDefinition', - 'WorkflowRunActionRepetitionDefinitionCollection', - 'WorkflowRunActionRepetitionProperties', - 'WorkflowRunFilter', - 'WorkflowRunListResult', - 'WorkflowRunTrigger', - 'WorkflowTrigger', - 'WorkflowTriggerCallbackUrl', - 'WorkflowTriggerFilter', - 'WorkflowTriggerHistory', - 'WorkflowTriggerHistoryFilter', - 'WorkflowTriggerHistoryListResult', - 'WorkflowTriggerListCallbackUrlQueries', - 'WorkflowTriggerListResult', - 'WorkflowTriggerRecurrence', - 'WorkflowTriggerReference', - 'WorkflowVersion', - 'WorkflowVersionListResult', - 'WsdlService', - 'X12AcknowledgementSettings', - 'X12AgreementContent', - 'X12DelimiterOverrides', - 'X12EnvelopeOverride', - 'X12EnvelopeSettings', - 'X12FramingSettings', - 'X12MessageFilter', - 'X12MessageIdentifier', - 'X12OneWayAgreement', - 'X12ProcessingSettings', - 'X12ProtocolSettings', - 'X12SchemaReference', - 'X12SecuritySettings', - 'X12ValidationOverride', - 'X12ValidationSettings', - 'AgreementType', - 'ApiDeploymentParameterVisibility', - 'ApiTier', - 'ApiType', - 'AzureAsyncOperationState', - 'DayOfWeek', - 'DaysOfWeek', - 'EdifactCharacterSet', - 'EdifactDecimalIndicator', - 'EncryptionAlgorithm', - 'ErrorResponseCode', - 'EventLevel', - 'HashingAlgorithm', - 'IntegrationAccountSkuName', - 'IntegrationServiceEnvironmentAccessEndpointType', - 'IntegrationServiceEnvironmentNetworkDependencyCategoryType', - 'IntegrationServiceEnvironmentNetworkDependencyHealthState', - 'IntegrationServiceEnvironmentNetworkEndPointAccessibilityState', - 'IntegrationServiceEnvironmentSkuName', - 'IntegrationServiceEnvironmentSkuScaleType', - 'KeyType', - 'ManagedServiceIdentityType', - 'MapType', - 'MessageFilterType', - 'OpenAuthenticationProviderType', - 'ParameterType', - 'PartnerType', - 'RecurrenceFrequency', - 'SchemaType', - 'SegmentTerminatorSuffix', - 'SigningAlgorithm', - 'SkuName', - 'StatusAnnotation', - 'SwaggerSchemaType', - 'TrackEventsOperationOptions', - 'TrackingRecordType', - 'TrailingSeparatorPolicy', - 'UsageIndicator', - 'WorkflowProvisioningState', - 'WorkflowState', - 'WorkflowStatus', - 'WorkflowTriggerProvisioningState', - 'WsdlImportMethod', - 'X12CharacterSet', - 'X12DateFormat', - 'X12TimeFormat', -] 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 deleted file mode 100644 index 9ded384d117..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/models/_logic_management_client_enums.py +++ /dev/null @@ -1,510 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum -from six import with_metaclass -from azure.core import CaseInsensitiveEnumMeta - - -class AgreementType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The agreement type. - """ - - NOT_SPECIFIED = "NotSpecified" - AS2 = "AS2" - X12 = "X12" - EDIFACT = "Edifact" - -class ApiDeploymentParameterVisibility(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The Api deployment parameter visibility. - """ - - NOT_SPECIFIED = "NotSpecified" - DEFAULT = "Default" - INTERNAL = "Internal" - -class ApiTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The Api tier. - """ - - NOT_SPECIFIED = "NotSpecified" - ENTERPRISE = "Enterprise" - STANDARD = "Standard" - PREMIUM = "Premium" - -class ApiType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - NOT_SPECIFIED = "NotSpecified" - REST = "Rest" - SOAP = "Soap" - -class AzureAsyncOperationState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The Azure async operation state. - """ - - FAILED = "Failed" - SUCCEEDED = "Succeeded" - PENDING = "Pending" - CANCELED = "Canceled" - -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" - -class DaysOfWeek(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - SUNDAY = "Sunday" - MONDAY = "Monday" - TUESDAY = "Tuesday" - WEDNESDAY = "Wednesday" - THURSDAY = "Thursday" - FRIDAY = "Friday" - SATURDAY = "Saturday" - -class EdifactCharacterSet(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The edifact character set. - """ - - 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" - COMMA = "Comma" - DECIMAL = "Decimal" - -class EncryptionAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The encryption algorithm. - """ - - NOT_SPECIFIED = "NotSpecified" - NONE = "None" - DES3 = "DES3" - RC2 = "RC2" - AES128 = "AES128" - AES192 = "AES192" - AES256 = "AES256" - -class ErrorResponseCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The error response code. - """ - - NOT_SPECIFIED = "NotSpecified" - INTEGRATION_SERVICE_ENVIRONMENT_NOT_FOUND = "IntegrationServiceEnvironmentNotFound" - INTERNAL_SERVER_ERROR = "InternalServerError" - INVALID_OPERATION_ID = "InvalidOperationId" - -class EventLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The event level. - """ - - LOG_ALWAYS = "LogAlways" - CRITICAL = "Critical" - ERROR = "Error" - WARNING = "Warning" - INFORMATIONAL = "Informational" - VERBOSE = "Verbose" - -class HashingAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The signing or hashing algorithm. - """ - - 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" - FREE = "Free" - BASIC = "Basic" - STANDARD = "Standard" - -class IntegrationServiceEnvironmentAccessEndpointType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The integration service environment access endpoint type. - """ - - NOT_SPECIFIED = "NotSpecified" - EXTERNAL = "External" - INTERNAL = "Internal" - -class IntegrationServiceEnvironmentNetworkDependencyCategoryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The integration service environment network dependency category type. - """ - - 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" - HEALTHY = "Healthy" - UNHEALTHY = "Unhealthy" - UNKNOWN = "Unknown" - -class IntegrationServiceEnvironmentNetworkEndPointAccessibilityState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The integration service environment network endpoint accessibility state. - """ - - NOT_SPECIFIED = "NotSpecified" - UNKNOWN = "Unknown" - AVAILABLE = "Available" - NOT_AVAILABLE = "NotAvailable" - -class IntegrationServiceEnvironmentSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The integration service environment sku name. - """ - - NOT_SPECIFIED = "NotSpecified" - PREMIUM = "Premium" - DEVELOPER = "Developer" - -class IntegrationServiceEnvironmentSkuScaleType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The integration service environment sku scale type. - """ - - MANUAL = "Manual" - AUTOMATIC = "Automatic" - NONE = "None" - -class KeyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The key type. - """ - - NOT_SPECIFIED = "NotSpecified" - PRIMARY = "Primary" - SECONDARY = "Secondary" - -class ManagedServiceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Type of managed service identity. The type 'SystemAssigned' includes an implicitly created - identity. The type 'None' will remove any identities from the resource. - """ - - SYSTEM_ASSIGNED = "SystemAssigned" - USER_ASSIGNED = "UserAssigned" - NONE = "None" - -class MapType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The map type. - """ - - NOT_SPECIFIED = "NotSpecified" - XSLT = "Xslt" - XSLT20 = "Xslt20" - XSLT30 = "Xslt30" - LIQUID = "Liquid" - -class MessageFilterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The message filter type. - """ - - NOT_SPECIFIED = "NotSpecified" - INCLUDE = "Include" - EXCLUDE = "Exclude" - -class OpenAuthenticationProviderType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Open authentication policy provider type. - """ - - AAD = "AAD" - -class ParameterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The parameter type. - """ - - NOT_SPECIFIED = "NotSpecified" - STRING = "String" - SECURE_STRING = "SecureString" - INT = "Int" - FLOAT = "Float" - BOOL = "Bool" - ARRAY = "Array" - OBJECT = "Object" - SECURE_OBJECT = "SecureObject" - -class PartnerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The partner type. - """ - - NOT_SPECIFIED = "NotSpecified" - B2_B = "B2B" - -class RecurrenceFrequency(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The recurrence frequency. - """ - - NOT_SPECIFIED = "NotSpecified" - SECOND = "Second" - MINUTE = "Minute" - HOUR = "Hour" - DAY = "Day" - WEEK = "Week" - MONTH = "Month" - YEAR = "Year" - -class SchemaType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The schema type. - """ - - NOT_SPECIFIED = "NotSpecified" - XML = "Xml" - -class SegmentTerminatorSuffix(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The segment terminator suffix. - """ - - NOT_SPECIFIED = "NotSpecified" - NONE = "None" - CR = "CR" - LF = "LF" - CRLF = "CRLF" - -class SigningAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The signing or hashing algorithm. - """ - - NOT_SPECIFIED = "NotSpecified" - DEFAULT = "Default" - SHA1 = "SHA1" - SHA2256 = "SHA2256" - SHA2384 = "SHA2384" - SHA2512 = "SHA2512" - -class SkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The sku name. - """ - - NOT_SPECIFIED = "NotSpecified" - FREE = "Free" - SHARED = "Shared" - BASIC = "Basic" - STANDARD = "Standard" - PREMIUM = "Premium" - -class StatusAnnotation(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status annotation. - """ - - NOT_SPECIFIED = "NotSpecified" - PREVIEW = "Preview" - PRODUCTION = "Production" - -class SwaggerSchemaType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The swagger schema type. - """ - - 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. - """ - - NONE = "None" - DISABLE_SOURCE_INFO_ENRICH = "DisableSourceInfoEnrich" - -class TrackingRecordType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The tracking record type. - """ - - 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" - NOT_ALLOWED = "NotAllowed" - OPTIONAL = "Optional" - MANDATORY = "Mandatory" - -class UsageIndicator(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The usage indicator. - """ - - NOT_SPECIFIED = "NotSpecified" - TEST = "Test" - INFORMATION = "Information" - PRODUCTION = "Production" - -class WorkflowProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The workflow provisioning state. - """ - - 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. - """ - - NOT_SPECIFIED = "NotSpecified" - COMPLETED = "Completed" - ENABLED = "Enabled" - DISABLED = "Disabled" - DELETED = "Deleted" - SUSPENDED = "Suspended" - -class WorkflowStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The workflow status. - """ - - 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. - """ - - 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" - SOAP_TO_REST = "SoapToRest" - SOAP_PASS_THROUGH = "SoapPassThrough" - -class X12CharacterSet(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The X12 character set. - """ - - NOT_SPECIFIED = "NotSpecified" - BASIC = "Basic" - EXTENDED = "Extended" - UTF8 = "UTF8" - -class X12DateFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The x12 date format. - """ - - NOT_SPECIFIED = "NotSpecified" - CCYYMMDD = "CCYYMMDD" - YYMMDD = "YYMMDD" - -class X12TimeFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The x12 time format. - """ - - 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_py3.py b/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py deleted file mode 100644 index 05491a1ea3d..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py +++ /dev/null @@ -1,11646 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Any, Dict, List, Optional, Union - -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. - - :ivar a_s2: The AS2 agreement content. - :vartype a_s2: ~azure.mgmt.logic.models.AS2AgreementContent - :ivar x12: The X12 agreement content. - :vartype x12: ~azure.mgmt.logic.models.X12AgreementContent - :ivar edifact: The EDIFACT agreement content. - :vartype edifact: ~azure.mgmt.logic.models.EdifactAgreementContent - """ - - _attribute_map = { - 'a_s2': {'key': 'aS2', 'type': 'AS2AgreementContent'}, - 'x12': {'key': 'x12', 'type': 'X12AgreementContent'}, - 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, - } - - def __init__( - self, - *, - a_s2: Optional["AS2AgreementContent"] = None, - x12: Optional["X12AgreementContent"] = None, - edifact: Optional["EdifactAgreementContent"] = None, - **kwargs - ): - """ - :keyword a_s2: The AS2 agreement content. - :paramtype a_s2: ~azure.mgmt.logic.models.AS2AgreementContent - :keyword x12: The X12 agreement content. - :paramtype x12: ~azure.mgmt.logic.models.X12AgreementContent - :keyword edifact: The EDIFACT agreement content. - :paramtype edifact: ~azure.mgmt.logic.models.EdifactAgreementContent - """ - super(AgreementContent, self).__init__(**kwargs) - self.a_s2 = a_s2 - self.x12 = x12 - self.edifact = edifact - - -class ApiDeploymentParameterMetadata(msrest.serialization.Model): - """The API deployment parameter metadata. - - :ivar type: The type. - :vartype type: str - :ivar is_required: Indicates whether its required. - :vartype is_required: bool - :ivar display_name: The display name. - :vartype display_name: str - :ivar description: The description. - :vartype description: str - :ivar visibility: The visibility. Possible values include: "NotSpecified", "Default", - "Internal". - :vartype visibility: str or ~azure.mgmt.logic.models.ApiDeploymentParameterVisibility - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'is_required': {'key': 'isRequired', 'type': 'bool'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'visibility': {'key': 'visibility', 'type': 'str'}, - } - - def __init__( - self, - *, - type: Optional[str] = None, - is_required: Optional[bool] = None, - display_name: Optional[str] = None, - description: Optional[str] = None, - visibility: Optional[Union[str, "ApiDeploymentParameterVisibility"]] = None, - **kwargs - ): - """ - :keyword type: The type. - :paramtype type: str - :keyword is_required: Indicates whether its required. - :paramtype is_required: bool - :keyword display_name: The display name. - :paramtype display_name: str - :keyword description: The description. - :paramtype description: str - :keyword visibility: The visibility. Possible values include: "NotSpecified", "Default", - "Internal". - :paramtype visibility: str or ~azure.mgmt.logic.models.ApiDeploymentParameterVisibility - """ - super(ApiDeploymentParameterMetadata, self).__init__(**kwargs) - self.type = type - self.is_required = is_required - self.display_name = display_name - self.description = description - self.visibility = visibility - - -class ApiDeploymentParameterMetadataSet(msrest.serialization.Model): - """The API deployment parameters metadata. - - :ivar package_content_link: The package content link parameter. - :vartype package_content_link: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata - :ivar redis_cache_connection_string: The package content link parameter. - :vartype redis_cache_connection_string: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata - """ - - _attribute_map = { - 'package_content_link': {'key': 'packageContentLink', 'type': 'ApiDeploymentParameterMetadata'}, - 'redis_cache_connection_string': {'key': 'redisCacheConnectionString', 'type': 'ApiDeploymentParameterMetadata'}, - } - - def __init__( - self, - *, - package_content_link: Optional["ApiDeploymentParameterMetadata"] = None, - redis_cache_connection_string: Optional["ApiDeploymentParameterMetadata"] = None, - **kwargs - ): - """ - :keyword package_content_link: The package content link parameter. - :paramtype package_content_link: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata - :keyword redis_cache_connection_string: The package content link parameter. - :paramtype redis_cache_connection_string: - ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata - """ - super(ApiDeploymentParameterMetadataSet, self).__init__(**kwargs) - self.package_content_link = package_content_link - self.redis_cache_connection_string = redis_cache_connection_string - - -class Resource(msrest.serialization.Model): - """The base resource type. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - """ - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ApiOperation(Resource): - """The api operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar properties: The api operations properties. - :vartype properties: ~azure.mgmt.logic.models.ApiOperationPropertiesDefinition - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'ApiOperationPropertiesDefinition'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["ApiOperationPropertiesDefinition"] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword properties: The api operations properties. - :paramtype properties: ~azure.mgmt.logic.models.ApiOperationPropertiesDefinition - """ - super(ApiOperation, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties - - -class ApiOperationAnnotation(msrest.serialization.Model): - """The Api Operation Annotation. - - :ivar status: The status annotation. Possible values include: "NotSpecified", "Preview", - "Production". - :vartype status: str or ~azure.mgmt.logic.models.StatusAnnotation - :ivar family: The family. - :vartype family: str - :ivar revision: The revision. - :vartype revision: int - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'int'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "StatusAnnotation"]] = None, - family: Optional[str] = None, - revision: Optional[int] = None, - **kwargs - ): - """ - :keyword status: The status annotation. Possible values include: "NotSpecified", "Preview", - "Production". - :paramtype status: str or ~azure.mgmt.logic.models.StatusAnnotation - :keyword family: The family. - :paramtype family: str - :keyword revision: The revision. - :paramtype revision: int - """ - super(ApiOperationAnnotation, self).__init__(**kwargs) - self.status = status - self.family = family - self.revision = revision - - -class ApiOperationListResult(msrest.serialization.Model): - """The list of managed API operations. - - :ivar value: The api operation definitions for an API. - :vartype value: list[~azure.mgmt.logic.models.ApiOperation] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApiOperation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ApiOperation"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The api operation definitions for an API. - :paramtype value: list[~azure.mgmt.logic.models.ApiOperation] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(ApiOperationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApiOperationPropertiesDefinition(msrest.serialization.Model): - """The api operations properties. - - :ivar summary: The summary of the api operation. - :vartype summary: str - :ivar description: The description of the api operation. - :vartype description: str - :ivar visibility: The visibility of the api operation. - :vartype visibility: str - :ivar trigger: The trigger type of api operation. - :vartype trigger: str - :ivar trigger_hint: The trigger hint for the api operation. - :vartype trigger_hint: str - :ivar pageable: Indicates whether the api operation is pageable. - :vartype pageable: bool - :ivar annotation: The annotation of api operation. - :vartype annotation: ~azure.mgmt.logic.models.ApiOperationAnnotation - :ivar api: The api reference. - :vartype api: ~azure.mgmt.logic.models.ApiReference - :ivar inputs_definition: The operation inputs definition schema. - :vartype inputs_definition: ~azure.mgmt.logic.models.SwaggerSchema - :ivar responses_definition: The operation responses definition schemas. - :vartype responses_definition: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] - :ivar is_webhook: Indicates whether the API operation is webhook or not. - :vartype is_webhook: bool - :ivar is_notification: Indicates whether the API operation is notification or not. - :vartype is_notification: bool - """ - - _attribute_map = { - 'summary': {'key': 'summary', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'visibility': {'key': 'visibility', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'str'}, - 'trigger_hint': {'key': 'triggerHint', 'type': 'str'}, - 'pageable': {'key': 'pageable', 'type': 'bool'}, - 'annotation': {'key': 'annotation', 'type': 'ApiOperationAnnotation'}, - 'api': {'key': 'api', 'type': 'ApiReference'}, - 'inputs_definition': {'key': 'inputsDefinition', 'type': 'SwaggerSchema'}, - 'responses_definition': {'key': 'responsesDefinition', 'type': '{SwaggerSchema}'}, - 'is_webhook': {'key': 'isWebhook', 'type': 'bool'}, - 'is_notification': {'key': 'isNotification', 'type': 'bool'}, - } - - def __init__( - self, - *, - summary: Optional[str] = None, - description: Optional[str] = None, - visibility: Optional[str] = None, - trigger: Optional[str] = None, - trigger_hint: Optional[str] = None, - pageable: Optional[bool] = None, - annotation: Optional["ApiOperationAnnotation"] = None, - api: Optional["ApiReference"] = None, - inputs_definition: Optional["SwaggerSchema"] = None, - responses_definition: Optional[Dict[str, "SwaggerSchema"]] = None, - is_webhook: Optional[bool] = None, - is_notification: Optional[bool] = None, - **kwargs - ): - """ - :keyword summary: The summary of the api operation. - :paramtype summary: str - :keyword description: The description of the api operation. - :paramtype description: str - :keyword visibility: The visibility of the api operation. - :paramtype visibility: str - :keyword trigger: The trigger type of api operation. - :paramtype trigger: str - :keyword trigger_hint: The trigger hint for the api operation. - :paramtype trigger_hint: str - :keyword pageable: Indicates whether the api operation is pageable. - :paramtype pageable: bool - :keyword annotation: The annotation of api operation. - :paramtype annotation: ~azure.mgmt.logic.models.ApiOperationAnnotation - :keyword api: The api reference. - :paramtype api: ~azure.mgmt.logic.models.ApiReference - :keyword inputs_definition: The operation inputs definition schema. - :paramtype inputs_definition: ~azure.mgmt.logic.models.SwaggerSchema - :keyword responses_definition: The operation responses definition schemas. - :paramtype responses_definition: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] - :keyword is_webhook: Indicates whether the API operation is webhook or not. - :paramtype is_webhook: bool - :keyword is_notification: Indicates whether the API operation is notification or not. - :paramtype is_notification: bool - """ - super(ApiOperationPropertiesDefinition, self).__init__(**kwargs) - self.summary = summary - self.description = description - self.visibility = visibility - self.trigger = trigger - self.trigger_hint = trigger_hint - self.pageable = pageable - self.annotation = annotation - self.api = api - self.inputs_definition = inputs_definition - self.responses_definition = responses_definition - self.is_webhook = is_webhook - self.is_notification = is_notification - - -class ResourceReference(msrest.serialization.Model): - """The resource reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - """ - :keyword id: The resource id. - :paramtype id: str - """ - super(ResourceReference, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class ApiReference(ResourceReference): - """The Api reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar display_name: The display name of the api. - :vartype display_name: str - :ivar description: The description of the api. - :vartype description: str - :ivar icon_uri: The icon uri of the api. - :vartype icon_uri: str - :ivar swagger: The swagger of the api. - :vartype swagger: any - :ivar brand_color: The brand color of the api. - :vartype brand_color: str - :ivar category: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", - "Premium". - :vartype category: str or ~azure.mgmt.logic.models.ApiTier - :ivar integration_service_environment: The integration service environment reference. - :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'icon_uri': {'key': 'iconUri', 'type': 'str'}, - 'swagger': {'key': 'swagger', 'type': 'object'}, - 'brand_color': {'key': 'brandColor', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'integration_service_environment': {'key': 'integrationServiceEnvironment', 'type': 'ResourceReference'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - display_name: Optional[str] = None, - description: Optional[str] = None, - icon_uri: Optional[str] = None, - swagger: Optional[Any] = None, - brand_color: Optional[str] = None, - category: Optional[Union[str, "ApiTier"]] = None, - integration_service_environment: Optional["ResourceReference"] = None, - **kwargs - ): - """ - :keyword id: The resource id. - :paramtype id: str - :keyword display_name: The display name of the api. - :paramtype display_name: str - :keyword description: The description of the api. - :paramtype description: str - :keyword icon_uri: The icon uri of the api. - :paramtype icon_uri: str - :keyword swagger: The swagger of the api. - :paramtype swagger: any - :keyword brand_color: The brand color of the api. - :paramtype brand_color: str - :keyword category: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", - "Premium". - :paramtype category: str or ~azure.mgmt.logic.models.ApiTier - :keyword integration_service_environment: The integration service environment reference. - :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - """ - super(ApiReference, self).__init__(id=id, **kwargs) - self.display_name = display_name - self.description = description - self.icon_uri = icon_uri - self.swagger = swagger - self.brand_color = brand_color - self.category = category - self.integration_service_environment = integration_service_environment - - -class ApiResourceBackendService(msrest.serialization.Model): - """The API backend service. - - :ivar service_url: The service URL. - :vartype service_url: str - """ - - _attribute_map = { - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - } - - def __init__( - self, - *, - service_url: Optional[str] = None, - **kwargs - ): - """ - :keyword service_url: The service URL. - :paramtype service_url: str - """ - super(ApiResourceBackendService, self).__init__(**kwargs) - self.service_url = service_url - - -class ApiResourceDefinitions(msrest.serialization.Model): - """The Api resource definition. - - :ivar original_swagger_url: The original swagger url. - :vartype original_swagger_url: str - :ivar modified_swagger_url: The modified swagger url. - :vartype modified_swagger_url: str - """ - - _attribute_map = { - 'original_swagger_url': {'key': 'originalSwaggerUrl', 'type': 'str'}, - 'modified_swagger_url': {'key': 'modifiedSwaggerUrl', 'type': 'str'}, - } - - def __init__( - self, - *, - original_swagger_url: Optional[str] = None, - modified_swagger_url: Optional[str] = None, - **kwargs - ): - """ - :keyword original_swagger_url: The original swagger url. - :paramtype original_swagger_url: str - :keyword modified_swagger_url: The modified swagger url. - :paramtype modified_swagger_url: str - """ - super(ApiResourceDefinitions, self).__init__(**kwargs) - self.original_swagger_url = original_swagger_url - self.modified_swagger_url = modified_swagger_url - - -class ApiResourceGeneralInformation(msrest.serialization.Model): - """The API general information. - - :ivar icon_url: The icon url. - :vartype icon_url: str - :ivar display_name: The display name. - :vartype display_name: str - :ivar description: The description. - :vartype description: str - :ivar terms_of_use_url: The terms of use url. - :vartype terms_of_use_url: str - :ivar release_tag: The release tag. - :vartype release_tag: str - :ivar tier: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", - "Premium". - :vartype tier: str or ~azure.mgmt.logic.models.ApiTier - """ - - _attribute_map = { - 'icon_url': {'key': 'iconUrl', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'terms_of_use_url': {'key': 'termsOfUseUrl', 'type': 'str'}, - 'release_tag': {'key': 'releaseTag', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__( - self, - *, - icon_url: Optional[str] = None, - display_name: Optional[str] = None, - description: Optional[str] = None, - terms_of_use_url: Optional[str] = None, - release_tag: Optional[str] = None, - tier: Optional[Union[str, "ApiTier"]] = None, - **kwargs - ): - """ - :keyword icon_url: The icon url. - :paramtype icon_url: str - :keyword display_name: The display name. - :paramtype display_name: str - :keyword description: The description. - :paramtype description: str - :keyword terms_of_use_url: The terms of use url. - :paramtype terms_of_use_url: str - :keyword release_tag: The release tag. - :paramtype release_tag: str - :keyword tier: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", - "Premium". - :paramtype tier: str or ~azure.mgmt.logic.models.ApiTier - """ - super(ApiResourceGeneralInformation, self).__init__(**kwargs) - self.icon_url = icon_url - self.display_name = display_name - self.description = description - self.terms_of_use_url = terms_of_use_url - self.release_tag = release_tag - self.tier = tier - - -class ApiResourceMetadata(msrest.serialization.Model): - """The api resource metadata. - - :ivar source: The source. - :vartype source: str - :ivar brand_color: The brand color. - :vartype brand_color: str - :ivar hide_key: The hide key. - :vartype hide_key: str - :ivar tags: A set of tags. The tags. - :vartype tags: dict[str, str] - :ivar api_type: The api type. Possible values include: "NotSpecified", "Rest", "Soap". - :vartype api_type: str or ~azure.mgmt.logic.models.ApiType - :ivar wsdl_service: The WSDL service. - :vartype wsdl_service: ~azure.mgmt.logic.models.WsdlService - :ivar wsdl_import_method: The WSDL import method. Possible values include: "NotSpecified", - "SoapToRest", "SoapPassThrough". - :vartype wsdl_import_method: str or ~azure.mgmt.logic.models.WsdlImportMethod - :ivar connection_type: The connection type. - :vartype connection_type: str - :ivar 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". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :ivar deployment_parameters: The connector deployment parameters metadata. - :vartype deployment_parameters: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadataSet - """ - - _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, - 'brand_color': {'key': 'brandColor', 'type': 'str'}, - 'hide_key': {'key': 'hideKey', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'api_type': {'key': 'ApiType', 'type': 'str'}, - 'wsdl_service': {'key': 'wsdlService', 'type': 'WsdlService'}, - 'wsdl_import_method': {'key': 'wsdlImportMethod', 'type': 'str'}, - 'connection_type': {'key': 'connectionType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'deployment_parameters': {'key': 'deploymentParameters', 'type': 'ApiDeploymentParameterMetadataSet'}, - } - - def __init__( - self, - *, - source: Optional[str] = None, - brand_color: Optional[str] = None, - hide_key: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - api_type: Optional[Union[str, "ApiType"]] = None, - wsdl_service: Optional["WsdlService"] = None, - wsdl_import_method: Optional[Union[str, "WsdlImportMethod"]] = None, - connection_type: Optional[str] = None, - provisioning_state: Optional[Union[str, "WorkflowProvisioningState"]] = None, - deployment_parameters: Optional["ApiDeploymentParameterMetadataSet"] = None, - **kwargs - ): - """ - :keyword source: The source. - :paramtype source: str - :keyword brand_color: The brand color. - :paramtype brand_color: str - :keyword hide_key: The hide key. - :paramtype hide_key: str - :keyword tags: A set of tags. The tags. - :paramtype tags: dict[str, str] - :keyword api_type: The api type. Possible values include: "NotSpecified", "Rest", "Soap". - :paramtype api_type: str or ~azure.mgmt.logic.models.ApiType - :keyword wsdl_service: The WSDL service. - :paramtype wsdl_service: ~azure.mgmt.logic.models.WsdlService - :keyword wsdl_import_method: The WSDL import method. Possible values include: "NotSpecified", - "SoapToRest", "SoapPassThrough". - :paramtype wsdl_import_method: str or ~azure.mgmt.logic.models.WsdlImportMethod - :keyword connection_type: The connection type. - :paramtype connection_type: str - :keyword 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". - :paramtype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :keyword deployment_parameters: The connector deployment parameters metadata. - :paramtype deployment_parameters: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadataSet - """ - super(ApiResourceMetadata, self).__init__(**kwargs) - self.source = source - self.brand_color = brand_color - self.hide_key = hide_key - self.tags = tags - self.api_type = api_type - self.wsdl_service = wsdl_service - self.wsdl_import_method = wsdl_import_method - self.connection_type = connection_type - self.provisioning_state = provisioning_state - self.deployment_parameters = deployment_parameters - - -class ApiResourcePolicies(msrest.serialization.Model): - """The API resource policies. - - :ivar content: The API level only policies XML as embedded content. - :vartype content: str - :ivar content_link: The content link to the policies. - :vartype content_link: str - """ - - _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'str'}, - } - - def __init__( - self, - *, - content: Optional[str] = None, - content_link: Optional[str] = None, - **kwargs - ): - """ - :keyword content: The API level only policies XML as embedded content. - :paramtype content: str - :keyword content_link: The content link to the policies. - :paramtype content_link: str - """ - super(ApiResourcePolicies, self).__init__(**kwargs) - self.content = content - self.content_link = content_link - - -class ApiResourceProperties(msrest.serialization.Model): - """The API resource properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name. - :vartype name: str - :ivar connection_parameters: The connection parameters. - :vartype connection_parameters: dict[str, any] - :ivar metadata: The metadata. - :vartype metadata: ~azure.mgmt.logic.models.ApiResourceMetadata - :ivar runtime_urls: The runtime urls. - :vartype runtime_urls: list[str] - :ivar general_information: The api general information. - :vartype general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation - :ivar capabilities: The capabilities. - :vartype capabilities: list[str] - :ivar backend_service: The backend service. - :vartype backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService - :ivar policies: The policies for the API. - :vartype policies: ~azure.mgmt.logic.models.ApiResourcePolicies - :ivar api_definition_url: The API definition. - :vartype api_definition_url: str - :ivar api_definitions: The api definitions. - :vartype api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions - :ivar integration_service_environment: The integration service environment reference. - :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :ivar 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". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :ivar category: The category. Possible values include: "NotSpecified", "Enterprise", - "Standard", "Premium". - :vartype category: str or ~azure.mgmt.logic.models.ApiTier - """ - - _validation = { - 'name': {'readonly': True}, - 'connection_parameters': {'readonly': True}, - 'metadata': {'readonly': True}, - 'runtime_urls': {'readonly': True}, - 'general_information': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'backend_service': {'readonly': True}, - 'policies': {'readonly': True}, - 'api_definition_url': {'readonly': True}, - 'api_definitions': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'category': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_parameters': {'key': 'connectionParameters', 'type': '{object}'}, - 'metadata': {'key': 'metadata', 'type': 'ApiResourceMetadata'}, - 'runtime_urls': {'key': 'runtimeUrls', 'type': '[str]'}, - 'general_information': {'key': 'generalInformation', 'type': 'ApiResourceGeneralInformation'}, - 'capabilities': {'key': 'capabilities', 'type': '[str]'}, - 'backend_service': {'key': 'backendService', 'type': 'ApiResourceBackendService'}, - 'policies': {'key': 'policies', 'type': 'ApiResourcePolicies'}, - 'api_definition_url': {'key': 'apiDefinitionUrl', 'type': 'str'}, - 'api_definitions': {'key': 'apiDefinitions', 'type': 'ApiResourceDefinitions'}, - 'integration_service_environment': {'key': 'integrationServiceEnvironment', 'type': 'ResourceReference'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - } - - def __init__( - self, - *, - integration_service_environment: Optional["ResourceReference"] = None, - **kwargs - ): - """ - :keyword integration_service_environment: The integration service environment reference. - :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - """ - super(ApiResourceProperties, self).__init__(**kwargs) - self.name = None - self.connection_parameters = None - self.metadata = None - self.runtime_urls = None - self.general_information = None - self.capabilities = None - self.backend_service = None - self.policies = None - self.api_definition_url = None - self.api_definitions = None - self.integration_service_environment = integration_service_environment - self.provisioning_state = None - self.category = None - - -class ArtifactProperties(msrest.serialization.Model): - """The artifact properties definition. - - :ivar created_time: The artifact creation time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The artifact changed time. - :vartype changed_time: ~datetime.datetime - :ivar metadata: Anything. - :vartype metadata: any - """ - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - } - - def __init__( - self, - *, - created_time: Optional[datetime.datetime] = None, - changed_time: Optional[datetime.datetime] = None, - metadata: Optional[Any] = None, - **kwargs - ): - """ - :keyword created_time: The artifact creation time. - :paramtype created_time: ~datetime.datetime - :keyword changed_time: The artifact changed time. - :paramtype changed_time: ~datetime.datetime - :keyword metadata: Anything. - :paramtype metadata: any - """ - super(ArtifactProperties, self).__init__(**kwargs) - self.created_time = created_time - self.changed_time = changed_time - self.metadata = metadata - - -class ArtifactContentPropertiesDefinition(ArtifactProperties): - """The artifact content properties definition. - - :ivar created_time: The artifact creation time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The artifact changed time. - :vartype changed_time: ~datetime.datetime - :ivar metadata: Anything. - :vartype metadata: any - :ivar content: Anything. - :vartype content: any - :ivar content_type: The content type. - :vartype content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - """ - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'content': {'key': 'content', 'type': 'object'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, - } - - def __init__( - self, - *, - created_time: Optional[datetime.datetime] = None, - changed_time: Optional[datetime.datetime] = None, - metadata: Optional[Any] = None, - content: Optional[Any] = None, - content_type: Optional[str] = None, - content_link: Optional["ContentLink"] = None, - **kwargs - ): - """ - :keyword created_time: The artifact creation time. - :paramtype created_time: ~datetime.datetime - :keyword changed_time: The artifact changed time. - :paramtype changed_time: ~datetime.datetime - :keyword metadata: Anything. - :paramtype metadata: any - :keyword content: Anything. - :paramtype content: any - :keyword content_type: The content type. - :paramtype content_type: str - :keyword content_link: The content link. - :paramtype content_link: ~azure.mgmt.logic.models.ContentLink - """ - super(ArtifactContentPropertiesDefinition, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) - self.content = content - self.content_type = content_type - self.content_link = content_link - - -class AS2AcknowledgementConnectionSettings(msrest.serialization.Model): - """The AS2 agreement acknowledgement connection settings. - - All required parameters must be populated in order to send to Azure. - - :ivar ignore_certificate_name_mismatch: Required. Indicates whether to ignore mismatch in - certificate name. - :vartype ignore_certificate_name_mismatch: bool - :ivar support_http_status_code_continue: Required. Indicates whether to support HTTP status - code 'CONTINUE'. - :vartype support_http_status_code_continue: bool - :ivar keep_http_connection_alive: Required. Indicates whether to keep the connection alive. - :vartype keep_http_connection_alive: bool - :ivar unfold_http_headers: Required. Indicates whether to unfold the HTTP headers. - :vartype unfold_http_headers: bool - """ - - _validation = { - 'ignore_certificate_name_mismatch': {'required': True}, - 'support_http_status_code_continue': {'required': True}, - 'keep_http_connection_alive': {'required': True}, - 'unfold_http_headers': {'required': True}, - } - - _attribute_map = { - 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, - 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, - 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, - 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, - } - - def __init__( - self, - *, - ignore_certificate_name_mismatch: bool, - support_http_status_code_continue: bool, - keep_http_connection_alive: bool, - unfold_http_headers: bool, - **kwargs - ): - """ - :keyword ignore_certificate_name_mismatch: Required. Indicates whether to ignore mismatch in - certificate name. - :paramtype ignore_certificate_name_mismatch: bool - :keyword support_http_status_code_continue: Required. Indicates whether to support HTTP status - code 'CONTINUE'. - :paramtype support_http_status_code_continue: bool - :keyword keep_http_connection_alive: Required. Indicates whether to keep the connection alive. - :paramtype keep_http_connection_alive: bool - :keyword unfold_http_headers: Required. Indicates whether to unfold the HTTP headers. - :paramtype unfold_http_headers: bool - """ - super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) - self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch - self.support_http_status_code_continue = support_http_status_code_continue - self.keep_http_connection_alive = keep_http_connection_alive - self.unfold_http_headers = unfold_http_headers - - -class AS2AgreementContent(msrest.serialization.Model): - """The integration account AS2 agreement content. - - All required parameters must be populated in order to send to Azure. - - :ivar receive_agreement: Required. The AS2 one-way receive agreement. - :vartype receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement - :ivar send_agreement: Required. The AS2 one-way send agreement. - :vartype send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'AS2OneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, - } - - def __init__( - self, - *, - receive_agreement: "AS2OneWayAgreement", - send_agreement: "AS2OneWayAgreement", - **kwargs - ): - """ - :keyword receive_agreement: Required. The AS2 one-way receive agreement. - :paramtype receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement - :keyword send_agreement: Required. The AS2 one-way send agreement. - :paramtype send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement - """ - super(AS2AgreementContent, self).__init__(**kwargs) - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement - - -class AS2EnvelopeSettings(msrest.serialization.Model): - """The AS2 agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :ivar message_content_type: Required. The message content type. - :vartype message_content_type: str - :ivar transmit_file_name_in_mime_header: Required. The value indicating whether to transmit - file name in mime header. - :vartype transmit_file_name_in_mime_header: bool - :ivar file_name_template: Required. The template for file name. - :vartype file_name_template: str - :ivar suspend_message_on_file_name_generation_error: Required. The value indicating whether to - suspend message on file name generation error. - :vartype suspend_message_on_file_name_generation_error: bool - :ivar autogenerate_file_name: Required. The value indicating whether to auto generate file - name. - :vartype autogenerate_file_name: bool - """ - - _validation = { - 'message_content_type': {'required': True}, - 'transmit_file_name_in_mime_header': {'required': True}, - 'file_name_template': {'required': True}, - 'suspend_message_on_file_name_generation_error': {'required': True}, - 'autogenerate_file_name': {'required': True}, - } - - _attribute_map = { - 'message_content_type': {'key': 'messageContentType', 'type': 'str'}, - 'transmit_file_name_in_mime_header': {'key': 'transmitFileNameInMimeHeader', 'type': 'bool'}, - 'file_name_template': {'key': 'fileNameTemplate', 'type': 'str'}, - 'suspend_message_on_file_name_generation_error': {'key': 'suspendMessageOnFileNameGenerationError', 'type': 'bool'}, - 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, - } - - def __init__( - self, - *, - message_content_type: str, - transmit_file_name_in_mime_header: bool, - file_name_template: str, - suspend_message_on_file_name_generation_error: bool, - autogenerate_file_name: bool, - **kwargs - ): - """ - :keyword message_content_type: Required. The message content type. - :paramtype message_content_type: str - :keyword transmit_file_name_in_mime_header: Required. The value indicating whether to transmit - file name in mime header. - :paramtype transmit_file_name_in_mime_header: bool - :keyword file_name_template: Required. The template for file name. - :paramtype file_name_template: str - :keyword suspend_message_on_file_name_generation_error: Required. The value indicating whether - to suspend message on file name generation error. - :paramtype suspend_message_on_file_name_generation_error: bool - :keyword autogenerate_file_name: Required. The value indicating whether to auto generate file - name. - :paramtype autogenerate_file_name: bool - """ - super(AS2EnvelopeSettings, self).__init__(**kwargs) - self.message_content_type = message_content_type - self.transmit_file_name_in_mime_header = transmit_file_name_in_mime_header - self.file_name_template = file_name_template - self.suspend_message_on_file_name_generation_error = suspend_message_on_file_name_generation_error - self.autogenerate_file_name = autogenerate_file_name - - -class AS2ErrorSettings(msrest.serialization.Model): - """The AS2 agreement error settings. - - All required parameters must be populated in order to send to Azure. - - :ivar suspend_duplicate_message: Required. The value indicating whether to suspend duplicate - message. - :vartype suspend_duplicate_message: bool - :ivar resend_if_mdn_not_received: Required. The value indicating whether to resend message If - MDN is not received. - :vartype resend_if_mdn_not_received: bool - """ - - _validation = { - 'suspend_duplicate_message': {'required': True}, - 'resend_if_mdn_not_received': {'required': True}, - } - - _attribute_map = { - 'suspend_duplicate_message': {'key': 'suspendDuplicateMessage', 'type': 'bool'}, - 'resend_if_mdn_not_received': {'key': 'resendIfMDNNotReceived', 'type': 'bool'}, - } - - def __init__( - self, - *, - suspend_duplicate_message: bool, - resend_if_mdn_not_received: bool, - **kwargs - ): - """ - :keyword suspend_duplicate_message: Required. The value indicating whether to suspend duplicate - message. - :paramtype suspend_duplicate_message: bool - :keyword resend_if_mdn_not_received: Required. The value indicating whether to resend message - If MDN is not received. - :paramtype resend_if_mdn_not_received: bool - """ - super(AS2ErrorSettings, self).__init__(**kwargs) - self.suspend_duplicate_message = suspend_duplicate_message - self.resend_if_mdn_not_received = resend_if_mdn_not_received - - -class AS2MdnSettings(msrest.serialization.Model): - """The AS2 agreement mdn settings. - - All required parameters must be populated in order to send to Azure. - - :ivar need_mdn: Required. The value indicating whether to send or request a MDN. - :vartype need_mdn: bool - :ivar sign_mdn: Required. The value indicating whether the MDN needs to be signed or not. - :vartype sign_mdn: bool - :ivar send_mdn_asynchronously: Required. The value indicating whether to send the asynchronous - MDN. - :vartype send_mdn_asynchronously: bool - :ivar receipt_delivery_url: The receipt delivery URL. - :vartype receipt_delivery_url: str - :ivar disposition_notification_to: The disposition notification to header value. - :vartype disposition_notification_to: str - :ivar sign_outbound_mdn_if_optional: Required. The value indicating whether to sign the - outbound MDN if optional. - :vartype sign_outbound_mdn_if_optional: bool - :ivar mdn_text: The MDN text. - :vartype mdn_text: str - :ivar send_inbound_mdn_to_message_box: Required. The value indicating whether to send inbound - MDN to message box. - :vartype send_inbound_mdn_to_message_box: bool - :ivar mic_hashing_algorithm: Required. The signing or hashing algorithm. Possible values - include: "NotSpecified", "None", "MD5", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :vartype mic_hashing_algorithm: str or ~azure.mgmt.logic.models.HashingAlgorithm - """ - - _validation = { - 'need_mdn': {'required': True}, - 'sign_mdn': {'required': True}, - 'send_mdn_asynchronously': {'required': True}, - 'sign_outbound_mdn_if_optional': {'required': True}, - 'send_inbound_mdn_to_message_box': {'required': True}, - 'mic_hashing_algorithm': {'required': True}, - } - - _attribute_map = { - 'need_mdn': {'key': 'needMDN', 'type': 'bool'}, - 'sign_mdn': {'key': 'signMDN', 'type': 'bool'}, - 'send_mdn_asynchronously': {'key': 'sendMDNAsynchronously', 'type': 'bool'}, - 'receipt_delivery_url': {'key': 'receiptDeliveryUrl', 'type': 'str'}, - 'disposition_notification_to': {'key': 'dispositionNotificationTo', 'type': 'str'}, - 'sign_outbound_mdn_if_optional': {'key': 'signOutboundMDNIfOptional', 'type': 'bool'}, - 'mdn_text': {'key': 'mdnText', 'type': 'str'}, - 'send_inbound_mdn_to_message_box': {'key': 'sendInboundMDNToMessageBox', 'type': 'bool'}, - 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'str'}, - } - - def __init__( - self, - *, - need_mdn: bool, - sign_mdn: bool, - send_mdn_asynchronously: bool, - sign_outbound_mdn_if_optional: bool, - send_inbound_mdn_to_message_box: bool, - mic_hashing_algorithm: Union[str, "HashingAlgorithm"], - receipt_delivery_url: Optional[str] = None, - disposition_notification_to: Optional[str] = None, - mdn_text: Optional[str] = None, - **kwargs - ): - """ - :keyword need_mdn: Required. The value indicating whether to send or request a MDN. - :paramtype need_mdn: bool - :keyword sign_mdn: Required. The value indicating whether the MDN needs to be signed or not. - :paramtype sign_mdn: bool - :keyword send_mdn_asynchronously: Required. The value indicating whether to send the - asynchronous MDN. - :paramtype send_mdn_asynchronously: bool - :keyword receipt_delivery_url: The receipt delivery URL. - :paramtype receipt_delivery_url: str - :keyword disposition_notification_to: The disposition notification to header value. - :paramtype disposition_notification_to: str - :keyword sign_outbound_mdn_if_optional: Required. The value indicating whether to sign the - outbound MDN if optional. - :paramtype sign_outbound_mdn_if_optional: bool - :keyword mdn_text: The MDN text. - :paramtype mdn_text: str - :keyword send_inbound_mdn_to_message_box: Required. The value indicating whether to send - inbound MDN to message box. - :paramtype send_inbound_mdn_to_message_box: bool - :keyword mic_hashing_algorithm: Required. The signing or hashing algorithm. Possible values - include: "NotSpecified", "None", "MD5", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :paramtype mic_hashing_algorithm: str or ~azure.mgmt.logic.models.HashingAlgorithm - """ - super(AS2MdnSettings, self).__init__(**kwargs) - self.need_mdn = need_mdn - self.sign_mdn = sign_mdn - self.send_mdn_asynchronously = send_mdn_asynchronously - self.receipt_delivery_url = receipt_delivery_url - self.disposition_notification_to = disposition_notification_to - self.sign_outbound_mdn_if_optional = sign_outbound_mdn_if_optional - self.mdn_text = mdn_text - self.send_inbound_mdn_to_message_box = send_inbound_mdn_to_message_box - self.mic_hashing_algorithm = mic_hashing_algorithm - - -class AS2MessageConnectionSettings(msrest.serialization.Model): - """The AS2 agreement message connection settings. - - All required parameters must be populated in order to send to Azure. - - :ivar ignore_certificate_name_mismatch: Required. The value indicating whether to ignore - mismatch in certificate name. - :vartype ignore_certificate_name_mismatch: bool - :ivar support_http_status_code_continue: Required. The value indicating whether to support HTTP - status code 'CONTINUE'. - :vartype support_http_status_code_continue: bool - :ivar keep_http_connection_alive: Required. The value indicating whether to keep the connection - alive. - :vartype keep_http_connection_alive: bool - :ivar unfold_http_headers: Required. The value indicating whether to unfold the HTTP headers. - :vartype unfold_http_headers: bool - """ - - _validation = { - 'ignore_certificate_name_mismatch': {'required': True}, - 'support_http_status_code_continue': {'required': True}, - 'keep_http_connection_alive': {'required': True}, - 'unfold_http_headers': {'required': True}, - } - - _attribute_map = { - 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, - 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, - 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, - 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, - } - - def __init__( - self, - *, - ignore_certificate_name_mismatch: bool, - support_http_status_code_continue: bool, - keep_http_connection_alive: bool, - unfold_http_headers: bool, - **kwargs - ): - """ - :keyword ignore_certificate_name_mismatch: Required. The value indicating whether to ignore - mismatch in certificate name. - :paramtype ignore_certificate_name_mismatch: bool - :keyword support_http_status_code_continue: Required. The value indicating whether to support - HTTP status code 'CONTINUE'. - :paramtype support_http_status_code_continue: bool - :keyword keep_http_connection_alive: Required. The value indicating whether to keep the - connection alive. - :paramtype keep_http_connection_alive: bool - :keyword unfold_http_headers: Required. The value indicating whether to unfold the HTTP - headers. - :paramtype unfold_http_headers: bool - """ - super(AS2MessageConnectionSettings, self).__init__(**kwargs) - self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch - self.support_http_status_code_continue = support_http_status_code_continue - self.keep_http_connection_alive = keep_http_connection_alive - self.unfold_http_headers = unfold_http_headers - - -class AS2OneWayAgreement(msrest.serialization.Model): - """The integration account AS2 one-way agreement. - - All required parameters must be populated in order to send to Azure. - - :ivar sender_business_identity: Required. The sender business identity. - :vartype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :ivar receiver_business_identity: Required. The receiver business identity. - :vartype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :ivar protocol_settings: Required. The AS2 protocol settings. - :vartype protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, - } - - def __init__( - self, - *, - sender_business_identity: "BusinessIdentity", - receiver_business_identity: "BusinessIdentity", - protocol_settings: "AS2ProtocolSettings", - **kwargs - ): - """ - :keyword sender_business_identity: Required. The sender business identity. - :paramtype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :keyword receiver_business_identity: Required. The receiver business identity. - :paramtype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :keyword protocol_settings: Required. The AS2 protocol settings. - :paramtype protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings - """ - super(AS2OneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings - - -class AS2ProtocolSettings(msrest.serialization.Model): - """The AS2 agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :ivar message_connection_settings: Required. The message connection settings. - :vartype message_connection_settings: ~azure.mgmt.logic.models.AS2MessageConnectionSettings - :ivar acknowledgement_connection_settings: Required. The acknowledgement connection settings. - :vartype acknowledgement_connection_settings: - ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings - :ivar mdn_settings: Required. The MDN settings. - :vartype mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings - :ivar security_settings: Required. The security settings. - :vartype security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings - :ivar validation_settings: Required. The validation settings. - :vartype validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings - :ivar envelope_settings: Required. The envelope settings. - :vartype envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings - :ivar error_settings: Required. The error settings. - :vartype error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings - """ - - _validation = { - 'message_connection_settings': {'required': True}, - 'acknowledgement_connection_settings': {'required': True}, - 'mdn_settings': {'required': True}, - 'security_settings': {'required': True}, - 'validation_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'error_settings': {'required': True}, - } - - _attribute_map = { - 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'AS2MessageConnectionSettings'}, - 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'AS2AcknowledgementConnectionSettings'}, - 'mdn_settings': {'key': 'mdnSettings', 'type': 'AS2MdnSettings'}, - 'security_settings': {'key': 'securitySettings', 'type': 'AS2SecuritySettings'}, - 'validation_settings': {'key': 'validationSettings', 'type': 'AS2ValidationSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'AS2EnvelopeSettings'}, - 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, - } - - def __init__( - self, - *, - message_connection_settings: "AS2MessageConnectionSettings", - acknowledgement_connection_settings: "AS2AcknowledgementConnectionSettings", - mdn_settings: "AS2MdnSettings", - security_settings: "AS2SecuritySettings", - validation_settings: "AS2ValidationSettings", - envelope_settings: "AS2EnvelopeSettings", - error_settings: "AS2ErrorSettings", - **kwargs - ): - """ - :keyword message_connection_settings: Required. The message connection settings. - :paramtype message_connection_settings: ~azure.mgmt.logic.models.AS2MessageConnectionSettings - :keyword acknowledgement_connection_settings: Required. The acknowledgement connection - settings. - :paramtype acknowledgement_connection_settings: - ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings - :keyword mdn_settings: Required. The MDN settings. - :paramtype mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings - :keyword security_settings: Required. The security settings. - :paramtype security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings - :keyword validation_settings: Required. The validation settings. - :paramtype validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings - :keyword envelope_settings: Required. The envelope settings. - :paramtype envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings - :keyword error_settings: Required. The error settings. - :paramtype error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings - """ - super(AS2ProtocolSettings, self).__init__(**kwargs) - self.message_connection_settings = message_connection_settings - self.acknowledgement_connection_settings = acknowledgement_connection_settings - self.mdn_settings = mdn_settings - self.security_settings = security_settings - self.validation_settings = validation_settings - self.envelope_settings = envelope_settings - self.error_settings = error_settings - - -class AS2SecuritySettings(msrest.serialization.Model): - """The AS2 agreement security settings. - - All required parameters must be populated in order to send to Azure. - - :ivar override_group_signing_certificate: Required. The value indicating whether to send or - request a MDN. - :vartype override_group_signing_certificate: bool - :ivar signing_certificate_name: The name of the signing certificate. - :vartype signing_certificate_name: str - :ivar encryption_certificate_name: The name of the encryption certificate. - :vartype encryption_certificate_name: str - :ivar enable_nrr_for_inbound_encoded_messages: Required. The value indicating whether to enable - NRR for inbound encoded messages. - :vartype enable_nrr_for_inbound_encoded_messages: bool - :ivar enable_nrr_for_inbound_decoded_messages: Required. The value indicating whether to enable - NRR for inbound decoded messages. - :vartype enable_nrr_for_inbound_decoded_messages: bool - :ivar enable_nrr_for_outbound_mdn: Required. The value indicating whether to enable NRR for - outbound MDN. - :vartype enable_nrr_for_outbound_mdn: bool - :ivar enable_nrr_for_outbound_encoded_messages: Required. The value indicating whether to - enable NRR for outbound encoded messages. - :vartype enable_nrr_for_outbound_encoded_messages: bool - :ivar enable_nrr_for_outbound_decoded_messages: Required. The value indicating whether to - enable NRR for outbound decoded messages. - :vartype enable_nrr_for_outbound_decoded_messages: bool - :ivar enable_nrr_for_inbound_mdn: Required. The value indicating whether to enable NRR for - inbound MDN. - :vartype enable_nrr_for_inbound_mdn: bool - :ivar sha2_algorithm_format: The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - ShaHyphenHashSize, Sha2UnderscoreHashSize. - :vartype sha2_algorithm_format: str - """ - - _validation = { - 'override_group_signing_certificate': {'required': True}, - 'enable_nrr_for_inbound_encoded_messages': {'required': True}, - 'enable_nrr_for_inbound_decoded_messages': {'required': True}, - 'enable_nrr_for_outbound_mdn': {'required': True}, - 'enable_nrr_for_outbound_encoded_messages': {'required': True}, - 'enable_nrr_for_outbound_decoded_messages': {'required': True}, - 'enable_nrr_for_inbound_mdn': {'required': True}, - } - - _attribute_map = { - 'override_group_signing_certificate': {'key': 'overrideGroupSigningCertificate', 'type': 'bool'}, - 'signing_certificate_name': {'key': 'signingCertificateName', 'type': 'str'}, - 'encryption_certificate_name': {'key': 'encryptionCertificateName', 'type': 'str'}, - 'enable_nrr_for_inbound_encoded_messages': {'key': 'enableNRRForInboundEncodedMessages', 'type': 'bool'}, - 'enable_nrr_for_inbound_decoded_messages': {'key': 'enableNRRForInboundDecodedMessages', 'type': 'bool'}, - 'enable_nrr_for_outbound_mdn': {'key': 'enableNRRForOutboundMDN', 'type': 'bool'}, - 'enable_nrr_for_outbound_encoded_messages': {'key': 'enableNRRForOutboundEncodedMessages', 'type': 'bool'}, - 'enable_nrr_for_outbound_decoded_messages': {'key': 'enableNRRForOutboundDecodedMessages', 'type': 'bool'}, - 'enable_nrr_for_inbound_mdn': {'key': 'enableNRRForInboundMDN', 'type': 'bool'}, - 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, - } - - def __init__( - self, - *, - override_group_signing_certificate: bool, - enable_nrr_for_inbound_encoded_messages: bool, - enable_nrr_for_inbound_decoded_messages: bool, - enable_nrr_for_outbound_mdn: bool, - enable_nrr_for_outbound_encoded_messages: bool, - enable_nrr_for_outbound_decoded_messages: bool, - enable_nrr_for_inbound_mdn: bool, - signing_certificate_name: Optional[str] = None, - encryption_certificate_name: Optional[str] = None, - sha2_algorithm_format: Optional[str] = None, - **kwargs - ): - """ - :keyword override_group_signing_certificate: Required. The value indicating whether to send or - request a MDN. - :paramtype override_group_signing_certificate: bool - :keyword signing_certificate_name: The name of the signing certificate. - :paramtype signing_certificate_name: str - :keyword encryption_certificate_name: The name of the encryption certificate. - :paramtype encryption_certificate_name: str - :keyword enable_nrr_for_inbound_encoded_messages: Required. The value indicating whether to - enable NRR for inbound encoded messages. - :paramtype enable_nrr_for_inbound_encoded_messages: bool - :keyword enable_nrr_for_inbound_decoded_messages: Required. The value indicating whether to - enable NRR for inbound decoded messages. - :paramtype enable_nrr_for_inbound_decoded_messages: bool - :keyword enable_nrr_for_outbound_mdn: Required. The value indicating whether to enable NRR for - outbound MDN. - :paramtype enable_nrr_for_outbound_mdn: bool - :keyword enable_nrr_for_outbound_encoded_messages: Required. The value indicating whether to - enable NRR for outbound encoded messages. - :paramtype enable_nrr_for_outbound_encoded_messages: bool - :keyword enable_nrr_for_outbound_decoded_messages: Required. The value indicating whether to - enable NRR for outbound decoded messages. - :paramtype enable_nrr_for_outbound_decoded_messages: bool - :keyword enable_nrr_for_inbound_mdn: Required. The value indicating whether to enable NRR for - inbound MDN. - :paramtype enable_nrr_for_inbound_mdn: bool - :keyword sha2_algorithm_format: The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - ShaHyphenHashSize, Sha2UnderscoreHashSize. - :paramtype sha2_algorithm_format: str - """ - super(AS2SecuritySettings, self).__init__(**kwargs) - self.override_group_signing_certificate = override_group_signing_certificate - self.signing_certificate_name = signing_certificate_name - self.encryption_certificate_name = encryption_certificate_name - self.enable_nrr_for_inbound_encoded_messages = enable_nrr_for_inbound_encoded_messages - self.enable_nrr_for_inbound_decoded_messages = enable_nrr_for_inbound_decoded_messages - self.enable_nrr_for_outbound_mdn = enable_nrr_for_outbound_mdn - self.enable_nrr_for_outbound_encoded_messages = enable_nrr_for_outbound_encoded_messages - self.enable_nrr_for_outbound_decoded_messages = enable_nrr_for_outbound_decoded_messages - self.enable_nrr_for_inbound_mdn = enable_nrr_for_inbound_mdn - self.sha2_algorithm_format = sha2_algorithm_format - - -class AS2ValidationSettings(msrest.serialization.Model): - """The AS2 agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :ivar override_message_properties: Required. The value indicating whether to override incoming - message properties with those in agreement. - :vartype override_message_properties: bool - :ivar encrypt_message: Required. The value indicating whether the message has to be encrypted. - :vartype encrypt_message: bool - :ivar sign_message: Required. The value indicating whether the message has to be signed. - :vartype sign_message: bool - :ivar compress_message: Required. The value indicating whether the message has to be - compressed. - :vartype compress_message: bool - :ivar check_duplicate_message: Required. The value indicating whether to check for duplicate - message. - :vartype check_duplicate_message: bool - :ivar interchange_duplicates_validity_days: Required. The number of days to look back for - duplicate interchange. - :vartype interchange_duplicates_validity_days: int - :ivar check_certificate_revocation_list_on_send: Required. The value indicating whether to - check for certificate revocation list on send. - :vartype check_certificate_revocation_list_on_send: bool - :ivar check_certificate_revocation_list_on_receive: Required. The value indicating whether to - check for certificate revocation list on receive. - :vartype check_certificate_revocation_list_on_receive: bool - :ivar encryption_algorithm: Required. The encryption algorithm. Possible values include: - "NotSpecified", "None", "DES3", "RC2", "AES128", "AES192", "AES256". - :vartype encryption_algorithm: str or ~azure.mgmt.logic.models.EncryptionAlgorithm - :ivar signing_algorithm: The signing algorithm. Possible values include: "NotSpecified", - "Default", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :vartype signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm - """ - - _validation = { - 'override_message_properties': {'required': True}, - 'encrypt_message': {'required': True}, - 'sign_message': {'required': True}, - 'compress_message': {'required': True}, - 'check_duplicate_message': {'required': True}, - 'interchange_duplicates_validity_days': {'required': True}, - 'check_certificate_revocation_list_on_send': {'required': True}, - 'check_certificate_revocation_list_on_receive': {'required': True}, - 'encryption_algorithm': {'required': True}, - } - - _attribute_map = { - 'override_message_properties': {'key': 'overrideMessageProperties', 'type': 'bool'}, - 'encrypt_message': {'key': 'encryptMessage', 'type': 'bool'}, - 'sign_message': {'key': 'signMessage', 'type': 'bool'}, - 'compress_message': {'key': 'compressMessage', 'type': 'bool'}, - 'check_duplicate_message': {'key': 'checkDuplicateMessage', 'type': 'bool'}, - 'interchange_duplicates_validity_days': {'key': 'interchangeDuplicatesValidityDays', 'type': 'int'}, - 'check_certificate_revocation_list_on_send': {'key': 'checkCertificateRevocationListOnSend', 'type': 'bool'}, - 'check_certificate_revocation_list_on_receive': {'key': 'checkCertificateRevocationListOnReceive', 'type': 'bool'}, - 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, - 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, - } - - def __init__( - self, - *, - override_message_properties: bool, - encrypt_message: bool, - sign_message: bool, - compress_message: bool, - check_duplicate_message: bool, - interchange_duplicates_validity_days: int, - check_certificate_revocation_list_on_send: bool, - check_certificate_revocation_list_on_receive: bool, - encryption_algorithm: Union[str, "EncryptionAlgorithm"], - signing_algorithm: Optional[Union[str, "SigningAlgorithm"]] = None, - **kwargs - ): - """ - :keyword override_message_properties: Required. The value indicating whether to override - incoming message properties with those in agreement. - :paramtype override_message_properties: bool - :keyword encrypt_message: Required. The value indicating whether the message has to be - encrypted. - :paramtype encrypt_message: bool - :keyword sign_message: Required. The value indicating whether the message has to be signed. - :paramtype sign_message: bool - :keyword compress_message: Required. The value indicating whether the message has to be - compressed. - :paramtype compress_message: bool - :keyword check_duplicate_message: Required. The value indicating whether to check for duplicate - message. - :paramtype check_duplicate_message: bool - :keyword interchange_duplicates_validity_days: Required. The number of days to look back for - duplicate interchange. - :paramtype interchange_duplicates_validity_days: int - :keyword check_certificate_revocation_list_on_send: Required. The value indicating whether to - check for certificate revocation list on send. - :paramtype check_certificate_revocation_list_on_send: bool - :keyword check_certificate_revocation_list_on_receive: Required. The value indicating whether - to check for certificate revocation list on receive. - :paramtype check_certificate_revocation_list_on_receive: bool - :keyword encryption_algorithm: Required. The encryption algorithm. Possible values include: - "NotSpecified", "None", "DES3", "RC2", "AES128", "AES192", "AES256". - :paramtype encryption_algorithm: str or ~azure.mgmt.logic.models.EncryptionAlgorithm - :keyword signing_algorithm: The signing algorithm. Possible values include: "NotSpecified", - "Default", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :paramtype signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm - """ - super(AS2ValidationSettings, self).__init__(**kwargs) - self.override_message_properties = override_message_properties - self.encrypt_message = encrypt_message - self.sign_message = sign_message - self.compress_message = compress_message - self.check_duplicate_message = check_duplicate_message - self.interchange_duplicates_validity_days = interchange_duplicates_validity_days - self.check_certificate_revocation_list_on_send = check_certificate_revocation_list_on_send - self.check_certificate_revocation_list_on_receive = check_certificate_revocation_list_on_receive - self.encryption_algorithm = encryption_algorithm - self.signing_algorithm = signing_algorithm - - -class AssemblyCollection(msrest.serialization.Model): - """A collection of assembly definitions. - - :ivar value: - :vartype value: list[~azure.mgmt.logic.models.AssemblyDefinition] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[AssemblyDefinition]'}, - } - - def __init__( - self, - *, - value: Optional[List["AssemblyDefinition"]] = None, - **kwargs - ): - """ - :keyword value: - :paramtype value: list[~azure.mgmt.logic.models.AssemblyDefinition] - """ - super(AssemblyCollection, self).__init__(**kwargs) - self.value = value - - -class AssemblyDefinition(Resource): - """The assembly definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar properties: Required. The assembly properties. - :vartype properties: ~azure.mgmt.logic.models.AssemblyProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, - } - - def __init__( - self, - *, - properties: "AssemblyProperties", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword properties: Required. The assembly properties. - :paramtype properties: ~azure.mgmt.logic.models.AssemblyProperties - """ - super(AssemblyDefinition, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties - - -class AssemblyProperties(ArtifactContentPropertiesDefinition): - """The assembly properties definition. - - All required parameters must be populated in order to send to Azure. - - :ivar created_time: The artifact creation time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The artifact changed time. - :vartype changed_time: ~datetime.datetime - :ivar metadata: Anything. - :vartype metadata: any - :ivar content: Anything. - :vartype content: any - :ivar content_type: The content type. - :vartype content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - :ivar assembly_name: Required. The assembly name. - :vartype assembly_name: str - :ivar assembly_version: The assembly version. - :vartype assembly_version: str - :ivar assembly_culture: The assembly culture. - :vartype assembly_culture: str - :ivar assembly_public_key_token: The assembly public key token. - :vartype assembly_public_key_token: str - """ - - _validation = { - 'assembly_name': {'required': True}, - } - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'content': {'key': 'content', 'type': 'object'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, - 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, - 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, - 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, - 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, - } - - def __init__( - self, - *, - assembly_name: str, - created_time: Optional[datetime.datetime] = None, - changed_time: Optional[datetime.datetime] = None, - metadata: Optional[Any] = None, - content: Optional[Any] = None, - content_type: Optional[str] = None, - content_link: Optional["ContentLink"] = None, - assembly_version: Optional[str] = None, - assembly_culture: Optional[str] = None, - assembly_public_key_token: Optional[str] = None, - **kwargs - ): - """ - :keyword created_time: The artifact creation time. - :paramtype created_time: ~datetime.datetime - :keyword changed_time: The artifact changed time. - :paramtype changed_time: ~datetime.datetime - :keyword metadata: Anything. - :paramtype metadata: any - :keyword content: Anything. - :paramtype content: any - :keyword content_type: The content type. - :paramtype content_type: str - :keyword content_link: The content link. - :paramtype content_link: ~azure.mgmt.logic.models.ContentLink - :keyword assembly_name: Required. The assembly name. - :paramtype assembly_name: str - :keyword assembly_version: The assembly version. - :paramtype assembly_version: str - :keyword assembly_culture: The assembly culture. - :paramtype assembly_culture: str - :keyword assembly_public_key_token: The assembly public key token. - :paramtype assembly_public_key_token: str - """ - super(AssemblyProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, content=content, content_type=content_type, content_link=content_link, **kwargs) - self.assembly_name = assembly_name - self.assembly_version = assembly_version - self.assembly_culture = assembly_culture - self.assembly_public_key_token = assembly_public_key_token - - -class ErrorInfo(msrest.serialization.Model): - """The error info. - - All required parameters must be populated in order to send to Azure. - - :ivar code: Required. The error code. - :vartype code: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__( - self, - *, - code: str, - **kwargs - ): - """ - :keyword code: Required. The error code. - :paramtype code: str - """ - super(ErrorInfo, self).__init__(**kwargs) - self.code = code - - -class AzureResourceErrorInfo(ErrorInfo): - """The azure resource error info. - - All required parameters must be populated in order to send to Azure. - - :ivar code: Required. The error code. - :vartype code: str - :ivar message: Required. The error message. - :vartype message: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, - } - - def __init__( - self, - *, - code: str, - message: str, - details: Optional[List["AzureResourceErrorInfo"]] = None, - **kwargs - ): - """ - :keyword code: Required. The error code. - :paramtype code: str - :keyword message: Required. The error message. - :paramtype message: str - :keyword details: The error details. - :paramtype details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] - """ - super(AzureResourceErrorInfo, self).__init__(code=code, **kwargs) - self.message = message - self.details = details - - -class B2BPartnerContent(msrest.serialization.Model): - """The B2B partner content. - - :ivar business_identities: The list of partner business identities. - :vartype 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 - ): - """ - :keyword business_identities: The list of partner business identities. - :paramtype business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] - """ - super(B2BPartnerContent, self).__init__(**kwargs) - self.business_identities = business_identities - - -class BatchConfiguration(Resource): - """The batch configuration resource definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar properties: Required. The batch configuration properties. - :vartype properties: ~azure.mgmt.logic.models.BatchConfigurationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, - } - - def __init__( - self, - *, - properties: "BatchConfigurationProperties", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword properties: Required. The batch configuration properties. - :paramtype properties: ~azure.mgmt.logic.models.BatchConfigurationProperties - """ - super(BatchConfiguration, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties - - -class BatchConfigurationCollection(msrest.serialization.Model): - """A collection of batch configurations. - - :ivar value: - :vartype value: list[~azure.mgmt.logic.models.BatchConfiguration] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BatchConfiguration]'}, - } - - def __init__( - self, - *, - value: Optional[List["BatchConfiguration"]] = None, - **kwargs - ): - """ - :keyword value: - :paramtype value: list[~azure.mgmt.logic.models.BatchConfiguration] - """ - super(BatchConfigurationCollection, self).__init__(**kwargs) - self.value = value - - -class BatchConfigurationProperties(ArtifactProperties): - """The batch configuration properties definition. - - All required parameters must be populated in order to send to Azure. - - :ivar created_time: The artifact creation time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The artifact changed time. - :vartype changed_time: ~datetime.datetime - :ivar metadata: Anything. - :vartype metadata: any - :ivar batch_group_name: Required. The name of the batch group. - :vartype batch_group_name: str - :ivar release_criteria: Required. The batch release criteria. - :vartype release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria - """ - - _validation = { - 'batch_group_name': {'required': True}, - 'release_criteria': {'required': True}, - } - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, - 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, - } - - def __init__( - self, - *, - batch_group_name: str, - release_criteria: "BatchReleaseCriteria", - created_time: Optional[datetime.datetime] = None, - changed_time: Optional[datetime.datetime] = None, - metadata: Optional[Any] = None, - **kwargs - ): - """ - :keyword created_time: The artifact creation time. - :paramtype created_time: ~datetime.datetime - :keyword changed_time: The artifact changed time. - :paramtype changed_time: ~datetime.datetime - :keyword metadata: Anything. - :paramtype metadata: any - :keyword batch_group_name: Required. The name of the batch group. - :paramtype batch_group_name: str - :keyword release_criteria: Required. The batch release criteria. - :paramtype release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria - """ - super(BatchConfigurationProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) - self.batch_group_name = batch_group_name - self.release_criteria = release_criteria - - -class BatchReleaseCriteria(msrest.serialization.Model): - """The batch release criteria. - - :ivar message_count: The message count. - :vartype message_count: int - :ivar batch_size: The batch size in bytes. - :vartype batch_size: int - :ivar recurrence: The recurrence. - :vartype 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, - *, - message_count: Optional[int] = None, - batch_size: Optional[int] = None, - recurrence: Optional["WorkflowTriggerRecurrence"] = None, - **kwargs - ): - """ - :keyword message_count: The message count. - :paramtype message_count: int - :keyword batch_size: The batch size in bytes. - :paramtype batch_size: int - :keyword recurrence: The recurrence. - :paramtype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence - """ - super(BatchReleaseCriteria, self).__init__(**kwargs) - self.message_count = message_count - self.batch_size = batch_size - self.recurrence = recurrence - - -class BusinessIdentity(msrest.serialization.Model): - """The integration account partner's business identity. - - All required parameters must be populated in order to send to Azure. - - :ivar qualifier: Required. The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32. - :vartype qualifier: str - :ivar value: Required. The user defined business identity value. - :vartype value: str - """ - - _validation = { - 'qualifier': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'qualifier': {'key': 'qualifier', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - qualifier: str, - value: str, - **kwargs - ): - """ - :keyword qualifier: Required. The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, - 32. - :paramtype qualifier: str - :keyword value: Required. The user defined business identity value. - :paramtype value: str - """ - super(BusinessIdentity, self).__init__(**kwargs) - self.qualifier = qualifier - self.value = value - - -class CallbackUrl(msrest.serialization.Model): - """The callback url. - - :ivar value: The URL value. - :vartype value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The URL value. - :paramtype value: str - """ - super(CallbackUrl, self).__init__(**kwargs) - self.value = value - - -class ContentHash(msrest.serialization.Model): - """The content hash. - - :ivar algorithm: The algorithm of the content hash. - :vartype algorithm: str - :ivar value: The value of the content hash. - :vartype value: str - """ - - _attribute_map = { - 'algorithm': {'key': 'algorithm', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - algorithm: Optional[str] = None, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword algorithm: The algorithm of the content hash. - :paramtype algorithm: str - :keyword value: The value of the content hash. - :paramtype value: str - """ - super(ContentHash, self).__init__(**kwargs) - self.algorithm = algorithm - self.value = value - - -class ContentLink(msrest.serialization.Model): - """The content link. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar uri: The content link URI. - :vartype uri: str - :ivar content_version: The content version. - :vartype content_version: str - :ivar content_size: The content size. - :vartype content_size: long - :ivar content_hash: The content hash. - :vartype content_hash: ~azure.mgmt.logic.models.ContentHash - :ivar metadata: The metadata. - :vartype metadata: any - """ - - _validation = { - 'content_version': {'readonly': True}, - 'content_size': {'readonly': True}, - 'content_hash': {'readonly': True}, - 'metadata': {'readonly': True}, - } - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'content_size': {'key': 'contentSize', 'type': 'long'}, - 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - } - - def __init__( - self, - *, - uri: Optional[str] = None, - **kwargs - ): - """ - :keyword uri: The content link URI. - :paramtype uri: str - """ - super(ContentLink, self).__init__(**kwargs) - self.uri = uri - self.content_version = None - self.content_size = None - self.content_hash = None - self.metadata = None - - -class Correlation(msrest.serialization.Model): - """The correlation property. - - :ivar client_tracking_id: The client tracking id. - :vartype client_tracking_id: str - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - } - - def __init__( - self, - *, - client_tracking_id: Optional[str] = None, - **kwargs - ): - """ - :keyword client_tracking_id: The client tracking id. - :paramtype client_tracking_id: str - """ - super(Correlation, self).__init__(**kwargs) - self.client_tracking_id = client_tracking_id - - -class EdifactAcknowledgementSettings(msrest.serialization.Model): - """The Edifact agreement acknowledgement settings. - - All required parameters must be populated in order to send to Azure. - - :ivar need_technical_acknowledgement: Required. The value indicating whether technical - acknowledgement is needed. - :vartype need_technical_acknowledgement: bool - :ivar batch_technical_acknowledgements: Required. The value indicating whether to batch the - technical acknowledgements. - :vartype batch_technical_acknowledgements: bool - :ivar need_functional_acknowledgement: Required. The value indicating whether functional - acknowledgement is needed. - :vartype need_functional_acknowledgement: bool - :ivar batch_functional_acknowledgements: Required. The value indicating whether to batch - functional acknowledgements. - :vartype batch_functional_acknowledgements: bool - :ivar need_loop_for_valid_messages: Required. The value indicating whether a loop is needed for - valid messages. - :vartype need_loop_for_valid_messages: bool - :ivar send_synchronous_acknowledgement: Required. The value indicating whether to send - synchronous acknowledgement. - :vartype send_synchronous_acknowledgement: bool - :ivar acknowledgement_control_number_prefix: The acknowledgement control number prefix. - :vartype acknowledgement_control_number_prefix: str - :ivar acknowledgement_control_number_suffix: The acknowledgement control number suffix. - :vartype acknowledgement_control_number_suffix: str - :ivar acknowledgement_control_number_lower_bound: Required. The acknowledgement control number - lower bound. - :vartype acknowledgement_control_number_lower_bound: int - :ivar acknowledgement_control_number_upper_bound: Required. The acknowledgement control number - upper bound. - :vartype acknowledgement_control_number_upper_bound: int - :ivar rollover_acknowledgement_control_number: Required. The value indicating whether to - rollover acknowledgement control number. - :vartype rollover_acknowledgement_control_number: bool - """ - - _validation = { - 'need_technical_acknowledgement': {'required': True}, - 'batch_technical_acknowledgements': {'required': True}, - 'need_functional_acknowledgement': {'required': True}, - 'batch_functional_acknowledgements': {'required': True}, - 'need_loop_for_valid_messages': {'required': True}, - 'send_synchronous_acknowledgement': {'required': True}, - 'acknowledgement_control_number_lower_bound': {'required': True}, - 'acknowledgement_control_number_upper_bound': {'required': True}, - 'rollover_acknowledgement_control_number': {'required': True}, - } - - _attribute_map = { - 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, - 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, - 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, - 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, - 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, - 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, - 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, - 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, - 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, - 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, - 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, - } - - def __init__( - self, - *, - need_technical_acknowledgement: bool, - batch_technical_acknowledgements: bool, - need_functional_acknowledgement: bool, - batch_functional_acknowledgements: bool, - need_loop_for_valid_messages: bool, - send_synchronous_acknowledgement: bool, - acknowledgement_control_number_lower_bound: int, - acknowledgement_control_number_upper_bound: int, - rollover_acknowledgement_control_number: bool, - acknowledgement_control_number_prefix: Optional[str] = None, - acknowledgement_control_number_suffix: Optional[str] = None, - **kwargs - ): - """ - :keyword need_technical_acknowledgement: Required. The value indicating whether technical - acknowledgement is needed. - :paramtype need_technical_acknowledgement: bool - :keyword batch_technical_acknowledgements: Required. The value indicating whether to batch the - technical acknowledgements. - :paramtype batch_technical_acknowledgements: bool - :keyword need_functional_acknowledgement: Required. The value indicating whether functional - acknowledgement is needed. - :paramtype need_functional_acknowledgement: bool - :keyword batch_functional_acknowledgements: Required. The value indicating whether to batch - functional acknowledgements. - :paramtype batch_functional_acknowledgements: bool - :keyword need_loop_for_valid_messages: Required. The value indicating whether a loop is needed - for valid messages. - :paramtype need_loop_for_valid_messages: bool - :keyword send_synchronous_acknowledgement: Required. The value indicating whether to send - synchronous acknowledgement. - :paramtype send_synchronous_acknowledgement: bool - :keyword acknowledgement_control_number_prefix: The acknowledgement control number prefix. - :paramtype acknowledgement_control_number_prefix: str - :keyword acknowledgement_control_number_suffix: The acknowledgement control number suffix. - :paramtype acknowledgement_control_number_suffix: str - :keyword acknowledgement_control_number_lower_bound: Required. The acknowledgement control - number lower bound. - :paramtype acknowledgement_control_number_lower_bound: int - :keyword acknowledgement_control_number_upper_bound: Required. The acknowledgement control - number upper bound. - :paramtype acknowledgement_control_number_upper_bound: int - :keyword rollover_acknowledgement_control_number: Required. The value indicating whether to - rollover acknowledgement control number. - :paramtype rollover_acknowledgement_control_number: bool - """ - super(EdifactAcknowledgementSettings, self).__init__(**kwargs) - self.need_technical_acknowledgement = need_technical_acknowledgement - self.batch_technical_acknowledgements = batch_technical_acknowledgements - self.need_functional_acknowledgement = need_functional_acknowledgement - self.batch_functional_acknowledgements = batch_functional_acknowledgements - self.need_loop_for_valid_messages = need_loop_for_valid_messages - self.send_synchronous_acknowledgement = send_synchronous_acknowledgement - self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix - self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix - self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound - self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound - self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number - - -class EdifactAgreementContent(msrest.serialization.Model): - """The Edifact agreement content. - - All required parameters must be populated in order to send to Azure. - - :ivar receive_agreement: Required. The EDIFACT one-way receive agreement. - :vartype receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - :ivar send_agreement: Required. The EDIFACT one-way send agreement. - :vartype send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'EdifactOneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, - } - - def __init__( - self, - *, - receive_agreement: "EdifactOneWayAgreement", - send_agreement: "EdifactOneWayAgreement", - **kwargs - ): - """ - :keyword receive_agreement: Required. The EDIFACT one-way receive agreement. - :paramtype receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - :keyword send_agreement: Required. The EDIFACT one-way send agreement. - :paramtype send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - """ - super(EdifactAgreementContent, self).__init__(**kwargs) - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement - - -class EdifactDelimiterOverride(msrest.serialization.Model): - """The Edifact delimiter override settings. - - All required parameters must be populated in order to send to Azure. - - :ivar message_id: The message id. - :vartype message_id: str - :ivar message_version: The message version. - :vartype message_version: str - :ivar message_release: The message release. - :vartype message_release: str - :ivar data_element_separator: Required. The data element separator. - :vartype data_element_separator: int - :ivar component_separator: Required. The component separator. - :vartype component_separator: int - :ivar segment_terminator: Required. The segment terminator. - :vartype segment_terminator: int - :ivar repetition_separator: Required. The repetition separator. - :vartype repetition_separator: int - :ivar segment_terminator_suffix: Required. The segment terminator suffix. Possible values - include: "NotSpecified", "None", "CR", "LF", "CRLF". - :vartype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :ivar decimal_point_indicator: Required. The decimal point indicator. Possible values include: - "NotSpecified", "Comma", "Decimal". - :vartype decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator - :ivar release_indicator: Required. The release indicator. - :vartype release_indicator: int - :ivar message_association_assigned_code: The message association assigned code. - :vartype message_association_assigned_code: str - :ivar target_namespace: The target namespace on which this delimiter settings has to be - applied. - :vartype target_namespace: str - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'repetition_separator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - 'decimal_point_indicator': {'required': True}, - 'release_indicator': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'str'}, - 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'str'}, - 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, - 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - } - - def __init__( - self, - *, - data_element_separator: int, - component_separator: int, - segment_terminator: int, - repetition_separator: int, - segment_terminator_suffix: Union[str, "SegmentTerminatorSuffix"], - decimal_point_indicator: Union[str, "EdifactDecimalIndicator"], - release_indicator: int, - message_id: Optional[str] = None, - message_version: Optional[str] = None, - message_release: Optional[str] = None, - message_association_assigned_code: Optional[str] = None, - target_namespace: Optional[str] = None, - **kwargs - ): - """ - :keyword message_id: The message id. - :paramtype message_id: str - :keyword message_version: The message version. - :paramtype message_version: str - :keyword message_release: The message release. - :paramtype message_release: str - :keyword data_element_separator: Required. The data element separator. - :paramtype data_element_separator: int - :keyword component_separator: Required. The component separator. - :paramtype component_separator: int - :keyword segment_terminator: Required. The segment terminator. - :paramtype segment_terminator: int - :keyword repetition_separator: Required. The repetition separator. - :paramtype repetition_separator: int - :keyword segment_terminator_suffix: Required. The segment terminator suffix. Possible values - include: "NotSpecified", "None", "CR", "LF", "CRLF". - :paramtype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :keyword decimal_point_indicator: Required. The decimal point indicator. Possible values - include: "NotSpecified", "Comma", "Decimal". - :paramtype decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator - :keyword release_indicator: Required. The release indicator. - :paramtype release_indicator: int - :keyword message_association_assigned_code: The message association assigned code. - :paramtype message_association_assigned_code: str - :keyword target_namespace: The target namespace on which this delimiter settings has to be - applied. - :paramtype target_namespace: str - """ - super(EdifactDelimiterOverride, self).__init__(**kwargs) - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.repetition_separator = repetition_separator - self.segment_terminator_suffix = segment_terminator_suffix - self.decimal_point_indicator = decimal_point_indicator - self.release_indicator = release_indicator - self.message_association_assigned_code = message_association_assigned_code - self.target_namespace = target_namespace - - -class EdifactEnvelopeOverride(msrest.serialization.Model): - """The Edifact envelope override settings. - - :ivar message_id: The message id on which this envelope settings has to be applied. - :vartype message_id: str - :ivar message_version: The message version on which this envelope settings has to be applied. - :vartype message_version: str - :ivar message_release: The message release version on which this envelope settings has to be - applied. - :vartype message_release: str - :ivar message_association_assigned_code: The message association assigned code. - :vartype message_association_assigned_code: str - :ivar target_namespace: The target namespace on which this envelope settings has to be applied. - :vartype target_namespace: str - :ivar functional_group_id: The functional group id. - :vartype functional_group_id: str - :ivar sender_application_qualifier: The sender application qualifier. - :vartype sender_application_qualifier: str - :ivar sender_application_id: The sender application id. - :vartype sender_application_id: str - :ivar receiver_application_qualifier: The receiver application qualifier. - :vartype receiver_application_qualifier: str - :ivar receiver_application_id: The receiver application id. - :vartype receiver_application_id: str - :ivar controlling_agency_code: The controlling agency code. - :vartype controlling_agency_code: str - :ivar group_header_message_version: The group header message version. - :vartype group_header_message_version: str - :ivar group_header_message_release: The group header message release. - :vartype group_header_message_release: str - :ivar association_assigned_code: The association assigned code. - :vartype association_assigned_code: str - :ivar application_password: The application password. - :vartype application_password: str - """ - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_qualifier': {'key': 'receiverApplicationQualifier', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'controlling_agency_code': {'key': 'controllingAgencyCode', 'type': 'str'}, - 'group_header_message_version': {'key': 'groupHeaderMessageVersion', 'type': 'str'}, - 'group_header_message_release': {'key': 'groupHeaderMessageRelease', 'type': 'str'}, - 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, - 'application_password': {'key': 'applicationPassword', 'type': 'str'}, - } - - def __init__( - self, - *, - message_id: Optional[str] = None, - message_version: Optional[str] = None, - message_release: Optional[str] = None, - message_association_assigned_code: Optional[str] = None, - target_namespace: Optional[str] = None, - functional_group_id: Optional[str] = None, - sender_application_qualifier: Optional[str] = None, - sender_application_id: Optional[str] = None, - receiver_application_qualifier: Optional[str] = None, - receiver_application_id: Optional[str] = None, - controlling_agency_code: Optional[str] = None, - group_header_message_version: Optional[str] = None, - group_header_message_release: Optional[str] = None, - association_assigned_code: Optional[str] = None, - application_password: Optional[str] = None, - **kwargs - ): - """ - :keyword message_id: The message id on which this envelope settings has to be applied. - :paramtype message_id: str - :keyword message_version: The message version on which this envelope settings has to be - applied. - :paramtype message_version: str - :keyword message_release: The message release version on which this envelope settings has to be - applied. - :paramtype message_release: str - :keyword message_association_assigned_code: The message association assigned code. - :paramtype message_association_assigned_code: str - :keyword target_namespace: The target namespace on which this envelope settings has to be - applied. - :paramtype target_namespace: str - :keyword functional_group_id: The functional group id. - :paramtype functional_group_id: str - :keyword sender_application_qualifier: The sender application qualifier. - :paramtype sender_application_qualifier: str - :keyword sender_application_id: The sender application id. - :paramtype sender_application_id: str - :keyword receiver_application_qualifier: The receiver application qualifier. - :paramtype receiver_application_qualifier: str - :keyword receiver_application_id: The receiver application id. - :paramtype receiver_application_id: str - :keyword controlling_agency_code: The controlling agency code. - :paramtype controlling_agency_code: str - :keyword group_header_message_version: The group header message version. - :paramtype group_header_message_version: str - :keyword group_header_message_release: The group header message release. - :paramtype group_header_message_release: str - :keyword association_assigned_code: The association assigned code. - :paramtype association_assigned_code: str - :keyword application_password: The application password. - :paramtype application_password: str - """ - super(EdifactEnvelopeOverride, self).__init__(**kwargs) - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.message_association_assigned_code = message_association_assigned_code - self.target_namespace = target_namespace - self.functional_group_id = functional_group_id - self.sender_application_qualifier = sender_application_qualifier - self.sender_application_id = sender_application_id - self.receiver_application_qualifier = receiver_application_qualifier - self.receiver_application_id = receiver_application_id - self.controlling_agency_code = controlling_agency_code - self.group_header_message_version = group_header_message_version - self.group_header_message_release = group_header_message_release - self.association_assigned_code = association_assigned_code - self.application_password = application_password - - -class EdifactEnvelopeSettings(msrest.serialization.Model): - """The Edifact agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :ivar group_association_assigned_code: The group association assigned code. - :vartype group_association_assigned_code: str - :ivar communication_agreement_id: The communication agreement id. - :vartype communication_agreement_id: str - :ivar apply_delimiter_string_advice: Required. The value indicating whether to apply delimiter - string advice. - :vartype apply_delimiter_string_advice: bool - :ivar create_grouping_segments: Required. The value indicating whether to create grouping - segments. - :vartype create_grouping_segments: bool - :ivar enable_default_group_headers: Required. The value indicating whether to enable default - group headers. - :vartype enable_default_group_headers: bool - :ivar recipient_reference_password_value: The recipient reference password value. - :vartype recipient_reference_password_value: str - :ivar recipient_reference_password_qualifier: The recipient reference password qualifier. - :vartype recipient_reference_password_qualifier: str - :ivar application_reference_id: The application reference id. - :vartype application_reference_id: str - :ivar processing_priority_code: The processing priority code. - :vartype processing_priority_code: str - :ivar interchange_control_number_lower_bound: Required. The interchange control number lower - bound. - :vartype interchange_control_number_lower_bound: long - :ivar interchange_control_number_upper_bound: Required. The interchange control number upper - bound. - :vartype interchange_control_number_upper_bound: long - :ivar rollover_interchange_control_number: Required. The value indicating whether to rollover - interchange control number. - :vartype rollover_interchange_control_number: bool - :ivar interchange_control_number_prefix: The interchange control number prefix. - :vartype interchange_control_number_prefix: str - :ivar interchange_control_number_suffix: The interchange control number suffix. - :vartype interchange_control_number_suffix: str - :ivar sender_reverse_routing_address: The sender reverse routing address. - :vartype sender_reverse_routing_address: str - :ivar receiver_reverse_routing_address: The receiver reverse routing address. - :vartype receiver_reverse_routing_address: str - :ivar functional_group_id: The functional group id. - :vartype functional_group_id: str - :ivar group_controlling_agency_code: The group controlling agency code. - :vartype group_controlling_agency_code: str - :ivar group_message_version: The group message version. - :vartype group_message_version: str - :ivar group_message_release: The group message release. - :vartype group_message_release: str - :ivar group_control_number_lower_bound: Required. The group control number lower bound. - :vartype group_control_number_lower_bound: long - :ivar group_control_number_upper_bound: Required. The group control number upper bound. - :vartype group_control_number_upper_bound: long - :ivar rollover_group_control_number: Required. The value indicating whether to rollover group - control number. - :vartype rollover_group_control_number: bool - :ivar group_control_number_prefix: The group control number prefix. - :vartype group_control_number_prefix: str - :ivar group_control_number_suffix: The group control number suffix. - :vartype group_control_number_suffix: str - :ivar group_application_receiver_qualifier: The group application receiver qualifier. - :vartype group_application_receiver_qualifier: str - :ivar group_application_receiver_id: The group application receiver id. - :vartype group_application_receiver_id: str - :ivar group_application_sender_qualifier: The group application sender qualifier. - :vartype group_application_sender_qualifier: str - :ivar group_application_sender_id: The group application sender id. - :vartype group_application_sender_id: str - :ivar group_application_password: The group application password. - :vartype group_application_password: str - :ivar overwrite_existing_transaction_set_control_number: Required. The value indicating whether - to overwrite existing transaction set control number. - :vartype overwrite_existing_transaction_set_control_number: bool - :ivar transaction_set_control_number_prefix: The transaction set control number prefix. - :vartype transaction_set_control_number_prefix: str - :ivar transaction_set_control_number_suffix: The transaction set control number suffix. - :vartype transaction_set_control_number_suffix: str - :ivar transaction_set_control_number_lower_bound: Required. The transaction set control number - lower bound. - :vartype transaction_set_control_number_lower_bound: long - :ivar transaction_set_control_number_upper_bound: Required. The transaction set control number - upper bound. - :vartype transaction_set_control_number_upper_bound: long - :ivar rollover_transaction_set_control_number: Required. The value indicating whether to - rollover transaction set control number. - :vartype rollover_transaction_set_control_number: bool - :ivar is_test_interchange: Required. The value indicating whether the message is a test - interchange. - :vartype is_test_interchange: bool - :ivar sender_internal_identification: The sender internal identification. - :vartype sender_internal_identification: str - :ivar sender_internal_sub_identification: The sender internal sub identification. - :vartype sender_internal_sub_identification: str - :ivar receiver_internal_identification: The receiver internal identification. - :vartype receiver_internal_identification: str - :ivar receiver_internal_sub_identification: The receiver internal sub identification. - :vartype receiver_internal_sub_identification: str - """ - - _validation = { - 'apply_delimiter_string_advice': {'required': True}, - 'create_grouping_segments': {'required': True}, - 'enable_default_group_headers': {'required': True}, - 'interchange_control_number_lower_bound': {'required': True}, - 'interchange_control_number_upper_bound': {'required': True}, - 'rollover_interchange_control_number': {'required': True}, - 'group_control_number_lower_bound': {'required': True}, - 'group_control_number_upper_bound': {'required': True}, - 'rollover_group_control_number': {'required': True}, - 'overwrite_existing_transaction_set_control_number': {'required': True}, - 'transaction_set_control_number_lower_bound': {'required': True}, - 'transaction_set_control_number_upper_bound': {'required': True}, - 'rollover_transaction_set_control_number': {'required': True}, - 'is_test_interchange': {'required': True}, - } - - _attribute_map = { - 'group_association_assigned_code': {'key': 'groupAssociationAssignedCode', 'type': 'str'}, - 'communication_agreement_id': {'key': 'communicationAgreementId', 'type': 'str'}, - 'apply_delimiter_string_advice': {'key': 'applyDelimiterStringAdvice', 'type': 'bool'}, - 'create_grouping_segments': {'key': 'createGroupingSegments', 'type': 'bool'}, - 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, - 'recipient_reference_password_value': {'key': 'recipientReferencePasswordValue', 'type': 'str'}, - 'recipient_reference_password_qualifier': {'key': 'recipientReferencePasswordQualifier', 'type': 'str'}, - 'application_reference_id': {'key': 'applicationReferenceId', 'type': 'str'}, - 'processing_priority_code': {'key': 'processingPriorityCode', 'type': 'str'}, - 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'long'}, - 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'long'}, - 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_prefix': {'key': 'interchangeControlNumberPrefix', 'type': 'str'}, - 'interchange_control_number_suffix': {'key': 'interchangeControlNumberSuffix', 'type': 'str'}, - 'sender_reverse_routing_address': {'key': 'senderReverseRoutingAddress', 'type': 'str'}, - 'receiver_reverse_routing_address': {'key': 'receiverReverseRoutingAddress', 'type': 'str'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'group_controlling_agency_code': {'key': 'groupControllingAgencyCode', 'type': 'str'}, - 'group_message_version': {'key': 'groupMessageVersion', 'type': 'str'}, - 'group_message_release': {'key': 'groupMessageRelease', 'type': 'str'}, - 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'long'}, - 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'long'}, - 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, - 'group_control_number_prefix': {'key': 'groupControlNumberPrefix', 'type': 'str'}, - 'group_control_number_suffix': {'key': 'groupControlNumberSuffix', 'type': 'str'}, - 'group_application_receiver_qualifier': {'key': 'groupApplicationReceiverQualifier', 'type': 'str'}, - 'group_application_receiver_id': {'key': 'groupApplicationReceiverId', 'type': 'str'}, - 'group_application_sender_qualifier': {'key': 'groupApplicationSenderQualifier', 'type': 'str'}, - 'group_application_sender_id': {'key': 'groupApplicationSenderId', 'type': 'str'}, - 'group_application_password': {'key': 'groupApplicationPassword', 'type': 'str'}, - 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, - 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, - 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, - 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'long'}, - 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'long'}, - 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, - 'is_test_interchange': {'key': 'isTestInterchange', 'type': 'bool'}, - 'sender_internal_identification': {'key': 'senderInternalIdentification', 'type': 'str'}, - 'sender_internal_sub_identification': {'key': 'senderInternalSubIdentification', 'type': 'str'}, - 'receiver_internal_identification': {'key': 'receiverInternalIdentification', 'type': 'str'}, - 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, - } - - def __init__( - self, - *, - apply_delimiter_string_advice: bool, - create_grouping_segments: bool, - enable_default_group_headers: bool, - interchange_control_number_lower_bound: int, - interchange_control_number_upper_bound: int, - rollover_interchange_control_number: bool, - group_control_number_lower_bound: int, - group_control_number_upper_bound: int, - rollover_group_control_number: bool, - overwrite_existing_transaction_set_control_number: bool, - transaction_set_control_number_lower_bound: int, - transaction_set_control_number_upper_bound: int, - rollover_transaction_set_control_number: bool, - is_test_interchange: bool, - group_association_assigned_code: Optional[str] = None, - communication_agreement_id: Optional[str] = None, - recipient_reference_password_value: Optional[str] = None, - recipient_reference_password_qualifier: Optional[str] = None, - application_reference_id: Optional[str] = None, - processing_priority_code: Optional[str] = None, - interchange_control_number_prefix: Optional[str] = None, - interchange_control_number_suffix: Optional[str] = None, - sender_reverse_routing_address: Optional[str] = None, - receiver_reverse_routing_address: Optional[str] = None, - functional_group_id: Optional[str] = None, - group_controlling_agency_code: Optional[str] = None, - group_message_version: Optional[str] = None, - group_message_release: Optional[str] = None, - group_control_number_prefix: Optional[str] = None, - group_control_number_suffix: Optional[str] = None, - group_application_receiver_qualifier: Optional[str] = None, - group_application_receiver_id: Optional[str] = None, - group_application_sender_qualifier: Optional[str] = None, - group_application_sender_id: Optional[str] = None, - group_application_password: Optional[str] = None, - transaction_set_control_number_prefix: Optional[str] = None, - transaction_set_control_number_suffix: Optional[str] = None, - sender_internal_identification: Optional[str] = None, - sender_internal_sub_identification: Optional[str] = None, - receiver_internal_identification: Optional[str] = None, - receiver_internal_sub_identification: Optional[str] = None, - **kwargs - ): - """ - :keyword group_association_assigned_code: The group association assigned code. - :paramtype group_association_assigned_code: str - :keyword communication_agreement_id: The communication agreement id. - :paramtype communication_agreement_id: str - :keyword apply_delimiter_string_advice: Required. The value indicating whether to apply - delimiter string advice. - :paramtype apply_delimiter_string_advice: bool - :keyword create_grouping_segments: Required. The value indicating whether to create grouping - segments. - :paramtype create_grouping_segments: bool - :keyword enable_default_group_headers: Required. The value indicating whether to enable default - group headers. - :paramtype enable_default_group_headers: bool - :keyword recipient_reference_password_value: The recipient reference password value. - :paramtype recipient_reference_password_value: str - :keyword recipient_reference_password_qualifier: The recipient reference password qualifier. - :paramtype recipient_reference_password_qualifier: str - :keyword application_reference_id: The application reference id. - :paramtype application_reference_id: str - :keyword processing_priority_code: The processing priority code. - :paramtype processing_priority_code: str - :keyword interchange_control_number_lower_bound: Required. The interchange control number lower - bound. - :paramtype interchange_control_number_lower_bound: long - :keyword interchange_control_number_upper_bound: Required. The interchange control number upper - bound. - :paramtype interchange_control_number_upper_bound: long - :keyword rollover_interchange_control_number: Required. The value indicating whether to - rollover interchange control number. - :paramtype rollover_interchange_control_number: bool - :keyword interchange_control_number_prefix: The interchange control number prefix. - :paramtype interchange_control_number_prefix: str - :keyword interchange_control_number_suffix: The interchange control number suffix. - :paramtype interchange_control_number_suffix: str - :keyword sender_reverse_routing_address: The sender reverse routing address. - :paramtype sender_reverse_routing_address: str - :keyword receiver_reverse_routing_address: The receiver reverse routing address. - :paramtype receiver_reverse_routing_address: str - :keyword functional_group_id: The functional group id. - :paramtype functional_group_id: str - :keyword group_controlling_agency_code: The group controlling agency code. - :paramtype group_controlling_agency_code: str - :keyword group_message_version: The group message version. - :paramtype group_message_version: str - :keyword group_message_release: The group message release. - :paramtype group_message_release: str - :keyword group_control_number_lower_bound: Required. The group control number lower bound. - :paramtype group_control_number_lower_bound: long - :keyword group_control_number_upper_bound: Required. The group control number upper bound. - :paramtype group_control_number_upper_bound: long - :keyword rollover_group_control_number: Required. The value indicating whether to rollover - group control number. - :paramtype rollover_group_control_number: bool - :keyword group_control_number_prefix: The group control number prefix. - :paramtype group_control_number_prefix: str - :keyword group_control_number_suffix: The group control number suffix. - :paramtype group_control_number_suffix: str - :keyword group_application_receiver_qualifier: The group application receiver qualifier. - :paramtype group_application_receiver_qualifier: str - :keyword group_application_receiver_id: The group application receiver id. - :paramtype group_application_receiver_id: str - :keyword group_application_sender_qualifier: The group application sender qualifier. - :paramtype group_application_sender_qualifier: str - :keyword group_application_sender_id: The group application sender id. - :paramtype group_application_sender_id: str - :keyword group_application_password: The group application password. - :paramtype group_application_password: str - :keyword overwrite_existing_transaction_set_control_number: Required. The value indicating - whether to overwrite existing transaction set control number. - :paramtype overwrite_existing_transaction_set_control_number: bool - :keyword transaction_set_control_number_prefix: The transaction set control number prefix. - :paramtype transaction_set_control_number_prefix: str - :keyword transaction_set_control_number_suffix: The transaction set control number suffix. - :paramtype transaction_set_control_number_suffix: str - :keyword transaction_set_control_number_lower_bound: Required. The transaction set control - number lower bound. - :paramtype transaction_set_control_number_lower_bound: long - :keyword transaction_set_control_number_upper_bound: Required. The transaction set control - number upper bound. - :paramtype transaction_set_control_number_upper_bound: long - :keyword rollover_transaction_set_control_number: Required. The value indicating whether to - rollover transaction set control number. - :paramtype rollover_transaction_set_control_number: bool - :keyword is_test_interchange: Required. The value indicating whether the message is a test - interchange. - :paramtype is_test_interchange: bool - :keyword sender_internal_identification: The sender internal identification. - :paramtype sender_internal_identification: str - :keyword sender_internal_sub_identification: The sender internal sub identification. - :paramtype sender_internal_sub_identification: str - :keyword receiver_internal_identification: The receiver internal identification. - :paramtype receiver_internal_identification: str - :keyword receiver_internal_sub_identification: The receiver internal sub identification. - :paramtype receiver_internal_sub_identification: str - """ - super(EdifactEnvelopeSettings, self).__init__(**kwargs) - self.group_association_assigned_code = group_association_assigned_code - self.communication_agreement_id = communication_agreement_id - self.apply_delimiter_string_advice = apply_delimiter_string_advice - self.create_grouping_segments = create_grouping_segments - self.enable_default_group_headers = enable_default_group_headers - self.recipient_reference_password_value = recipient_reference_password_value - self.recipient_reference_password_qualifier = recipient_reference_password_qualifier - self.application_reference_id = application_reference_id - self.processing_priority_code = processing_priority_code - self.interchange_control_number_lower_bound = interchange_control_number_lower_bound - self.interchange_control_number_upper_bound = interchange_control_number_upper_bound - self.rollover_interchange_control_number = rollover_interchange_control_number - self.interchange_control_number_prefix = interchange_control_number_prefix - self.interchange_control_number_suffix = interchange_control_number_suffix - self.sender_reverse_routing_address = sender_reverse_routing_address - self.receiver_reverse_routing_address = receiver_reverse_routing_address - self.functional_group_id = functional_group_id - self.group_controlling_agency_code = group_controlling_agency_code - self.group_message_version = group_message_version - self.group_message_release = group_message_release - self.group_control_number_lower_bound = group_control_number_lower_bound - self.group_control_number_upper_bound = group_control_number_upper_bound - self.rollover_group_control_number = rollover_group_control_number - self.group_control_number_prefix = group_control_number_prefix - self.group_control_number_suffix = group_control_number_suffix - self.group_application_receiver_qualifier = group_application_receiver_qualifier - self.group_application_receiver_id = group_application_receiver_id - self.group_application_sender_qualifier = group_application_sender_qualifier - self.group_application_sender_id = group_application_sender_id - self.group_application_password = group_application_password - self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number - self.transaction_set_control_number_prefix = transaction_set_control_number_prefix - self.transaction_set_control_number_suffix = transaction_set_control_number_suffix - self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound - self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound - self.rollover_transaction_set_control_number = rollover_transaction_set_control_number - self.is_test_interchange = is_test_interchange - self.sender_internal_identification = sender_internal_identification - self.sender_internal_sub_identification = sender_internal_sub_identification - self.receiver_internal_identification = receiver_internal_identification - self.receiver_internal_sub_identification = receiver_internal_sub_identification - - -class EdifactFramingSettings(msrest.serialization.Model): - """The Edifact agreement framing settings. - - All required parameters must be populated in order to send to Azure. - - :ivar service_code_list_directory_version: The service code list directory version. - :vartype service_code_list_directory_version: str - :ivar character_encoding: The character encoding. - :vartype character_encoding: str - :ivar protocol_version: Required. The protocol version. - :vartype protocol_version: int - :ivar data_element_separator: Required. The data element separator. - :vartype data_element_separator: int - :ivar component_separator: Required. The component separator. - :vartype component_separator: int - :ivar segment_terminator: Required. The segment terminator. - :vartype segment_terminator: int - :ivar release_indicator: Required. The release indicator. - :vartype release_indicator: int - :ivar repetition_separator: Required. The repetition separator. - :vartype repetition_separator: int - :ivar 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". - :vartype character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet - :ivar decimal_point_indicator: Required. The EDIFACT frame setting decimal indicator. Possible - values include: "NotSpecified", "Comma", "Decimal". - :vartype decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator - :ivar segment_terminator_suffix: Required. The EDIFACT frame setting segment terminator suffix. - Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :vartype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - - _validation = { - 'protocol_version': {'required': True}, - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'release_indicator': {'required': True}, - 'repetition_separator': {'required': True}, - 'character_set': {'required': True}, - 'decimal_point_indicator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - } - - _attribute_map = { - 'service_code_list_directory_version': {'key': 'serviceCodeListDirectoryVersion', 'type': 'str'}, - 'character_encoding': {'key': 'characterEncoding', 'type': 'str'}, - 'protocol_version': {'key': 'protocolVersion', 'type': 'int'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, - 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, - 'character_set': {'key': 'characterSet', 'type': 'str'}, - 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'str'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'str'}, - } - - def __init__( - self, - *, - protocol_version: int, - data_element_separator: int, - component_separator: int, - segment_terminator: int, - release_indicator: int, - repetition_separator: int, - character_set: Union[str, "EdifactCharacterSet"], - decimal_point_indicator: Union[str, "EdifactDecimalIndicator"], - segment_terminator_suffix: Union[str, "SegmentTerminatorSuffix"], - service_code_list_directory_version: Optional[str] = None, - character_encoding: Optional[str] = None, - **kwargs - ): - """ - :keyword service_code_list_directory_version: The service code list directory version. - :paramtype service_code_list_directory_version: str - :keyword character_encoding: The character encoding. - :paramtype character_encoding: str - :keyword protocol_version: Required. The protocol version. - :paramtype protocol_version: int - :keyword data_element_separator: Required. The data element separator. - :paramtype data_element_separator: int - :keyword component_separator: Required. The component separator. - :paramtype component_separator: int - :keyword segment_terminator: Required. The segment terminator. - :paramtype segment_terminator: int - :keyword release_indicator: Required. The release indicator. - :paramtype release_indicator: int - :keyword repetition_separator: Required. The repetition separator. - :paramtype repetition_separator: int - :keyword 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". - :paramtype character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet - :keyword decimal_point_indicator: Required. The EDIFACT frame setting decimal indicator. - Possible values include: "NotSpecified", "Comma", "Decimal". - :paramtype decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator - :keyword segment_terminator_suffix: Required. The EDIFACT frame setting segment terminator - suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :paramtype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - super(EdifactFramingSettings, self).__init__(**kwargs) - self.service_code_list_directory_version = service_code_list_directory_version - self.character_encoding = character_encoding - self.protocol_version = protocol_version - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.release_indicator = release_indicator - self.repetition_separator = repetition_separator - self.character_set = character_set - self.decimal_point_indicator = decimal_point_indicator - self.segment_terminator_suffix = segment_terminator_suffix - - -class EdifactMessageFilter(msrest.serialization.Model): - """The Edifact message filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :ivar message_filter_type: Required. The message filter type. Possible values include: - "NotSpecified", "Include", "Exclude". - :vartype message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType - """ - - _validation = { - 'message_filter_type': {'required': True}, - } - - _attribute_map = { - 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, - } - - def __init__( - self, - *, - message_filter_type: Union[str, "MessageFilterType"], - **kwargs - ): - """ - :keyword message_filter_type: Required. The message filter type. Possible values include: - "NotSpecified", "Include", "Exclude". - :paramtype message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType - """ - super(EdifactMessageFilter, self).__init__(**kwargs) - self.message_filter_type = message_filter_type - - -class EdifactMessageIdentifier(msrest.serialization.Model): - """The Edifact message identifier. - - All required parameters must be populated in order to send to Azure. - - :ivar message_id: Required. The message id on which this envelope settings has to be applied. - :vartype message_id: str - """ - - _validation = { - 'message_id': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - } - - def __init__( - self, - *, - message_id: str, - **kwargs - ): - """ - :keyword message_id: Required. The message id on which this envelope settings has to be - applied. - :paramtype message_id: str - """ - super(EdifactMessageIdentifier, self).__init__(**kwargs) - self.message_id = message_id - - -class EdifactOneWayAgreement(msrest.serialization.Model): - """The Edifact one way agreement. - - All required parameters must be populated in order to send to Azure. - - :ivar sender_business_identity: Required. The sender business identity. - :vartype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :ivar receiver_business_identity: Required. The receiver business identity. - :vartype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :ivar protocol_settings: Required. The EDIFACT protocol settings. - :vartype protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, - } - - def __init__( - self, - *, - sender_business_identity: "BusinessIdentity", - receiver_business_identity: "BusinessIdentity", - protocol_settings: "EdifactProtocolSettings", - **kwargs - ): - """ - :keyword sender_business_identity: Required. The sender business identity. - :paramtype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :keyword receiver_business_identity: Required. The receiver business identity. - :paramtype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :keyword protocol_settings: Required. The EDIFACT protocol settings. - :paramtype protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings - """ - super(EdifactOneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings - - -class EdifactProcessingSettings(msrest.serialization.Model): - """The Edifact agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :ivar mask_security_info: Required. The value indicating whether to mask security information. - :vartype mask_security_info: bool - :ivar preserve_interchange: Required. The value indicating whether to preserve interchange. - :vartype preserve_interchange: bool - :ivar suspend_interchange_on_error: Required. The value indicating whether to suspend - interchange on error. - :vartype suspend_interchange_on_error: bool - :ivar create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether to - create empty xml tags for trailing separators. - :vartype create_empty_xml_tags_for_trailing_separators: bool - :ivar use_dot_as_decimal_separator: Required. The value indicating whether to use dot as - decimal separator. - :vartype use_dot_as_decimal_separator: bool - """ - - _validation = { - 'mask_security_info': {'required': True}, - 'preserve_interchange': {'required': True}, - 'suspend_interchange_on_error': {'required': True}, - 'create_empty_xml_tags_for_trailing_separators': {'required': True}, - 'use_dot_as_decimal_separator': {'required': True}, - } - - _attribute_map = { - 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, - 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, - 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, - 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, - 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, - } - - def __init__( - self, - *, - mask_security_info: bool, - preserve_interchange: bool, - suspend_interchange_on_error: bool, - create_empty_xml_tags_for_trailing_separators: bool, - use_dot_as_decimal_separator: bool, - **kwargs - ): - """ - :keyword mask_security_info: Required. The value indicating whether to mask security - information. - :paramtype mask_security_info: bool - :keyword preserve_interchange: Required. The value indicating whether to preserve interchange. - :paramtype preserve_interchange: bool - :keyword suspend_interchange_on_error: Required. The value indicating whether to suspend - interchange on error. - :paramtype suspend_interchange_on_error: bool - :keyword create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether - to create empty xml tags for trailing separators. - :paramtype create_empty_xml_tags_for_trailing_separators: bool - :keyword use_dot_as_decimal_separator: Required. The value indicating whether to use dot as - decimal separator. - :paramtype use_dot_as_decimal_separator: bool - """ - super(EdifactProcessingSettings, self).__init__(**kwargs) - self.mask_security_info = mask_security_info - self.preserve_interchange = preserve_interchange - self.suspend_interchange_on_error = suspend_interchange_on_error - self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators - self.use_dot_as_decimal_separator = use_dot_as_decimal_separator - - -class EdifactProtocolSettings(msrest.serialization.Model): - """The Edifact agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :ivar validation_settings: Required. The EDIFACT validation settings. - :vartype validation_settings: ~azure.mgmt.logic.models.EdifactValidationSettings - :ivar framing_settings: Required. The EDIFACT framing settings. - :vartype framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings - :ivar envelope_settings: Required. The EDIFACT envelope settings. - :vartype envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings - :ivar acknowledgement_settings: Required. The EDIFACT acknowledgement settings. - :vartype acknowledgement_settings: ~azure.mgmt.logic.models.EdifactAcknowledgementSettings - :ivar message_filter: Required. The EDIFACT message filter. - :vartype message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter - :ivar processing_settings: Required. The EDIFACT processing Settings. - :vartype processing_settings: ~azure.mgmt.logic.models.EdifactProcessingSettings - :ivar envelope_overrides: The EDIFACT envelope override settings. - :vartype envelope_overrides: list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] - :ivar message_filter_list: The EDIFACT message filter list. - :vartype message_filter_list: list[~azure.mgmt.logic.models.EdifactMessageIdentifier] - :ivar schema_references: Required. The EDIFACT schema references. - :vartype schema_references: list[~azure.mgmt.logic.models.EdifactSchemaReference] - :ivar validation_overrides: The EDIFACT validation override settings. - :vartype validation_overrides: list[~azure.mgmt.logic.models.EdifactValidationOverride] - :ivar edifact_delimiter_overrides: The EDIFACT delimiter override settings. - :vartype edifact_delimiter_overrides: list[~azure.mgmt.logic.models.EdifactDelimiterOverride] - """ - - _validation = { - 'validation_settings': {'required': True}, - 'framing_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'acknowledgement_settings': {'required': True}, - 'message_filter': {'required': True}, - 'processing_settings': {'required': True}, - 'schema_references': {'required': True}, - } - - _attribute_map = { - 'validation_settings': {'key': 'validationSettings', 'type': 'EdifactValidationSettings'}, - 'framing_settings': {'key': 'framingSettings', 'type': 'EdifactFramingSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'EdifactEnvelopeSettings'}, - 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'EdifactAcknowledgementSettings'}, - 'message_filter': {'key': 'messageFilter', 'type': 'EdifactMessageFilter'}, - 'processing_settings': {'key': 'processingSettings', 'type': 'EdifactProcessingSettings'}, - 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[EdifactEnvelopeOverride]'}, - 'message_filter_list': {'key': 'messageFilterList', 'type': '[EdifactMessageIdentifier]'}, - 'schema_references': {'key': 'schemaReferences', 'type': '[EdifactSchemaReference]'}, - 'validation_overrides': {'key': 'validationOverrides', 'type': '[EdifactValidationOverride]'}, - 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, - } - - def __init__( - self, - *, - validation_settings: "EdifactValidationSettings", - framing_settings: "EdifactFramingSettings", - envelope_settings: "EdifactEnvelopeSettings", - acknowledgement_settings: "EdifactAcknowledgementSettings", - message_filter: "EdifactMessageFilter", - processing_settings: "EdifactProcessingSettings", - schema_references: List["EdifactSchemaReference"], - envelope_overrides: Optional[List["EdifactEnvelopeOverride"]] = None, - message_filter_list: Optional[List["EdifactMessageIdentifier"]] = None, - validation_overrides: Optional[List["EdifactValidationOverride"]] = None, - edifact_delimiter_overrides: Optional[List["EdifactDelimiterOverride"]] = None, - **kwargs - ): - """ - :keyword validation_settings: Required. The EDIFACT validation settings. - :paramtype validation_settings: ~azure.mgmt.logic.models.EdifactValidationSettings - :keyword framing_settings: Required. The EDIFACT framing settings. - :paramtype framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings - :keyword envelope_settings: Required. The EDIFACT envelope settings. - :paramtype envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings - :keyword acknowledgement_settings: Required. The EDIFACT acknowledgement settings. - :paramtype acknowledgement_settings: ~azure.mgmt.logic.models.EdifactAcknowledgementSettings - :keyword message_filter: Required. The EDIFACT message filter. - :paramtype message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter - :keyword processing_settings: Required. The EDIFACT processing Settings. - :paramtype processing_settings: ~azure.mgmt.logic.models.EdifactProcessingSettings - :keyword envelope_overrides: The EDIFACT envelope override settings. - :paramtype envelope_overrides: list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] - :keyword message_filter_list: The EDIFACT message filter list. - :paramtype message_filter_list: list[~azure.mgmt.logic.models.EdifactMessageIdentifier] - :keyword schema_references: Required. The EDIFACT schema references. - :paramtype schema_references: list[~azure.mgmt.logic.models.EdifactSchemaReference] - :keyword validation_overrides: The EDIFACT validation override settings. - :paramtype validation_overrides: list[~azure.mgmt.logic.models.EdifactValidationOverride] - :keyword edifact_delimiter_overrides: The EDIFACT delimiter override settings. - :paramtype edifact_delimiter_overrides: list[~azure.mgmt.logic.models.EdifactDelimiterOverride] - """ - super(EdifactProtocolSettings, self).__init__(**kwargs) - self.validation_settings = validation_settings - self.framing_settings = framing_settings - self.envelope_settings = envelope_settings - self.acknowledgement_settings = acknowledgement_settings - self.message_filter = message_filter - self.processing_settings = processing_settings - self.envelope_overrides = envelope_overrides - self.message_filter_list = message_filter_list - self.schema_references = schema_references - self.validation_overrides = validation_overrides - self.edifact_delimiter_overrides = edifact_delimiter_overrides - - -class EdifactSchemaReference(msrest.serialization.Model): - """The Edifact schema reference. - - All required parameters must be populated in order to send to Azure. - - :ivar message_id: Required. The message id. - :vartype message_id: str - :ivar message_version: Required. The message version. - :vartype message_version: str - :ivar message_release: Required. The message release version. - :vartype message_release: str - :ivar sender_application_id: The sender application id. - :vartype sender_application_id: str - :ivar sender_application_qualifier: The sender application qualifier. - :vartype sender_application_qualifier: str - :ivar association_assigned_code: The association assigned code. - :vartype association_assigned_code: str - :ivar schema_name: Required. The schema name. - :vartype schema_name: str - """ - - _validation = { - 'message_id': {'required': True}, - 'message_version': {'required': True}, - 'message_release': {'required': True}, - 'schema_name': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, - 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - } - - def __init__( - self, - *, - message_id: str, - message_version: str, - message_release: str, - schema_name: str, - sender_application_id: Optional[str] = None, - sender_application_qualifier: Optional[str] = None, - association_assigned_code: Optional[str] = None, - **kwargs - ): - """ - :keyword message_id: Required. The message id. - :paramtype message_id: str - :keyword message_version: Required. The message version. - :paramtype message_version: str - :keyword message_release: Required. The message release version. - :paramtype message_release: str - :keyword sender_application_id: The sender application id. - :paramtype sender_application_id: str - :keyword sender_application_qualifier: The sender application qualifier. - :paramtype sender_application_qualifier: str - :keyword association_assigned_code: The association assigned code. - :paramtype association_assigned_code: str - :keyword schema_name: Required. The schema name. - :paramtype schema_name: str - """ - super(EdifactSchemaReference, self).__init__(**kwargs) - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.sender_application_id = sender_application_id - self.sender_application_qualifier = sender_application_qualifier - self.association_assigned_code = association_assigned_code - self.schema_name = schema_name - - -class EdifactValidationOverride(msrest.serialization.Model): - """The Edifact validation override settings. - - All required parameters must be populated in order to send to Azure. - - :ivar message_id: Required. The message id on which the validation settings has to be applied. - :vartype message_id: str - :ivar enforce_character_set: Required. The value indicating whether to validate character Set. - :vartype enforce_character_set: bool - :ivar validate_edi_types: Required. The value indicating whether to validate EDI types. - :vartype validate_edi_types: bool - :ivar validate_xsd_types: Required. The value indicating whether to validate XSD types. - :vartype validate_xsd_types: bool - :ivar allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - allow leading and trailing spaces and zeroes. - :vartype allow_leading_and_trailing_spaces_and_zeroes: bool - :ivar trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :vartype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - :ivar trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :vartype trim_leading_and_trailing_spaces_and_zeroes: bool - """ - - _validation = { - 'message_id': {'required': True}, - 'enforce_character_set': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'enforce_character_set': {'key': 'enforceCharacterSet', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - } - - def __init__( - self, - *, - message_id: str, - enforce_character_set: bool, - validate_edi_types: bool, - validate_xsd_types: bool, - allow_leading_and_trailing_spaces_and_zeroes: bool, - trailing_separator_policy: Union[str, "TrailingSeparatorPolicy"], - trim_leading_and_trailing_spaces_and_zeroes: bool, - **kwargs - ): - """ - :keyword message_id: Required. The message id on which the validation settings has to be - applied. - :paramtype message_id: str - :keyword enforce_character_set: Required. The value indicating whether to validate character - Set. - :paramtype enforce_character_set: bool - :keyword validate_edi_types: Required. The value indicating whether to validate EDI types. - :paramtype validate_edi_types: bool - :keyword validate_xsd_types: Required. The value indicating whether to validate XSD types. - :paramtype validate_xsd_types: bool - :keyword allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether - to allow leading and trailing spaces and zeroes. - :paramtype allow_leading_and_trailing_spaces_and_zeroes: bool - :keyword trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :paramtype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - :keyword trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :paramtype trim_leading_and_trailing_spaces_and_zeroes: bool - """ - super(EdifactValidationOverride, self).__init__(**kwargs) - self.message_id = message_id - self.enforce_character_set = enforce_character_set - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - - -class EdifactValidationSettings(msrest.serialization.Model): - """The Edifact agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :ivar validate_character_set: Required. The value indicating whether to validate character set - in the message. - :vartype validate_character_set: bool - :ivar check_duplicate_interchange_control_number: Required. The value indicating whether to - check for duplicate interchange control number. - :vartype check_duplicate_interchange_control_number: bool - :ivar interchange_control_number_validity_days: Required. The validity period of interchange - control number. - :vartype interchange_control_number_validity_days: int - :ivar check_duplicate_group_control_number: Required. The value indicating whether to check for - duplicate group control number. - :vartype check_duplicate_group_control_number: bool - :ivar check_duplicate_transaction_set_control_number: Required. The value indicating whether to - check for duplicate transaction set control number. - :vartype check_duplicate_transaction_set_control_number: bool - :ivar validate_edi_types: Required. The value indicating whether to Whether to validate EDI - types. - :vartype validate_edi_types: bool - :ivar validate_xsd_types: Required. The value indicating whether to Whether to validate XSD - types. - :vartype validate_xsd_types: bool - :ivar allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - allow leading and trailing spaces and zeroes. - :vartype allow_leading_and_trailing_spaces_and_zeroes: bool - :ivar trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :vartype trim_leading_and_trailing_spaces_and_zeroes: bool - :ivar trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :vartype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'validate_character_set': {'required': True}, - 'check_duplicate_interchange_control_number': {'required': True}, - 'interchange_control_number_validity_days': {'required': True}, - 'check_duplicate_group_control_number': {'required': True}, - 'check_duplicate_transaction_set_control_number': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, - 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, - 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__( - self, - *, - validate_character_set: bool, - check_duplicate_interchange_control_number: bool, - interchange_control_number_validity_days: int, - check_duplicate_group_control_number: bool, - check_duplicate_transaction_set_control_number: bool, - validate_edi_types: bool, - validate_xsd_types: bool, - allow_leading_and_trailing_spaces_and_zeroes: bool, - trim_leading_and_trailing_spaces_and_zeroes: bool, - trailing_separator_policy: Union[str, "TrailingSeparatorPolicy"], - **kwargs - ): - """ - :keyword validate_character_set: Required. The value indicating whether to validate character - set in the message. - :paramtype validate_character_set: bool - :keyword check_duplicate_interchange_control_number: Required. The value indicating whether to - check for duplicate interchange control number. - :paramtype check_duplicate_interchange_control_number: bool - :keyword interchange_control_number_validity_days: Required. The validity period of interchange - control number. - :paramtype interchange_control_number_validity_days: int - :keyword check_duplicate_group_control_number: Required. The value indicating whether to check - for duplicate group control number. - :paramtype check_duplicate_group_control_number: bool - :keyword check_duplicate_transaction_set_control_number: Required. The value indicating whether - to check for duplicate transaction set control number. - :paramtype check_duplicate_transaction_set_control_number: bool - :keyword validate_edi_types: Required. The value indicating whether to Whether to validate EDI - types. - :paramtype validate_edi_types: bool - :keyword validate_xsd_types: Required. The value indicating whether to Whether to validate XSD - types. - :paramtype validate_xsd_types: bool - :keyword allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether - to allow leading and trailing spaces and zeroes. - :paramtype allow_leading_and_trailing_spaces_and_zeroes: bool - :keyword trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :paramtype trim_leading_and_trailing_spaces_and_zeroes: bool - :keyword trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :paramtype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - super(EdifactValidationSettings, self).__init__(**kwargs) - self.validate_character_set = validate_character_set - self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number - self.interchange_control_number_validity_days = interchange_control_number_validity_days - self.check_duplicate_group_control_number = check_duplicate_group_control_number - self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy - - -class ErrorProperties(msrest.serialization.Model): - """Error properties indicate why the Logic service was not able to process the incoming request. The reason is provided in the error message. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): - """ - :keyword code: Error code. - :paramtype code: str - :keyword message: Error message indicating why the operation failed. - :paramtype message: str - """ - super(ErrorProperties, self).__init__(**kwargs) - self.code = code - self.message = message - - -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. - - :ivar error: The error properties. - :vartype error: ~azure.mgmt.logic.models.ErrorProperties - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorProperties'}, - } - - def __init__( - self, - *, - error: Optional["ErrorProperties"] = None, - **kwargs - ): - """ - :keyword error: The error properties. - :paramtype error: ~azure.mgmt.logic.models.ErrorProperties - """ - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -class Expression(msrest.serialization.Model): - """The expression. - - :ivar text: The text. - :vartype text: str - :ivar value: Anything. - :vartype value: any - :ivar subexpressions: The sub expressions. - :vartype subexpressions: list[~azure.mgmt.logic.models.Expression] - :ivar error: The azure resource error info. - :vartype error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, - 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, - } - - def __init__( - self, - *, - text: Optional[str] = None, - value: Optional[Any] = None, - subexpressions: Optional[List["Expression"]] = None, - error: Optional["AzureResourceErrorInfo"] = None, - **kwargs - ): - """ - :keyword text: The text. - :paramtype text: str - :keyword value: Anything. - :paramtype value: any - :keyword subexpressions: The sub expressions. - :paramtype subexpressions: list[~azure.mgmt.logic.models.Expression] - :keyword error: The azure resource error info. - :paramtype error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - """ - super(Expression, self).__init__(**kwargs) - self.text = text - self.value = value - self.subexpressions = subexpressions - self.error = error - - -class ExpressionRoot(Expression): - """The expression root. - - :ivar text: The text. - :vartype text: str - :ivar value: Anything. - :vartype value: any - :ivar subexpressions: The sub expressions. - :vartype subexpressions: list[~azure.mgmt.logic.models.Expression] - :ivar error: The azure resource error info. - :vartype error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - :ivar path: The path. - :vartype path: str - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, - 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - *, - text: Optional[str] = None, - value: Optional[Any] = None, - subexpressions: Optional[List["Expression"]] = None, - error: Optional["AzureResourceErrorInfo"] = None, - path: Optional[str] = None, - **kwargs - ): - """ - :keyword text: The text. - :paramtype text: str - :keyword value: Anything. - :paramtype value: any - :keyword subexpressions: The sub expressions. - :paramtype subexpressions: list[~azure.mgmt.logic.models.Expression] - :keyword error: The azure resource error info. - :paramtype error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - :keyword path: The path. - :paramtype path: str - """ - super(ExpressionRoot, self).__init__(text=text, value=value, subexpressions=subexpressions, error=error, **kwargs) - self.path = path - - -class ExpressionTraces(msrest.serialization.Model): - """The expression traces. - - :ivar inputs: - :vartype inputs: list[~azure.mgmt.logic.models.ExpressionRoot] - """ - - _attribute_map = { - 'inputs': {'key': 'inputs', 'type': '[ExpressionRoot]'}, - } - - def __init__( - self, - *, - inputs: Optional[List["ExpressionRoot"]] = None, - **kwargs - ): - """ - :keyword inputs: - :paramtype inputs: list[~azure.mgmt.logic.models.ExpressionRoot] - """ - super(ExpressionTraces, self).__init__(**kwargs) - self.inputs = inputs - - -class ExtendedErrorInfo(msrest.serialization.Model): - """The extended error info. - - All required parameters must be populated in order to send to Azure. - - :ivar code: Required. The error code. Possible values include: "NotSpecified", - "IntegrationServiceEnvironmentNotFound", "InternalServerError", "InvalidOperationId". - :vartype code: str or ~azure.mgmt.logic.models.ErrorResponseCode - :ivar message: Required. The error message. - :vartype message: str - :ivar details: The error message details. - :vartype details: list[~azure.mgmt.logic.models.ExtendedErrorInfo] - :ivar inner_error: The inner error. - :vartype inner_error: any - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ExtendedErrorInfo]'}, - 'inner_error': {'key': 'innerError', 'type': 'object'}, - } - - def __init__( - self, - *, - code: Union[str, "ErrorResponseCode"], - message: str, - details: Optional[List["ExtendedErrorInfo"]] = None, - inner_error: Optional[Any] = None, - **kwargs - ): - """ - :keyword code: Required. The error code. Possible values include: "NotSpecified", - "IntegrationServiceEnvironmentNotFound", "InternalServerError", "InvalidOperationId". - :paramtype code: str or ~azure.mgmt.logic.models.ErrorResponseCode - :keyword message: Required. The error message. - :paramtype message: str - :keyword details: The error message details. - :paramtype details: list[~azure.mgmt.logic.models.ExtendedErrorInfo] - :keyword inner_error: The inner error. - :paramtype inner_error: any - """ - super(ExtendedErrorInfo, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details - self.inner_error = inner_error - - -class FlowAccessControlConfiguration(msrest.serialization.Model): - """The access control configuration. - - :ivar triggers: The access control configuration for invoking workflow triggers. - :vartype triggers: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :ivar contents: The access control configuration for accessing workflow run contents. - :vartype contents: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :ivar actions: The access control configuration for workflow actions. - :vartype actions: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :ivar workflow_management: The access control configuration for workflow management. - :vartype workflow_management: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'FlowAccessControlConfigurationPolicy'}, - 'contents': {'key': 'contents', 'type': 'FlowAccessControlConfigurationPolicy'}, - 'actions': {'key': 'actions', 'type': 'FlowAccessControlConfigurationPolicy'}, - 'workflow_management': {'key': 'workflowManagement', 'type': 'FlowAccessControlConfigurationPolicy'}, - } - - def __init__( - self, - *, - triggers: Optional["FlowAccessControlConfigurationPolicy"] = None, - contents: Optional["FlowAccessControlConfigurationPolicy"] = None, - actions: Optional["FlowAccessControlConfigurationPolicy"] = None, - workflow_management: Optional["FlowAccessControlConfigurationPolicy"] = None, - **kwargs - ): - """ - :keyword triggers: The access control configuration for invoking workflow triggers. - :paramtype triggers: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :keyword contents: The access control configuration for accessing workflow run contents. - :paramtype contents: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :keyword actions: The access control configuration for workflow actions. - :paramtype actions: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :keyword workflow_management: The access control configuration for workflow management. - :paramtype workflow_management: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - """ - super(FlowAccessControlConfiguration, self).__init__(**kwargs) - self.triggers = triggers - self.contents = contents - self.actions = actions - self.workflow_management = workflow_management - - -class FlowAccessControlConfigurationPolicy(msrest.serialization.Model): - """The access control configuration policy. - - :ivar allowed_caller_ip_addresses: The allowed caller IP address ranges. - :vartype allowed_caller_ip_addresses: list[~azure.mgmt.logic.models.IpAddressRange] - :ivar open_authentication_policies: The authentication policies for workflow. - :vartype open_authentication_policies: - ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicies - """ - - _attribute_map = { - 'allowed_caller_ip_addresses': {'key': 'allowedCallerIpAddresses', 'type': '[IpAddressRange]'}, - 'open_authentication_policies': {'key': 'openAuthenticationPolicies', 'type': 'OpenAuthenticationAccessPolicies'}, - } - - def __init__( - self, - *, - allowed_caller_ip_addresses: Optional[List["IpAddressRange"]] = None, - open_authentication_policies: Optional["OpenAuthenticationAccessPolicies"] = None, - **kwargs - ): - """ - :keyword allowed_caller_ip_addresses: The allowed caller IP address ranges. - :paramtype allowed_caller_ip_addresses: list[~azure.mgmt.logic.models.IpAddressRange] - :keyword open_authentication_policies: The authentication policies for workflow. - :paramtype open_authentication_policies: - ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicies - """ - super(FlowAccessControlConfigurationPolicy, self).__init__(**kwargs) - self.allowed_caller_ip_addresses = allowed_caller_ip_addresses - self.open_authentication_policies = open_authentication_policies - - -class FlowEndpoints(msrest.serialization.Model): - """The flow endpoints configuration. - - :ivar outgoing_ip_addresses: The outgoing ip address. - :vartype outgoing_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] - :ivar access_endpoint_ip_addresses: The access endpoint ip address. - :vartype access_endpoint_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] - """ - - _attribute_map = { - 'outgoing_ip_addresses': {'key': 'outgoingIpAddresses', 'type': '[IpAddress]'}, - 'access_endpoint_ip_addresses': {'key': 'accessEndpointIpAddresses', 'type': '[IpAddress]'}, - } - - def __init__( - self, - *, - outgoing_ip_addresses: Optional[List["IpAddress"]] = None, - access_endpoint_ip_addresses: Optional[List["IpAddress"]] = None, - **kwargs - ): - """ - :keyword outgoing_ip_addresses: The outgoing ip address. - :paramtype outgoing_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] - :keyword access_endpoint_ip_addresses: The access endpoint ip address. - :paramtype access_endpoint_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] - """ - super(FlowEndpoints, self).__init__(**kwargs) - self.outgoing_ip_addresses = outgoing_ip_addresses - self.access_endpoint_ip_addresses = access_endpoint_ip_addresses - - -class FlowEndpointsConfiguration(msrest.serialization.Model): - """The endpoints configuration. - - :ivar workflow: The workflow endpoints. - :vartype workflow: ~azure.mgmt.logic.models.FlowEndpoints - :ivar connector: The connector endpoints. - :vartype connector: ~azure.mgmt.logic.models.FlowEndpoints - """ - - _attribute_map = { - 'workflow': {'key': 'workflow', 'type': 'FlowEndpoints'}, - 'connector': {'key': 'connector', 'type': 'FlowEndpoints'}, - } - - def __init__( - self, - *, - workflow: Optional["FlowEndpoints"] = None, - connector: Optional["FlowEndpoints"] = None, - **kwargs - ): - """ - :keyword workflow: The workflow endpoints. - :paramtype workflow: ~azure.mgmt.logic.models.FlowEndpoints - :keyword connector: The connector endpoints. - :paramtype connector: ~azure.mgmt.logic.models.FlowEndpoints - """ - super(FlowEndpointsConfiguration, self).__init__(**kwargs) - self.workflow = workflow - self.connector = connector - - -class GenerateUpgradedDefinitionParameters(msrest.serialization.Model): - """The parameters to generate upgraded definition. - - :ivar target_schema_version: The target schema version. - :vartype target_schema_version: str - """ - - _attribute_map = { - 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - target_schema_version: Optional[str] = None, - **kwargs - ): - """ - :keyword target_schema_version: The target schema version. - :paramtype target_schema_version: str - """ - super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) - self.target_schema_version = target_schema_version - - -class GetCallbackUrlParameters(msrest.serialization.Model): - """The callback url parameters. - - :ivar not_after: The expiry time. - :vartype not_after: ~datetime.datetime - :ivar key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :vartype key_type: str or ~azure.mgmt.logic.models.KeyType - """ - - _attribute_map = { - 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__( - self, - *, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "KeyType"]] = None, - **kwargs - ): - """ - :keyword not_after: The expiry time. - :paramtype not_after: ~datetime.datetime - :keyword key_type: The key type. Possible values include: "NotSpecified", "Primary", - "Secondary". - :paramtype key_type: str or ~azure.mgmt.logic.models.KeyType - """ - super(GetCallbackUrlParameters, self).__init__(**kwargs) - self.not_after = not_after - self.key_type = key_type - - -class IntegrationAccount(Resource): - """The integration account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.IntegrationAccountSku - :ivar integration_service_environment: The integration service environment. - :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :ivar state: The workflow state. Possible values include: "NotSpecified", "Completed", - "Enabled", "Disabled", "Deleted", "Suspended". - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, - 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'ResourceReference'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["IntegrationAccountSku"] = None, - integration_service_environment: Optional["ResourceReference"] = None, - state: Optional[Union[str, "WorkflowState"]] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku. - :paramtype sku: ~azure.mgmt.logic.models.IntegrationAccountSku - :keyword integration_service_environment: The integration service environment. - :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :keyword state: The workflow state. Possible values include: "NotSpecified", "Completed", - "Enabled", "Disabled", "Deleted", "Suspended". - :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState - """ - super(IntegrationAccount, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.integration_service_environment = integration_service_environment - self.state = state - - -class IntegrationAccountAgreement(Resource): - """The integration account agreement. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :ivar metadata: The metadata. - :vartype metadata: any - :ivar agreement_type: Required. The agreement type. Possible values include: "NotSpecified", - "AS2", "X12", "Edifact". - :vartype agreement_type: str or ~azure.mgmt.logic.models.AgreementType - :ivar host_partner: Required. The integration account partner that is set as host partner for - this agreement. - :vartype host_partner: str - :ivar guest_partner: Required. The integration account partner that is set as guest partner for - this agreement. - :vartype guest_partner: str - :ivar host_identity: Required. The business identity of the host partner. - :vartype host_identity: ~azure.mgmt.logic.models.BusinessIdentity - :ivar guest_identity: Required. The business identity of the guest partner. - :vartype guest_identity: ~azure.mgmt.logic.models.BusinessIdentity - :ivar content: Required. The agreement content. - :vartype content: ~azure.mgmt.logic.models.AgreementContent - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'agreement_type': {'required': True}, - 'host_partner': {'required': True}, - 'guest_partner': {'required': True}, - 'host_identity': {'required': True}, - 'guest_identity': {'required': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'agreement_type': {'key': 'properties.agreementType', 'type': 'str'}, - 'host_partner': {'key': 'properties.hostPartner', 'type': 'str'}, - 'guest_partner': {'key': 'properties.guestPartner', 'type': 'str'}, - 'host_identity': {'key': 'properties.hostIdentity', 'type': 'BusinessIdentity'}, - 'guest_identity': {'key': 'properties.guestIdentity', 'type': 'BusinessIdentity'}, - 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, - } - - def __init__( - self, - *, - agreement_type: Union[str, "AgreementType"], - host_partner: str, - guest_partner: str, - host_identity: "BusinessIdentity", - guest_identity: "BusinessIdentity", - content: "AgreementContent", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - metadata: Optional[Any] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword metadata: The metadata. - :paramtype metadata: any - :keyword agreement_type: Required. The agreement type. Possible values include: "NotSpecified", - "AS2", "X12", "Edifact". - :paramtype agreement_type: str or ~azure.mgmt.logic.models.AgreementType - :keyword host_partner: Required. The integration account partner that is set as host partner - for this agreement. - :paramtype host_partner: str - :keyword guest_partner: Required. The integration account partner that is set as guest partner - for this agreement. - :paramtype guest_partner: str - :keyword host_identity: Required. The business identity of the host partner. - :paramtype host_identity: ~azure.mgmt.logic.models.BusinessIdentity - :keyword guest_identity: Required. The business identity of the guest partner. - :paramtype guest_identity: ~azure.mgmt.logic.models.BusinessIdentity - :keyword content: Required. The agreement content. - :paramtype content: ~azure.mgmt.logic.models.AgreementContent - """ - super(IntegrationAccountAgreement, self).__init__(location=location, tags=tags, **kwargs) - self.created_time = None - self.changed_time = None - self.metadata = metadata - self.agreement_type = agreement_type - self.host_partner = host_partner - self.guest_partner = guest_partner - self.host_identity = host_identity - self.guest_identity = guest_identity - self.content = content - - -class IntegrationAccountAgreementFilter(msrest.serialization.Model): - """The integration account agreement filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :ivar agreement_type: Required. The agreement type of integration account agreement. Possible - values include: "NotSpecified", "AS2", "X12", "Edifact". - :vartype agreement_type: str or ~azure.mgmt.logic.models.AgreementType - """ - - _validation = { - 'agreement_type': {'required': True}, - } - - _attribute_map = { - 'agreement_type': {'key': 'agreementType', 'type': 'str'}, - } - - def __init__( - self, - *, - agreement_type: Union[str, "AgreementType"], - **kwargs - ): - """ - :keyword agreement_type: Required. The agreement type of integration account agreement. - Possible values include: "NotSpecified", "AS2", "X12", "Edifact". - :paramtype agreement_type: str or ~azure.mgmt.logic.models.AgreementType - """ - super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) - self.agreement_type = agreement_type - - -class IntegrationAccountAgreementListResult(msrest.serialization.Model): - """The list of integration account agreements. - - :ivar value: The list of integration account agreements. - :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountAgreement] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountAgreement]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationAccountAgreement"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The list of integration account agreements. - :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountAgreement] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationAccountAgreementListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationAccountCertificate(Resource): - """The integration account certificate. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :ivar metadata: The metadata. - :vartype metadata: any - :ivar key: The key details in the key vault. - :vartype key: ~azure.mgmt.logic.models.KeyVaultKeyReference - :ivar public_certificate: The public certificate. - :vartype public_certificate: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - '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'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - metadata: Optional[Any] = None, - key: Optional["KeyVaultKeyReference"] = None, - public_certificate: Optional[str] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword metadata: The metadata. - :paramtype metadata: any - :keyword key: The key details in the key vault. - :paramtype key: ~azure.mgmt.logic.models.KeyVaultKeyReference - :keyword public_certificate: The public certificate. - :paramtype public_certificate: str - """ - 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 - - -class IntegrationAccountCertificateListResult(msrest.serialization.Model): - """The list of integration account certificates. - - :ivar value: The list of integration account certificates. - :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountCertificate] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountCertificate]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationAccountCertificate"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The list of integration account certificates. - :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountCertificate] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationAccountCertificateListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationAccountListResult(msrest.serialization.Model): - """The list of integration accounts. - - :ivar value: The list of integration accounts. - :vartype value: list[~azure.mgmt.logic.models.IntegrationAccount] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccount]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationAccount"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The list of integration accounts. - :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccount] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationAccountListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationAccountMap(Resource): - """The integration account map. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar map_type: Required. The map type. Possible values include: "NotSpecified", "Xslt", - "Xslt20", "Xslt30", "Liquid". - :vartype map_type: str or ~azure.mgmt.logic.models.MapType - :ivar parameters_schema: The parameters schema of integration account map. - :vartype parameters_schema: - ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :ivar content: The content. - :vartype content: str - :ivar content_type: The content type. - :vartype content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - :ivar metadata: The metadata. - :vartype metadata: any - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'map_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - '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'}, - } - - def __init__( - self, - *, - 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[Any] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword map_type: Required. The map type. Possible values include: "NotSpecified", "Xslt", - "Xslt20", "Xslt30", "Liquid". - :paramtype map_type: str or ~azure.mgmt.logic.models.MapType - :keyword parameters_schema: The parameters schema of integration account map. - :paramtype parameters_schema: - ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema - :keyword content: The content. - :paramtype content: str - :keyword content_type: The content type. - :paramtype content_type: str - :keyword metadata: The metadata. - :paramtype metadata: any - """ - 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 - - -class IntegrationAccountMapFilter(msrest.serialization.Model): - """The integration account map filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :ivar map_type: Required. The map type of integration account map. Possible values include: - "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". - :vartype map_type: str or ~azure.mgmt.logic.models.MapType - """ - - _validation = { - 'map_type': {'required': True}, - } - - _attribute_map = { - 'map_type': {'key': 'mapType', 'type': 'str'}, - } - - def __init__( - self, - *, - map_type: Union[str, "MapType"], - **kwargs - ): - """ - :keyword map_type: Required. The map type of integration account map. Possible values include: - "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". - :paramtype map_type: str or ~azure.mgmt.logic.models.MapType - """ - super(IntegrationAccountMapFilter, self).__init__(**kwargs) - self.map_type = map_type - - -class IntegrationAccountMapListResult(msrest.serialization.Model): - """The list of integration account maps. - - :ivar value: The list of integration account maps. - :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountMap] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountMap]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationAccountMap"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The list of integration account maps. - :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountMap] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationAccountMapListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationAccountMapPropertiesParametersSchema(msrest.serialization.Model): - """The parameters schema of integration account map. - - :ivar ref: The reference name. - :vartype ref: str - """ - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - } - - def __init__( - self, - *, - ref: Optional[str] = None, - **kwargs - ): - """ - :keyword ref: The reference name. - :paramtype ref: str - """ - super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) - self.ref = ref - - -class IntegrationAccountPartner(Resource): - """The integration account partner. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar partner_type: Required. The partner type. Possible values include: "NotSpecified", "B2B". - :vartype partner_type: str or ~azure.mgmt.logic.models.PartnerType - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :ivar metadata: The metadata. - :vartype metadata: any - :ivar content: Required. The partner content. - :vartype content: ~azure.mgmt.logic.models.PartnerContent - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'partner_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'partner_type': {'key': 'properties.partnerType', 'type': 'str'}, - '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'}, - } - - def __init__( - self, - *, - partner_type: Union[str, "PartnerType"], - content: "PartnerContent", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - metadata: Optional[Any] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword partner_type: Required. The partner type. Possible values include: "NotSpecified", - "B2B". - :paramtype partner_type: str or ~azure.mgmt.logic.models.PartnerType - :keyword metadata: The metadata. - :paramtype metadata: any - :keyword content: Required. The partner content. - :paramtype content: ~azure.mgmt.logic.models.PartnerContent - """ - super(IntegrationAccountPartner, self).__init__(location=location, tags=tags, **kwargs) - self.partner_type = partner_type - self.created_time = None - self.changed_time = None - self.metadata = metadata - self.content = content - - -class IntegrationAccountPartnerFilter(msrest.serialization.Model): - """The integration account partner filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :ivar partner_type: Required. The partner type of integration account partner. Possible values - include: "NotSpecified", "B2B". - :vartype partner_type: str or ~azure.mgmt.logic.models.PartnerType - """ - - _validation = { - 'partner_type': {'required': True}, - } - - _attribute_map = { - 'partner_type': {'key': 'partnerType', 'type': 'str'}, - } - - def __init__( - self, - *, - partner_type: Union[str, "PartnerType"], - **kwargs - ): - """ - :keyword partner_type: Required. The partner type of integration account partner. Possible - values include: "NotSpecified", "B2B". - :paramtype partner_type: str or ~azure.mgmt.logic.models.PartnerType - """ - super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) - self.partner_type = partner_type - - -class IntegrationAccountPartnerListResult(msrest.serialization.Model): - """The list of integration account partners. - - :ivar value: The list of integration account partners. - :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountPartner] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountPartner]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationAccountPartner"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The list of integration account partners. - :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountPartner] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationAccountPartnerListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationAccountSchema(Resource): - """The integration account schema. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar schema_type: Required. The schema type. Possible values include: "NotSpecified", "Xml". - :vartype schema_type: str or ~azure.mgmt.logic.models.SchemaType - :ivar target_namespace: The target namespace of the schema. - :vartype target_namespace: str - :ivar document_name: The document name. - :vartype document_name: str - :ivar file_name: The file name. - :vartype file_name: str - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :ivar metadata: The metadata. - :vartype metadata: any - :ivar content: The content. - :vartype content: str - :ivar content_type: The content type. - :vartype content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'schema_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'schema_type': {'key': 'properties.schemaType', 'type': 'str'}, - 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, - 'document_name': {'key': 'properties.documentName', 'type': 'str'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - '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': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, - } - - def __init__( - self, - *, - schema_type: Union[str, "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[Any] = None, - content: Optional[str] = None, - content_type: Optional[str] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword schema_type: Required. The schema type. Possible values include: "NotSpecified", - "Xml". - :paramtype schema_type: str or ~azure.mgmt.logic.models.SchemaType - :keyword target_namespace: The target namespace of the schema. - :paramtype target_namespace: str - :keyword document_name: The document name. - :paramtype document_name: str - :keyword file_name: The file name. - :paramtype file_name: str - :keyword metadata: The metadata. - :paramtype metadata: any - :keyword content: The content. - :paramtype content: str - :keyword content_type: The content type. - :paramtype content_type: str - """ - super(IntegrationAccountSchema, self).__init__(location=location, tags=tags, **kwargs) - self.schema_type = schema_type - self.target_namespace = target_namespace - self.document_name = document_name - self.file_name = file_name - self.created_time = None - self.changed_time = None - self.metadata = metadata - self.content = content - self.content_type = content_type - self.content_link = None - - -class IntegrationAccountSchemaFilter(msrest.serialization.Model): - """The integration account schema filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :ivar schema_type: Required. The schema type of integration account schema. Possible values - include: "NotSpecified", "Xml". - :vartype schema_type: str or ~azure.mgmt.logic.models.SchemaType - """ - - _validation = { - 'schema_type': {'required': True}, - } - - _attribute_map = { - 'schema_type': {'key': 'schemaType', 'type': 'str'}, - } - - def __init__( - self, - *, - schema_type: Union[str, "SchemaType"], - **kwargs - ): - """ - :keyword schema_type: Required. The schema type of integration account schema. Possible values - include: "NotSpecified", "Xml". - :paramtype schema_type: str or ~azure.mgmt.logic.models.SchemaType - """ - super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) - self.schema_type = schema_type - - -class IntegrationAccountSchemaListResult(msrest.serialization.Model): - """The list of integration account schemas. - - :ivar value: The list of integration account schemas. - :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountSchema] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountSchema]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationAccountSchema"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The list of integration account schemas. - :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountSchema] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationAccountSchemaListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationAccountSession(Resource): - """The integration account session. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :ivar content: The session content. - :vartype content: any - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'content': {'key': 'properties.content', 'type': 'object'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - content: Optional[Any] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword content: The session content. - :paramtype content: any - """ - super(IntegrationAccountSession, self).__init__(location=location, tags=tags, **kwargs) - self.created_time = None - self.changed_time = None - self.content = content - - -class IntegrationAccountSessionFilter(msrest.serialization.Model): - """The integration account session filter. - - All required parameters must be populated in order to send to Azure. - - :ivar changed_time: Required. The changed time of integration account sessions. - :vartype changed_time: ~datetime.datetime - """ - - _validation = { - 'changed_time': {'required': True}, - } - - _attribute_map = { - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - changed_time: datetime.datetime, - **kwargs - ): - """ - :keyword changed_time: Required. The changed time of integration account sessions. - :paramtype changed_time: ~datetime.datetime - """ - super(IntegrationAccountSessionFilter, self).__init__(**kwargs) - self.changed_time = changed_time - - -class IntegrationAccountSessionListResult(msrest.serialization.Model): - """The list of integration account sessions. - - :ivar value: The list of integration account sessions. - :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountSession] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountSession]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationAccountSession"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The list of integration account sessions. - :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountSession] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationAccountSessionListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationAccountSku(msrest.serialization.Model): - """The integration account sku. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The sku name. Possible values include: "NotSpecified", "Free", "Basic", - "Standard". - :vartype name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Union[str, "IntegrationAccountSkuName"], - **kwargs - ): - """ - :keyword name: Required. The sku name. Possible values include: "NotSpecified", "Free", - "Basic", "Standard". - :paramtype name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName - """ - super(IntegrationAccountSku, self).__init__(**kwargs) - self.name = name - - -class IntegrationServiceEnvironmenEncryptionConfiguration(msrest.serialization.Model): - """The encryption configuration for the integration service environment. - - :ivar encryption_key_reference: The encryption key reference. - :vartype encryption_key_reference: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionKeyReference - """ - - _attribute_map = { - 'encryption_key_reference': {'key': 'encryptionKeyReference', 'type': 'IntegrationServiceEnvironmenEncryptionKeyReference'}, - } - - def __init__( - self, - *, - encryption_key_reference: Optional["IntegrationServiceEnvironmenEncryptionKeyReference"] = None, - **kwargs - ): - """ - :keyword encryption_key_reference: The encryption key reference. - :paramtype encryption_key_reference: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionKeyReference - """ - 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. - - :ivar key_vault: The key vault reference. - :vartype key_vault: ~azure.mgmt.logic.models.ResourceReference - :ivar key_name: Gets the key name in the Key Vault. - :vartype key_name: str - :ivar key_version: Gets the version of the key specified in the keyName property. - :vartype key_version: str - """ - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'ResourceReference'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'key_version': {'key': 'keyVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - key_vault: Optional["ResourceReference"] = None, - key_name: Optional[str] = None, - key_version: Optional[str] = None, - **kwargs - ): - """ - :keyword key_vault: The key vault reference. - :paramtype key_vault: ~azure.mgmt.logic.models.ResourceReference - :keyword key_name: Gets the key name in the Key Vault. - :paramtype key_name: str - :keyword key_version: Gets the version of the key specified in the keyName property. - :paramtype key_version: str - """ - super(IntegrationServiceEnvironmenEncryptionKeyReference, self).__init__(**kwargs) - self.key_vault = key_vault - self.key_name = key_name - self.key_version = key_version - - -class IntegrationServiceEnvironment(Resource): - """The integration service environment. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar properties: The integration service environment properties. - :vartype properties: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentProperties - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku - :ivar identity: Managed service identity properties. - :vartype identity: ~azure.mgmt.logic.models.ManagedServiceIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'IntegrationServiceEnvironmentProperties'}, - 'sku': {'key': 'sku', 'type': 'IntegrationServiceEnvironmentSku'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["IntegrationServiceEnvironmentProperties"] = None, - sku: Optional["IntegrationServiceEnvironmentSku"] = None, - identity: Optional["ManagedServiceIdentity"] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword properties: The integration service environment properties. - :paramtype properties: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentProperties - :keyword sku: The sku. - :paramtype sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku - :keyword identity: Managed service identity properties. - :paramtype identity: ~azure.mgmt.logic.models.ManagedServiceIdentity - """ - super(IntegrationServiceEnvironment, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties - self.sku = sku - self.identity = identity - - -class IntegrationServiceEnvironmentAccessEndpoint(msrest.serialization.Model): - """The integration service environment access endpoint. - - :ivar type: The access endpoint type. Possible values include: "NotSpecified", "External", - "Internal". - :vartype type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpointType - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "IntegrationServiceEnvironmentAccessEndpointType"]] = None, - **kwargs - ): - """ - :keyword type: The access endpoint type. Possible values include: "NotSpecified", "External", - "Internal". - :paramtype type: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpointType - """ - super(IntegrationServiceEnvironmentAccessEndpoint, self).__init__(**kwargs) - self.type = type - - -class IntegrationServiceEnvironmentListResult(msrest.serialization.Model): - """The list of integration service environments. - - :ivar value: - :vartype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironment] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationServiceEnvironment]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationServiceEnvironment"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: - :paramtype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironment] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationServiceEnvironmentListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationServiceEnvironmentManagedApi(Resource): - """The integration service environment managed api. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar name_properties_name: The name. - :vartype name_properties_name: str - :ivar connection_parameters: The connection parameters. - :vartype connection_parameters: dict[str, any] - :ivar metadata: The metadata. - :vartype metadata: ~azure.mgmt.logic.models.ApiResourceMetadata - :ivar runtime_urls: The runtime urls. - :vartype runtime_urls: list[str] - :ivar general_information: The api general information. - :vartype general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation - :ivar capabilities: The capabilities. - :vartype capabilities: list[str] - :ivar backend_service: The backend service. - :vartype backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService - :ivar policies: The policies for the API. - :vartype policies: ~azure.mgmt.logic.models.ApiResourcePolicies - :ivar api_definition_url: The API definition. - :vartype api_definition_url: str - :ivar api_definitions: The api definitions. - :vartype api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions - :ivar integration_service_environment: The integration service environment reference. - :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :ivar 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". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :ivar category: The category. Possible values include: "NotSpecified", "Enterprise", - "Standard", "Premium". - :vartype category: str or ~azure.mgmt.logic.models.ApiTier - :ivar deployment_parameters: The integration service environment managed api deployment - parameters. - :vartype deployment_parameters: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiDeploymentParameters - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'name_properties_name': {'readonly': True}, - 'connection_parameters': {'readonly': True}, - 'metadata': {'readonly': True}, - 'runtime_urls': {'readonly': True}, - 'general_information': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'backend_service': {'readonly': True}, - 'policies': {'readonly': True}, - 'api_definition_url': {'readonly': True}, - 'api_definitions': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'category': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, - 'connection_parameters': {'key': 'properties.connectionParameters', 'type': '{object}'}, - 'metadata': {'key': 'properties.metadata', 'type': 'ApiResourceMetadata'}, - 'runtime_urls': {'key': 'properties.runtimeUrls', 'type': '[str]'}, - 'general_information': {'key': 'properties.generalInformation', 'type': 'ApiResourceGeneralInformation'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[str]'}, - 'backend_service': {'key': 'properties.backendService', 'type': 'ApiResourceBackendService'}, - 'policies': {'key': 'properties.policies', 'type': 'ApiResourcePolicies'}, - 'api_definition_url': {'key': 'properties.apiDefinitionUrl', 'type': 'str'}, - 'api_definitions': {'key': 'properties.apiDefinitions', 'type': 'ApiResourceDefinitions'}, - 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'ResourceReference'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'deployment_parameters': {'key': 'properties.deploymentParameters', 'type': 'IntegrationServiceEnvironmentManagedApiDeploymentParameters'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - integration_service_environment: Optional["ResourceReference"] = None, - deployment_parameters: Optional["IntegrationServiceEnvironmentManagedApiDeploymentParameters"] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword integration_service_environment: The integration service environment reference. - :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :keyword deployment_parameters: The integration service environment managed api deployment - parameters. - :paramtype deployment_parameters: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiDeploymentParameters - """ - super(IntegrationServiceEnvironmentManagedApi, self).__init__(location=location, tags=tags, **kwargs) - self.name_properties_name = None - self.connection_parameters = None - self.metadata = None - self.runtime_urls = None - self.general_information = None - self.capabilities = None - self.backend_service = None - self.policies = None - self.api_definition_url = None - self.api_definitions = None - self.integration_service_environment = integration_service_environment - self.provisioning_state = None - self.category = None - self.deployment_parameters = deployment_parameters - - -class IntegrationServiceEnvironmentManagedApiDeploymentParameters(msrest.serialization.Model): - """The integration service environment managed api deployment parameters. - - :ivar content_link_definition: The integration service environment managed api content link for - deployment. - :vartype content_link_definition: ~azure.mgmt.logic.models.ContentLink - """ - - _attribute_map = { - 'content_link_definition': {'key': 'contentLinkDefinition', 'type': 'ContentLink'}, - } - - def __init__( - self, - *, - content_link_definition: Optional["ContentLink"] = None, - **kwargs - ): - """ - :keyword content_link_definition: The integration service environment managed api content link - for deployment. - :paramtype content_link_definition: ~azure.mgmt.logic.models.ContentLink - """ - super(IntegrationServiceEnvironmentManagedApiDeploymentParameters, self).__init__(**kwargs) - self.content_link_definition = content_link_definition - - -class IntegrationServiceEnvironmentManagedApiListResult(msrest.serialization.Model): - """The list of integration service environment managed APIs. - - :ivar value: The integration service environment managed APIs. - :vartype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationServiceEnvironmentManagedApi]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationServiceEnvironmentManagedApi"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The integration service environment managed APIs. - :paramtype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationServiceEnvironmentManagedApiListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationServiceEnvironmentManagedApiProperties(ApiResourceProperties): - """The integration service environment managed api properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name. - :vartype name: str - :ivar connection_parameters: The connection parameters. - :vartype connection_parameters: dict[str, any] - :ivar metadata: The metadata. - :vartype metadata: ~azure.mgmt.logic.models.ApiResourceMetadata - :ivar runtime_urls: The runtime urls. - :vartype runtime_urls: list[str] - :ivar general_information: The api general information. - :vartype general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation - :ivar capabilities: The capabilities. - :vartype capabilities: list[str] - :ivar backend_service: The backend service. - :vartype backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService - :ivar policies: The policies for the API. - :vartype policies: ~azure.mgmt.logic.models.ApiResourcePolicies - :ivar api_definition_url: The API definition. - :vartype api_definition_url: str - :ivar api_definitions: The api definitions. - :vartype api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions - :ivar integration_service_environment: The integration service environment reference. - :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :ivar 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". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :ivar category: The category. Possible values include: "NotSpecified", "Enterprise", - "Standard", "Premium". - :vartype category: str or ~azure.mgmt.logic.models.ApiTier - :ivar deployment_parameters: The integration service environment managed api deployment - parameters. - :vartype deployment_parameters: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiDeploymentParameters - """ - - _validation = { - 'name': {'readonly': True}, - 'connection_parameters': {'readonly': True}, - 'metadata': {'readonly': True}, - 'runtime_urls': {'readonly': True}, - 'general_information': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'backend_service': {'readonly': True}, - 'policies': {'readonly': True}, - 'api_definition_url': {'readonly': True}, - 'api_definitions': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'category': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_parameters': {'key': 'connectionParameters', 'type': '{object}'}, - 'metadata': {'key': 'metadata', 'type': 'ApiResourceMetadata'}, - 'runtime_urls': {'key': 'runtimeUrls', 'type': '[str]'}, - 'general_information': {'key': 'generalInformation', 'type': 'ApiResourceGeneralInformation'}, - 'capabilities': {'key': 'capabilities', 'type': '[str]'}, - 'backend_service': {'key': 'backendService', 'type': 'ApiResourceBackendService'}, - 'policies': {'key': 'policies', 'type': 'ApiResourcePolicies'}, - 'api_definition_url': {'key': 'apiDefinitionUrl', 'type': 'str'}, - 'api_definitions': {'key': 'apiDefinitions', 'type': 'ApiResourceDefinitions'}, - 'integration_service_environment': {'key': 'integrationServiceEnvironment', 'type': 'ResourceReference'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'deployment_parameters': {'key': 'deploymentParameters', 'type': 'IntegrationServiceEnvironmentManagedApiDeploymentParameters'}, - } - - def __init__( - self, - *, - integration_service_environment: Optional["ResourceReference"] = None, - deployment_parameters: Optional["IntegrationServiceEnvironmentManagedApiDeploymentParameters"] = None, - **kwargs - ): - """ - :keyword integration_service_environment: The integration service environment reference. - :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :keyword deployment_parameters: The integration service environment managed api deployment - parameters. - :paramtype deployment_parameters: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiDeploymentParameters - """ - super(IntegrationServiceEnvironmentManagedApiProperties, self).__init__(integration_service_environment=integration_service_environment, **kwargs) - self.deployment_parameters = deployment_parameters - - -class IntegrationServiceEnvironmentNetworkDependency(msrest.serialization.Model): - """The azure async operation resource. - - :ivar category: The network dependency category type. Possible values include: "NotSpecified", - "AzureStorage", "AzureManagement", "AzureActiveDirectory", "SSLCertificateVerification", - "DiagnosticLogsAndMetrics", "IntegrationServiceEnvironmentConnectors", "RedisCache", - "AccessEndpoints", "RecoveryService", "SQL", "RegionalService". - :vartype category: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyCategoryType - :ivar display_name: The display name. - :vartype display_name: str - :ivar endpoints: The endpoints. - :vartype endpoints: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndpoint] - """ - - _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'endpoints': {'key': 'endpoints', 'type': '[IntegrationServiceEnvironmentNetworkEndpoint]'}, - } - - def __init__( - self, - *, - category: Optional[Union[str, "IntegrationServiceEnvironmentNetworkDependencyCategoryType"]] = None, - display_name: Optional[str] = None, - endpoints: Optional[List["IntegrationServiceEnvironmentNetworkEndpoint"]] = None, - **kwargs - ): - """ - :keyword category: The network dependency category type. Possible values include: - "NotSpecified", "AzureStorage", "AzureManagement", "AzureActiveDirectory", - "SSLCertificateVerification", "DiagnosticLogsAndMetrics", - "IntegrationServiceEnvironmentConnectors", "RedisCache", "AccessEndpoints", "RecoveryService", - "SQL", "RegionalService". - :paramtype category: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyCategoryType - :keyword display_name: The display name. - :paramtype display_name: str - :keyword endpoints: The endpoints. - :paramtype endpoints: - list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndpoint] - """ - super(IntegrationServiceEnvironmentNetworkDependency, self).__init__(**kwargs) - self.category = category - self.display_name = display_name - self.endpoints = endpoints - - -class IntegrationServiceEnvironmentNetworkDependencyHealth(msrest.serialization.Model): - """The integration service environment subnet network health. - - :ivar error: The error if any occurred during the operation. - :vartype error: ~azure.mgmt.logic.models.ExtendedErrorInfo - :ivar state: The network dependency health state. Possible values include: "NotSpecified", - "Healthy", "Unhealthy", "Unknown". - :vartype state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealthState - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ExtendedErrorInfo'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - *, - error: Optional["ExtendedErrorInfo"] = None, - state: Optional[Union[str, "IntegrationServiceEnvironmentNetworkDependencyHealthState"]] = None, - **kwargs - ): - """ - :keyword error: The error if any occurred during the operation. - :paramtype error: ~azure.mgmt.logic.models.ExtendedErrorInfo - :keyword state: The network dependency health state. Possible values include: "NotSpecified", - "Healthy", "Unhealthy", "Unknown". - :paramtype state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealthState - """ - super(IntegrationServiceEnvironmentNetworkDependencyHealth, self).__init__(**kwargs) - self.error = error - self.state = state - - -class IntegrationServiceEnvironmentNetworkEndpoint(msrest.serialization.Model): - """The network endpoint. - - :ivar accessibility: The accessibility state. Possible values include: "NotSpecified", - "Unknown", "Available", "NotAvailable". - :vartype accessibility: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState - :ivar domain_name: The domain name. - :vartype domain_name: str - :ivar ports: The ports. - :vartype ports: list[str] - """ - - _attribute_map = { - 'accessibility': {'key': 'accessibility', 'type': 'str'}, - 'domain_name': {'key': 'domainName', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[str]'}, - } - - def __init__( - self, - *, - accessibility: Optional[Union[str, "IntegrationServiceEnvironmentNetworkEndPointAccessibilityState"]] = None, - domain_name: Optional[str] = None, - ports: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword accessibility: The accessibility state. Possible values include: "NotSpecified", - "Unknown", "Available", "NotAvailable". - :paramtype accessibility: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState - :keyword domain_name: The domain name. - :paramtype domain_name: str - :keyword ports: The ports. - :paramtype ports: list[str] - """ - super(IntegrationServiceEnvironmentNetworkEndpoint, self).__init__(**kwargs) - self.accessibility = accessibility - self.domain_name = domain_name - self.ports = ports - - -class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): - """The integration service environment properties. - - :ivar 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". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :ivar state: The integration service environment state. Possible values include: - "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar integration_service_environment_id: Gets the tracking id. - :vartype integration_service_environment_id: str - :ivar endpoints_configuration: The endpoints configuration. - :vartype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :ivar network_configuration: The network configuration. - :vartype network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration - :ivar encryption_configuration: The encryption configuration. - :vartype encryption_configuration: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionConfiguration - """ - - _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'}, - 'encryption_configuration': {'key': 'encryptionConfiguration', 'type': 'IntegrationServiceEnvironmenEncryptionConfiguration'}, - } - - 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, - encryption_configuration: Optional["IntegrationServiceEnvironmenEncryptionConfiguration"] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :keyword state: The integration service environment state. Possible values include: - "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState - :keyword integration_service_environment_id: Gets the tracking id. - :paramtype integration_service_environment_id: str - :keyword endpoints_configuration: The endpoints configuration. - :paramtype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :keyword network_configuration: The network configuration. - :paramtype network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration - :keyword encryption_configuration: The encryption configuration. - :paramtype encryption_configuration: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionConfiguration - """ - 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 - self.encryption_configuration = encryption_configuration - - -class IntegrationServiceEnvironmentSku(msrest.serialization.Model): - """The integration service environment sku. - - :ivar name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :vartype name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName - :ivar capacity: The sku capacity. - :vartype capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "IntegrationServiceEnvironmentSkuName"]] = None, - capacity: Optional[int] = None, - **kwargs - ): - """ - :keyword name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :paramtype name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName - :keyword capacity: The sku capacity. - :paramtype capacity: int - """ - super(IntegrationServiceEnvironmentSku, self).__init__(**kwargs) - self.name = name - self.capacity = capacity - - -class IntegrationServiceEnvironmentSkuCapacity(msrest.serialization.Model): - """The integration service environment sku capacity. - - :ivar minimum: The minimum capacity. - :vartype minimum: int - :ivar maximum: The maximum capacity. - :vartype maximum: int - :ivar default: The default capacity. - :vartype default: int - :ivar scale_type: The sku scale type. Possible values include: "Manual", "Automatic", "None". - :vartype scale_type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuScaleType - """ - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'int'}, - 'maximum': {'key': 'maximum', 'type': 'int'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__( - self, - *, - minimum: Optional[int] = None, - maximum: Optional[int] = None, - default: Optional[int] = None, - scale_type: Optional[Union[str, "IntegrationServiceEnvironmentSkuScaleType"]] = None, - **kwargs - ): - """ - :keyword minimum: The minimum capacity. - :paramtype minimum: int - :keyword maximum: The maximum capacity. - :paramtype maximum: int - :keyword default: The default capacity. - :paramtype default: int - :keyword scale_type: The sku scale type. Possible values include: "Manual", "Automatic", - "None". - :paramtype scale_type: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuScaleType - """ - super(IntegrationServiceEnvironmentSkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class IntegrationServiceEnvironmentSkuDefinition(msrest.serialization.Model): - """The integration service environment sku definition. - - :ivar resource_type: The resource type. - :vartype resource_type: str - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinitionSku - :ivar capacity: The sku capacity. - :vartype capacity: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuCapacity - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'IntegrationServiceEnvironmentSkuDefinitionSku'}, - 'capacity': {'key': 'capacity', 'type': 'IntegrationServiceEnvironmentSkuCapacity'}, - } - - def __init__( - self, - *, - resource_type: Optional[str] = None, - sku: Optional["IntegrationServiceEnvironmentSkuDefinitionSku"] = None, - capacity: Optional["IntegrationServiceEnvironmentSkuCapacity"] = None, - **kwargs - ): - """ - :keyword resource_type: The resource type. - :paramtype resource_type: str - :keyword sku: The sku. - :paramtype sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinitionSku - :keyword capacity: The sku capacity. - :paramtype capacity: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuCapacity - """ - super(IntegrationServiceEnvironmentSkuDefinition, self).__init__(**kwargs) - self.resource_type = resource_type - self.sku = sku - self.capacity = capacity - - -class IntegrationServiceEnvironmentSkuDefinitionSku(msrest.serialization.Model): - """The sku. - - :ivar name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :vartype name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName - :ivar tier: The sku tier. - :vartype tier: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "IntegrationServiceEnvironmentSkuName"]] = None, - tier: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :paramtype name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName - :keyword tier: The sku tier. - :paramtype tier: str - """ - super(IntegrationServiceEnvironmentSkuDefinitionSku, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class IntegrationServiceEnvironmentSkuList(msrest.serialization.Model): - """The list of integration service environment skus. - - :ivar value: The list of integration service environment skus. - :vartype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinition] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationServiceEnvironmentSkuDefinition]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["IntegrationServiceEnvironmentSkuDefinition"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The list of integration service environment skus. - :paramtype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinition] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(IntegrationServiceEnvironmentSkuList, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IntegrationServiceEnvironmentSubnetNetworkHealth(msrest.serialization.Model): - """The integration service environment subnet network health. - - All required parameters must be populated in order to send to Azure. - - :ivar outbound_network_dependencies: The outbound network dependencies. - :vartype outbound_network_dependencies: - list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependency] - :ivar outbound_network_health: The integration service environment network health. - :vartype outbound_network_health: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealth - :ivar network_dependency_health_state: Required. The integration service environment network - health state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". - :vartype network_dependency_health_state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState - """ - - _validation = { - 'network_dependency_health_state': {'required': True}, - } - - _attribute_map = { - 'outbound_network_dependencies': {'key': 'outboundNetworkDependencies', 'type': '[IntegrationServiceEnvironmentNetworkDependency]'}, - 'outbound_network_health': {'key': 'outboundNetworkHealth', 'type': 'IntegrationServiceEnvironmentNetworkDependencyHealth'}, - 'network_dependency_health_state': {'key': 'networkDependencyHealthState', 'type': 'str'}, - } - - def __init__( - self, - *, - network_dependency_health_state: Union[str, "IntegrationServiceEnvironmentNetworkEndPointAccessibilityState"], - outbound_network_dependencies: Optional[List["IntegrationServiceEnvironmentNetworkDependency"]] = None, - outbound_network_health: Optional["IntegrationServiceEnvironmentNetworkDependencyHealth"] = None, - **kwargs - ): - """ - :keyword outbound_network_dependencies: The outbound network dependencies. - :paramtype outbound_network_dependencies: - list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependency] - :keyword outbound_network_health: The integration service environment network health. - :paramtype outbound_network_health: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealth - :keyword network_dependency_health_state: Required. The integration service environment network - health state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". - :paramtype network_dependency_health_state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState - """ - super(IntegrationServiceEnvironmentSubnetNetworkHealth, self).__init__(**kwargs) - self.outbound_network_dependencies = outbound_network_dependencies - self.outbound_network_health = outbound_network_health - self.network_dependency_health_state = network_dependency_health_state - - -class IpAddress(msrest.serialization.Model): - """The ip address. - - :ivar address: The address. - :vartype address: str - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - } - - def __init__( - self, - *, - address: Optional[str] = None, - **kwargs - ): - """ - :keyword address: The address. - :paramtype address: str - """ - super(IpAddress, self).__init__(**kwargs) - self.address = address - - -class IpAddressRange(msrest.serialization.Model): - """The ip address range. - - :ivar address_range: The IP address range. - :vartype address_range: str - """ - - _attribute_map = { - 'address_range': {'key': 'addressRange', 'type': 'str'}, - } - - def __init__( - self, - *, - address_range: Optional[str] = None, - **kwargs - ): - """ - :keyword address_range: The IP address range. - :paramtype address_range: str - """ - super(IpAddressRange, self).__init__(**kwargs) - self.address_range = address_range - - -class JsonSchema(msrest.serialization.Model): - """The JSON schema. - - :ivar title: The JSON title. - :vartype title: str - :ivar content: The JSON content. - :vartype content: str - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__( - self, - *, - title: Optional[str] = None, - content: Optional[str] = None, - **kwargs - ): - """ - :keyword title: The JSON title. - :paramtype title: str - :keyword content: The JSON content. - :paramtype content: str - """ - super(JsonSchema, self).__init__(**kwargs) - self.title = title - self.content = content - - -class KeyVaultKey(msrest.serialization.Model): - """The key vault key. - - :ivar kid: The key id. - :vartype kid: str - :ivar attributes: The key attributes. - :vartype attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes - """ - - _attribute_map = { - 'kid': {'key': 'kid', 'type': 'str'}, - 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, - } - - def __init__( - self, - *, - kid: Optional[str] = None, - attributes: Optional["KeyVaultKeyAttributes"] = None, - **kwargs - ): - """ - :keyword kid: The key id. - :paramtype kid: str - :keyword attributes: The key attributes. - :paramtype attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes - """ - super(KeyVaultKey, self).__init__(**kwargs) - self.kid = kid - self.attributes = attributes - - -class KeyVaultKeyAttributes(msrest.serialization.Model): - """The key attributes. - - :ivar enabled: Whether the key is enabled or not. - :vartype enabled: bool - :ivar created: When the key was created. - :vartype created: long - :ivar updated: When the key was updated. - :vartype updated: long - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'long'}, - 'updated': {'key': 'updated', 'type': 'long'}, - } - - def __init__( - self, - *, - enabled: Optional[bool] = None, - created: Optional[int] = None, - updated: Optional[int] = None, - **kwargs - ): - """ - :keyword enabled: Whether the key is enabled or not. - :paramtype enabled: bool - :keyword created: When the key was created. - :paramtype created: long - :keyword updated: When the key was updated. - :paramtype updated: long - """ - super(KeyVaultKeyAttributes, self).__init__(**kwargs) - self.enabled = enabled - self.created = created - self.updated = updated - - -class KeyVaultKeyCollection(msrest.serialization.Model): - """Collection of key vault keys. - - :ivar value: The key vault keys. - :vartype value: list[~azure.mgmt.logic.models.KeyVaultKey] - :ivar skip_token: The skip token. - :vartype skip_token: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[KeyVaultKey]'}, - 'skip_token': {'key': 'skipToken', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["KeyVaultKey"]] = None, - skip_token: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The key vault keys. - :paramtype value: list[~azure.mgmt.logic.models.KeyVaultKey] - :keyword skip_token: The skip token. - :paramtype skip_token: str - """ - super(KeyVaultKeyCollection, self).__init__(**kwargs) - self.value = value - 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. - - :ivar key_vault: Required. The key vault reference. - :vartype key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault - :ivar key_name: Required. The private key name in key vault. - :vartype key_name: str - :ivar key_version: The private key version in key vault. - :vartype 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 - ): - """ - :keyword key_vault: Required. The key vault reference. - :paramtype key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault - :keyword key_name: Required. The private key name in key vault. - :paramtype key_name: str - :keyword key_version: The private key version in key vault. - :paramtype key_version: str - """ - 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. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - """ - :keyword id: The resource id. - :paramtype id: str - """ - super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class KeyVaultReference(ResourceReference): - """The key vault reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - """ - :keyword id: The resource id. - :paramtype id: str - """ - super(KeyVaultReference, self).__init__(id=id, **kwargs) - - -class ListKeyVaultKeysDefinition(msrest.serialization.Model): - """The list key vault keys definition. - - All required parameters must be populated in order to send to Azure. - - :ivar key_vault: Required. The key vault reference. - :vartype key_vault: ~azure.mgmt.logic.models.KeyVaultReference - :ivar skip_token: The skip token. - :vartype skip_token: str - """ - - _validation = { - 'key_vault': {'required': True}, - } - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, - 'skip_token': {'key': 'skipToken', 'type': 'str'}, - } - - def __init__( - self, - *, - key_vault: "KeyVaultReference", - skip_token: Optional[str] = None, - **kwargs - ): - """ - :keyword key_vault: Required. The key vault reference. - :paramtype key_vault: ~azure.mgmt.logic.models.KeyVaultReference - :keyword skip_token: The skip token. - :paramtype skip_token: str - """ - super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) - self.key_vault = key_vault - self.skip_token = skip_token - - -class ManagedApi(Resource): - """The managed api definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar properties: The api resource properties. - :vartype properties: ~azure.mgmt.logic.models.ApiResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'ApiResourceProperties'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["ApiResourceProperties"] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword properties: The api resource properties. - :paramtype properties: ~azure.mgmt.logic.models.ApiResourceProperties - """ - super(ManagedApi, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties - - -class ManagedApiListResult(msrest.serialization.Model): - """The list of managed APIs. - - :ivar value: The managed APIs. - :vartype value: list[~azure.mgmt.logic.models.ManagedApi] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagedApi]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ManagedApi"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The managed APIs. - :paramtype value: list[~azure.mgmt.logic.models.ManagedApi] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(ManagedApiListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ManagedServiceIdentity(msrest.serialization.Model): - """Managed service identity properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Type of managed service identity. The type 'SystemAssigned' includes an - implicitly created identity. The type 'None' will remove any identities from the resource. - Possible values include: "SystemAssigned", "UserAssigned", "None". - :vartype type: str or ~azure.mgmt.logic.models.ManagedServiceIdentityType - :ivar tenant_id: Tenant of managed service identity. - :vartype tenant_id: str - :ivar principal_id: Principal Id of managed service identity. - :vartype principal_id: str - :ivar user_assigned_identities: The list of user assigned identities associated with the - resource. The user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - :vartype user_assigned_identities: dict[str, ~azure.mgmt.logic.models.UserAssignedIdentity] - """ - - _validation = { - 'type': {'required': True}, - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, - } - - def __init__( - self, - *, - type: Union[str, "ManagedServiceIdentityType"], - user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, - **kwargs - ): - """ - :keyword type: Required. Type of managed service identity. The type 'SystemAssigned' includes - an implicitly created identity. The type 'None' will remove any identities from the resource. - Possible values include: "SystemAssigned", "UserAssigned", "None". - :paramtype type: str or ~azure.mgmt.logic.models.ManagedServiceIdentityType - :keyword user_assigned_identities: The list of user assigned identities associated with the - resource. The user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - :paramtype user_assigned_identities: dict[str, ~azure.mgmt.logic.models.UserAssignedIdentity] - """ - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - self.user_assigned_identities = user_assigned_identities - - -class NetworkConfiguration(msrest.serialization.Model): - """The network configuration. - - :ivar virtual_network_address_space: Gets the virtual network address space. - :vartype virtual_network_address_space: str - :ivar access_endpoint: The access endpoint. - :vartype access_endpoint: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpoint - :ivar subnets: The subnets. - :vartype subnets: list[~azure.mgmt.logic.models.ResourceReference] - """ - - _attribute_map = { - 'virtual_network_address_space': {'key': 'virtualNetworkAddressSpace', 'type': 'str'}, - 'access_endpoint': {'key': 'accessEndpoint', 'type': 'IntegrationServiceEnvironmentAccessEndpoint'}, - 'subnets': {'key': 'subnets', 'type': '[ResourceReference]'}, - } - - def __init__( - self, - *, - virtual_network_address_space: Optional[str] = None, - access_endpoint: Optional["IntegrationServiceEnvironmentAccessEndpoint"] = None, - subnets: Optional[List["ResourceReference"]] = None, - **kwargs - ): - """ - :keyword virtual_network_address_space: Gets the virtual network address space. - :paramtype virtual_network_address_space: str - :keyword access_endpoint: The access endpoint. - :paramtype access_endpoint: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpoint - :keyword subnets: The subnets. - :paramtype subnets: list[~azure.mgmt.logic.models.ResourceReference] - """ - super(NetworkConfiguration, self).__init__(**kwargs) - self.virtual_network_address_space = virtual_network_address_space - self.access_endpoint = access_endpoint - self.subnets = subnets - - -class OpenAuthenticationAccessPolicies(msrest.serialization.Model): - """AuthenticationPolicy of type Open. - - :ivar policies: Open authentication policies. - :vartype policies: dict[str, ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicy] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '{OpenAuthenticationAccessPolicy}'}, - } - - def __init__( - self, - *, - policies: Optional[Dict[str, "OpenAuthenticationAccessPolicy"]] = None, - **kwargs - ): - """ - :keyword policies: Open authentication policies. - :paramtype policies: dict[str, ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicy] - """ - super(OpenAuthenticationAccessPolicies, self).__init__(**kwargs) - self.policies = policies - - -class OpenAuthenticationAccessPolicy(msrest.serialization.Model): - """Open authentication access policy defined by user. - - :ivar type: Type of provider for OAuth. Possible values include: "AAD". - :vartype type: str or ~azure.mgmt.logic.models.OpenAuthenticationProviderType - :ivar claims: The access policy claims. - :vartype claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': '[OpenAuthenticationPolicyClaim]'}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "OpenAuthenticationProviderType"]] = None, - claims: Optional[List["OpenAuthenticationPolicyClaim"]] = None, - **kwargs - ): - """ - :keyword type: Type of provider for OAuth. Possible values include: "AAD". - :paramtype type: str or ~azure.mgmt.logic.models.OpenAuthenticationProviderType - :keyword claims: The access policy claims. - :paramtype claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] - """ - super(OpenAuthenticationAccessPolicy, self).__init__(**kwargs) - self.type = type - self.claims = claims - - -class OpenAuthenticationPolicyClaim(msrest.serialization.Model): - """Open authentication policy claim. - - :ivar name: The name of the claim. - :vartype name: str - :ivar value: The value of the claim. - :vartype value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the claim. - :paramtype name: str - :keyword value: The value of the claim. - :paramtype value: str - """ - super(OpenAuthenticationPolicyClaim, self).__init__(**kwargs) - self.name = name - self.value = value - - -class Operation(msrest.serialization.Model): - """Logic REST API operation. - - :ivar origin: Operation: origin. - :vartype origin: str - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.logic.models.OperationDisplay - :ivar properties: The properties. - :vartype properties: any - """ - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__( - self, - *, - origin: Optional[str] = None, - name: Optional[str] = None, - display: Optional["OperationDisplay"] = None, - properties: Optional[Any] = None, - **kwargs - ): - """ - :keyword origin: Operation: origin. - :paramtype origin: str - :keyword name: Operation name: {provider}/{resource}/{operation}. - :paramtype name: str - :keyword display: The object that represents the operation. - :paramtype display: ~azure.mgmt.logic.models.OperationDisplay - :keyword properties: The properties. - :paramtype properties: any - """ - super(Operation, self).__init__(**kwargs) - self.origin = origin - self.name = name - self.display = display - self.properties = properties - - -class OperationDisplay(msrest.serialization.Model): - """The object that represents the operation. - - :ivar provider: Service provider: Microsoft.Logic. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: Profile, endpoint, etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - :ivar description: Operation: description. - :vartype description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - resource: Optional[str] = None, - operation: Optional[str] = None, - description: Optional[str] = None, - **kwargs - ): - """ - :keyword provider: Service provider: Microsoft.Logic. - :paramtype provider: str - :keyword resource: Resource on which the operation is performed: Profile, endpoint, etc. - :paramtype resource: str - :keyword operation: Operation type: Read, write, delete, etc. - :paramtype operation: str - :keyword description: Operation: description. - :paramtype description: str - """ - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -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. - - :ivar value: List of Logic operations supported by the Logic resource provider. - :vartype value: list[~azure.mgmt.logic.models.Operation] - :ivar next_link: URL to get the next set of operation list results if there are any. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Operation"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: List of Logic operations supported by the Logic resource provider. - :paramtype value: list[~azure.mgmt.logic.models.Operation] - :keyword next_link: URL to get the next set of operation list results if there are any. - :paramtype next_link: str - """ - super(OperationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class OperationResultProperties(msrest.serialization.Model): - """The run operation result properties. - - :ivar start_time: The start time of the workflow scope repetition. - :vartype start_time: ~datetime.datetime - :ivar end_time: The end time of the workflow scope repetition. - :vartype end_time: ~datetime.datetime - :ivar correlation: The correlation properties. - :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :ivar status: The status of the workflow scope repetition. 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 - :ivar code: The workflow scope repetition code. - :vartype code: str - :ivar error: Anything. - :vartype error: any - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - correlation: Optional["RunActionCorrelation"] = None, - status: Optional[Union[str, "WorkflowStatus"]] = None, - code: Optional[str] = None, - error: Optional[Any] = None, - **kwargs - ): - """ - :keyword start_time: The start time of the workflow scope repetition. - :paramtype start_time: ~datetime.datetime - :keyword end_time: The end time of the workflow scope repetition. - :paramtype end_time: ~datetime.datetime - :keyword correlation: The correlation properties. - :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :keyword status: The status of the workflow scope repetition. Possible values include: - "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", - "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :keyword code: The workflow scope repetition code. - :paramtype code: str - :keyword error: Anything. - :paramtype error: any - """ - super(OperationResultProperties, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.correlation = correlation - self.status = status - self.code = code - self.error = error - - -class OperationResult(OperationResultProperties): - """The operation result definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar start_time: The start time of the workflow scope repetition. - :vartype start_time: ~datetime.datetime - :ivar end_time: The end time of the workflow scope repetition. - :vartype end_time: ~datetime.datetime - :ivar correlation: The correlation properties. - :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :ivar status: The status of the workflow scope repetition. 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 - :ivar code: The workflow scope repetition code. - :vartype code: str - :ivar error: Anything. - :vartype error: any - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: any - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: any - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: any - :ivar retry_history: Gets the retry histories. - :vartype retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :ivar iteration_count: - :vartype iteration_count: int - """ - - _validation = { - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - correlation: Optional["RunActionCorrelation"] = None, - status: Optional[Union[str, "WorkflowStatus"]] = None, - code: Optional[str] = None, - error: Optional[Any] = None, - retry_history: Optional[List["RetryHistory"]] = None, - iteration_count: Optional[int] = None, - **kwargs - ): - """ - :keyword start_time: The start time of the workflow scope repetition. - :paramtype start_time: ~datetime.datetime - :keyword end_time: The end time of the workflow scope repetition. - :paramtype end_time: ~datetime.datetime - :keyword correlation: The correlation properties. - :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :keyword status: The status of the workflow scope repetition. Possible values include: - "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", - "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :keyword code: The workflow scope repetition code. - :paramtype code: str - :keyword error: Anything. - :paramtype error: any - :keyword retry_history: Gets the retry histories. - :paramtype retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :keyword iteration_count: - :paramtype iteration_count: int - """ - super(OperationResult, self).__init__(start_time=start_time, end_time=end_time, correlation=correlation, status=status, code=code, error=error, **kwargs) - self.tracking_id = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = retry_history - self.iteration_count = iteration_count - - -class PartnerContent(msrest.serialization.Model): - """The integration account partner content. - - :ivar b2_b: The B2B partner content. - :vartype b2_b: ~azure.mgmt.logic.models.B2BPartnerContent - """ - - _attribute_map = { - 'b2_b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, - } - - def __init__( - self, - *, - b2_b: Optional["B2BPartnerContent"] = None, - **kwargs - ): - """ - :keyword b2_b: The B2B partner content. - :paramtype b2_b: ~azure.mgmt.logic.models.B2BPartnerContent - """ - super(PartnerContent, self).__init__(**kwargs) - self.b2_b = b2_b - - -class RecurrenceSchedule(msrest.serialization.Model): - """The recurrence schedule. - - :ivar minutes: The minutes. - :vartype minutes: list[int] - :ivar hours: The hours. - :vartype hours: list[int] - :ivar week_days: The days of the week. - :vartype week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] - :ivar month_days: The month days. - :vartype month_days: list[int] - :ivar monthly_occurrences: The monthly occurrences. - :vartype 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 - ): - """ - :keyword minutes: The minutes. - :paramtype minutes: list[int] - :keyword hours: The hours. - :paramtype hours: list[int] - :keyword week_days: The days of the week. - :paramtype week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] - :keyword month_days: The month days. - :paramtype month_days: list[int] - :keyword monthly_occurrences: The monthly occurrences. - :paramtype monthly_occurrences: list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] - """ - 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. - - :ivar day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", - "Wednesday", "Thursday", "Friday", "Saturday". - :vartype day: str or ~azure.mgmt.logic.models.DayOfWeek - :ivar occurrence: The occurrence. - :vartype occurrence: int - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'occurrence': {'key': 'occurrence', 'type': 'int'}, - } - - def __init__( - self, - *, - day: Optional[Union[str, "DayOfWeek"]] = None, - occurrence: Optional[int] = None, - **kwargs - ): - """ - :keyword day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", - "Wednesday", "Thursday", "Friday", "Saturday". - :paramtype day: str or ~azure.mgmt.logic.models.DayOfWeek - :keyword occurrence: The occurrence. - :paramtype occurrence: int - """ - super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) - self.day = day - self.occurrence = occurrence - - -class RegenerateActionParameter(msrest.serialization.Model): - """The access key regenerate action content. - - :ivar key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :vartype key_type: str or ~azure.mgmt.logic.models.KeyType - """ - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__( - self, - *, - key_type: Optional[Union[str, "KeyType"]] = None, - **kwargs - ): - """ - :keyword key_type: The key type. Possible values include: "NotSpecified", "Primary", - "Secondary". - :paramtype key_type: str or ~azure.mgmt.logic.models.KeyType - """ - super(RegenerateActionParameter, self).__init__(**kwargs) - self.key_type = key_type - - -class RepetitionIndex(msrest.serialization.Model): - """The workflow run action repetition index. - - All required parameters must be populated in order to send to Azure. - - :ivar scope_name: The scope. - :vartype scope_name: str - :ivar item_index: Required. The index. - :vartype item_index: int - """ - - _validation = { - 'item_index': {'required': True}, - } - - _attribute_map = { - 'scope_name': {'key': 'scopeName', 'type': 'str'}, - 'item_index': {'key': 'itemIndex', 'type': 'int'}, - } - - def __init__( - self, - *, - item_index: int, - scope_name: Optional[str] = None, - **kwargs - ): - """ - :keyword scope_name: The scope. - :paramtype scope_name: str - :keyword item_index: Required. The index. - :paramtype item_index: int - """ - super(RepetitionIndex, self).__init__(**kwargs) - self.scope_name = scope_name - self.item_index = item_index - - -class Request(msrest.serialization.Model): - """A request. - - :ivar headers: A list of all the headers attached to the request. - :vartype headers: any - :ivar uri: The destination for the request. - :vartype uri: str - :ivar method: The HTTP method used for the request. - :vartype method: str - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': 'object'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - } - - def __init__( - self, - *, - headers: Optional[Any] = None, - uri: Optional[str] = None, - method: Optional[str] = None, - **kwargs - ): - """ - :keyword headers: A list of all the headers attached to the request. - :paramtype headers: any - :keyword uri: The destination for the request. - :paramtype uri: str - :keyword method: The HTTP method used for the request. - :paramtype method: str - """ - super(Request, self).__init__(**kwargs) - self.headers = headers - self.uri = uri - self.method = method - - -class RequestHistory(Resource): - """The request history. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar properties: The request history properties. - :vartype properties: ~azure.mgmt.logic.models.RequestHistoryProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'RequestHistoryProperties'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["RequestHistoryProperties"] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword properties: The request history properties. - :paramtype properties: ~azure.mgmt.logic.models.RequestHistoryProperties - """ - super(RequestHistory, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties - - -class RequestHistoryListResult(msrest.serialization.Model): - """The list of workflow request histories. - - :ivar value: A list of workflow request histories. - :vartype value: list[~azure.mgmt.logic.models.RequestHistory] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RequestHistory]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RequestHistory"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: A list of workflow request histories. - :paramtype value: list[~azure.mgmt.logic.models.RequestHistory] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(RequestHistoryListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RequestHistoryProperties(msrest.serialization.Model): - """The request history. - - :ivar start_time: The time the request started. - :vartype start_time: ~datetime.datetime - :ivar end_time: The time the request ended. - :vartype end_time: ~datetime.datetime - :ivar request: The request. - :vartype request: ~azure.mgmt.logic.models.Request - :ivar response: The response. - :vartype response: ~azure.mgmt.logic.models.Response - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'request': {'key': 'request', 'type': 'Request'}, - 'response': {'key': 'response', 'type': 'Response'}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - request: Optional["Request"] = None, - response: Optional["Response"] = None, - **kwargs - ): - """ - :keyword start_time: The time the request started. - :paramtype start_time: ~datetime.datetime - :keyword end_time: The time the request ended. - :paramtype end_time: ~datetime.datetime - :keyword request: The request. - :paramtype request: ~azure.mgmt.logic.models.Request - :keyword response: The response. - :paramtype response: ~azure.mgmt.logic.models.Response - """ - super(RequestHistoryProperties, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.request = request - self.response = response - - -class Response(msrest.serialization.Model): - """A response. - - :ivar headers: A list of all the headers attached to the response. - :vartype headers: any - :ivar status_code: The status code of the response. - :vartype status_code: int - :ivar body_link: Details on the location of the body content. - :vartype body_link: ~azure.mgmt.logic.models.ContentLink - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': 'object'}, - 'status_code': {'key': 'statusCode', 'type': 'int'}, - 'body_link': {'key': 'bodyLink', 'type': 'ContentLink'}, - } - - def __init__( - self, - *, - headers: Optional[Any] = None, - status_code: Optional[int] = None, - body_link: Optional["ContentLink"] = None, - **kwargs - ): - """ - :keyword headers: A list of all the headers attached to the response. - :paramtype headers: any - :keyword status_code: The status code of the response. - :paramtype status_code: int - :keyword body_link: Details on the location of the body content. - :paramtype body_link: ~azure.mgmt.logic.models.ContentLink - """ - super(Response, self).__init__(**kwargs) - self.headers = headers - self.status_code = status_code - self.body_link = body_link - - -class RetryHistory(msrest.serialization.Model): - """The retry history. - - :ivar start_time: Gets the start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: Gets the end time. - :vartype end_time: ~datetime.datetime - :ivar code: Gets the status code. - :vartype code: str - :ivar client_request_id: Gets the client request Id. - :vartype client_request_id: str - :ivar service_request_id: Gets the service request Id. - :vartype service_request_id: str - :ivar error: Gets the error response. - :vartype error: ~azure.mgmt.logic.models.ErrorResponse - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'service_request_id': {'key': 'serviceRequestId', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - code: Optional[str] = None, - client_request_id: Optional[str] = None, - service_request_id: Optional[str] = None, - error: Optional["ErrorResponse"] = None, - **kwargs - ): - """ - :keyword start_time: Gets the start time. - :paramtype start_time: ~datetime.datetime - :keyword end_time: Gets the end time. - :paramtype end_time: ~datetime.datetime - :keyword code: Gets the status code. - :paramtype code: str - :keyword client_request_id: Gets the client request Id. - :paramtype client_request_id: str - :keyword service_request_id: Gets the service request Id. - :paramtype service_request_id: str - :keyword error: Gets the error response. - :paramtype error: ~azure.mgmt.logic.models.ErrorResponse - """ - super(RetryHistory, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.code = code - self.client_request_id = client_request_id - self.service_request_id = service_request_id - self.error = error - - -class RunCorrelation(msrest.serialization.Model): - """The correlation properties. - - :ivar client_tracking_id: The client tracking identifier. - :vartype client_tracking_id: str - :ivar client_keywords: The client keywords. - :vartype client_keywords: list[str] - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, - } - - def __init__( - self, - *, - client_tracking_id: Optional[str] = None, - client_keywords: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword client_tracking_id: The client tracking identifier. - :paramtype client_tracking_id: str - :keyword client_keywords: The client keywords. - :paramtype client_keywords: list[str] - """ - super(RunCorrelation, self).__init__(**kwargs) - self.client_tracking_id = client_tracking_id - self.client_keywords = client_keywords - - -class RunActionCorrelation(RunCorrelation): - """The workflow run action correlation properties. - - :ivar client_tracking_id: The client tracking identifier. - :vartype client_tracking_id: str - :ivar client_keywords: The client keywords. - :vartype client_keywords: list[str] - :ivar action_tracking_id: The action tracking identifier. - :vartype action_tracking_id: str - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, - 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, - } - - def __init__( - self, - *, - client_tracking_id: Optional[str] = None, - client_keywords: Optional[List[str]] = None, - action_tracking_id: Optional[str] = None, - **kwargs - ): - """ - :keyword client_tracking_id: The client tracking identifier. - :paramtype client_tracking_id: str - :keyword client_keywords: The client keywords. - :paramtype client_keywords: list[str] - :keyword action_tracking_id: The action tracking identifier. - :paramtype action_tracking_id: str - """ - super(RunActionCorrelation, self).__init__(client_tracking_id=client_tracking_id, client_keywords=client_keywords, **kwargs) - self.action_tracking_id = action_tracking_id - - -class SetTriggerStateActionDefinition(msrest.serialization.Model): - """The set trigger state action definition. - - All required parameters must be populated in order to send to Azure. - - :ivar source: Required. The source. - :vartype source: ~azure.mgmt.logic.models.WorkflowTriggerReference - """ - - _validation = { - 'source': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'WorkflowTriggerReference'}, - } - - def __init__( - self, - *, - source: "WorkflowTriggerReference", - **kwargs - ): - """ - :keyword source: Required. The source. - :paramtype source: ~azure.mgmt.logic.models.WorkflowTriggerReference - """ - super(SetTriggerStateActionDefinition, self).__init__(**kwargs) - self.source = source - - -class Sku(msrest.serialization.Model): - """The sku type. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name. Possible values include: "NotSpecified", "Free", "Shared", - "Basic", "Standard", "Premium". - :vartype name: str or ~azure.mgmt.logic.models.SkuName - :ivar plan: The reference to plan. - :vartype plan: ~azure.mgmt.logic.models.ResourceReference - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'ResourceReference'}, - } - - def __init__( - self, - *, - name: Union[str, "SkuName"], - plan: Optional["ResourceReference"] = None, - **kwargs - ): - """ - :keyword name: Required. The name. Possible values include: "NotSpecified", "Free", "Shared", - "Basic", "Standard", "Premium". - :paramtype name: str or ~azure.mgmt.logic.models.SkuName - :keyword plan: The reference to plan. - :paramtype plan: ~azure.mgmt.logic.models.ResourceReference - """ - super(Sku, self).__init__(**kwargs) - self.name = name - self.plan = plan - - -class SubResource(msrest.serialization.Model): - """The sub resource type. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SubResource, self).__init__(**kwargs) - self.id = None - - -class SwaggerCustomDynamicList(msrest.serialization.Model): - """The swagger custom dynamic list. - - :ivar operation_id: The operation id to fetch dynamic schema. - :vartype operation_id: str - :ivar built_in_operation: The built in operation. - :vartype built_in_operation: str - :ivar items_path: The path to a response property (relative to the response object, not the - response body) which contains an array of dynamic value items. - :vartype items_path: str - :ivar item_value_path: The path to a property which defines the value which should be used. - :vartype item_value_path: str - :ivar item_title_path: The path to an item property which defines the display name of the item. - :vartype item_title_path: str - :ivar parameters: The parameters. - :vartype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] - """ - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'built_in_operation': {'key': 'builtInOperation', 'type': 'str'}, - 'items_path': {'key': 'itemsPath', 'type': 'str'}, - 'item_value_path': {'key': 'itemValuePath', 'type': 'str'}, - 'item_title_path': {'key': 'itemTitlePath', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{SwaggerCustomDynamicProperties}'}, - } - - def __init__( - self, - *, - operation_id: Optional[str] = None, - built_in_operation: Optional[str] = None, - items_path: Optional[str] = None, - item_value_path: Optional[str] = None, - item_title_path: Optional[str] = None, - parameters: Optional[Dict[str, "SwaggerCustomDynamicProperties"]] = None, - **kwargs - ): - """ - :keyword operation_id: The operation id to fetch dynamic schema. - :paramtype operation_id: str - :keyword built_in_operation: The built in operation. - :paramtype built_in_operation: str - :keyword items_path: The path to a response property (relative to the response object, not the - response body) which contains an array of dynamic value items. - :paramtype items_path: str - :keyword item_value_path: The path to a property which defines the value which should be used. - :paramtype item_value_path: str - :keyword item_title_path: The path to an item property which defines the display name of the - item. - :paramtype item_title_path: str - :keyword parameters: The parameters. - :paramtype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] - """ - super(SwaggerCustomDynamicList, self).__init__(**kwargs) - self.operation_id = operation_id - self.built_in_operation = built_in_operation - self.items_path = items_path - self.item_value_path = item_value_path - self.item_title_path = item_title_path - self.parameters = parameters - - -class SwaggerCustomDynamicProperties(msrest.serialization.Model): - """The swagger custom dynamic properties. - - :ivar operation_id: The operation id to fetch dynamic schema. - :vartype operation_id: str - :ivar value_path: Json pointer to the dynamic schema on the response body. - :vartype value_path: str - :ivar parameters: The operation parameters. - :vartype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] - """ - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'value_path': {'key': 'valuePath', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{SwaggerCustomDynamicProperties}'}, - } - - def __init__( - self, - *, - operation_id: Optional[str] = None, - value_path: Optional[str] = None, - parameters: Optional[Dict[str, "SwaggerCustomDynamicProperties"]] = None, - **kwargs - ): - """ - :keyword operation_id: The operation id to fetch dynamic schema. - :paramtype operation_id: str - :keyword value_path: Json pointer to the dynamic schema on the response body. - :paramtype value_path: str - :keyword parameters: The operation parameters. - :paramtype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] - """ - super(SwaggerCustomDynamicProperties, self).__init__(**kwargs) - self.operation_id = operation_id - self.value_path = value_path - self.parameters = parameters - - -class SwaggerCustomDynamicSchema(msrest.serialization.Model): - """The swagger custom dynamic schema. - - :ivar operation_id: The operation id to fetch dynamic schema. - :vartype operation_id: str - :ivar value_path: Json pointer to the dynamic schema on the response body. - :vartype value_path: str - :ivar parameters: The operation parameters. - :vartype parameters: dict[str, any] - """ - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'value_path': {'key': 'valuePath', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - def __init__( - self, - *, - operation_id: Optional[str] = None, - value_path: Optional[str] = None, - parameters: Optional[Dict[str, Any]] = None, - **kwargs - ): - """ - :keyword operation_id: The operation id to fetch dynamic schema. - :paramtype operation_id: str - :keyword value_path: Json pointer to the dynamic schema on the response body. - :paramtype value_path: str - :keyword parameters: The operation parameters. - :paramtype parameters: dict[str, any] - """ - super(SwaggerCustomDynamicSchema, self).__init__(**kwargs) - self.operation_id = operation_id - self.value_path = value_path - self.parameters = parameters - - -class SwaggerCustomDynamicTree(msrest.serialization.Model): - """The swagger custom dynamic tree. - - :ivar settings: The tree settings. - :vartype settings: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeSettings - :ivar open: The tree on-open configuration. - :vartype open: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand - :ivar browse: The tree on-browse configuration. - :vartype browse: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand - """ - - _attribute_map = { - 'settings': {'key': 'settings', 'type': 'SwaggerCustomDynamicTreeSettings'}, - 'open': {'key': 'open', 'type': 'SwaggerCustomDynamicTreeCommand'}, - 'browse': {'key': 'browse', 'type': 'SwaggerCustomDynamicTreeCommand'}, - } - - def __init__( - self, - *, - settings: Optional["SwaggerCustomDynamicTreeSettings"] = None, - open: Optional["SwaggerCustomDynamicTreeCommand"] = None, - browse: Optional["SwaggerCustomDynamicTreeCommand"] = None, - **kwargs - ): - """ - :keyword settings: The tree settings. - :paramtype settings: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeSettings - :keyword open: The tree on-open configuration. - :paramtype open: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand - :keyword browse: The tree on-browse configuration. - :paramtype browse: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand - """ - super(SwaggerCustomDynamicTree, self).__init__(**kwargs) - self.settings = settings - self.open = open - self.browse = browse - - -class SwaggerCustomDynamicTreeCommand(msrest.serialization.Model): - """The swagger tree command. - - :ivar operation_id: The path to an item property which defines the display name of the item. - :vartype operation_id: str - :ivar items_path: The path to an item property which defines the display name of the item. - :vartype items_path: str - :ivar item_value_path: The path to an item property which defines the display name of the item. - :vartype item_value_path: str - :ivar item_title_path: The path to an item property which defines the display name of the item. - :vartype item_title_path: str - :ivar item_full_title_path: The path to an item property which defines the display name of the - item. - :vartype item_full_title_path: str - :ivar item_is_parent: The path to an item property which defines the display name of the item. - :vartype item_is_parent: str - :ivar selectable_filter: The path to an item property which defines the display name of the - item. - :vartype selectable_filter: str - :ivar parameters: Dictionary of :code:``. - :vartype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeParameter] - """ - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'items_path': {'key': 'itemsPath', 'type': 'str'}, - 'item_value_path': {'key': 'itemValuePath', 'type': 'str'}, - 'item_title_path': {'key': 'itemTitlePath', 'type': 'str'}, - 'item_full_title_path': {'key': 'itemFullTitlePath', 'type': 'str'}, - 'item_is_parent': {'key': 'itemIsParent', 'type': 'str'}, - 'selectable_filter': {'key': 'selectableFilter', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{SwaggerCustomDynamicTreeParameter}'}, - } - - def __init__( - self, - *, - operation_id: Optional[str] = None, - items_path: Optional[str] = None, - item_value_path: Optional[str] = None, - item_title_path: Optional[str] = None, - item_full_title_path: Optional[str] = None, - item_is_parent: Optional[str] = None, - selectable_filter: Optional[str] = None, - parameters: Optional[Dict[str, "SwaggerCustomDynamicTreeParameter"]] = None, - **kwargs - ): - """ - :keyword operation_id: The path to an item property which defines the display name of the item. - :paramtype operation_id: str - :keyword items_path: The path to an item property which defines the display name of the item. - :paramtype items_path: str - :keyword item_value_path: The path to an item property which defines the display name of the - item. - :paramtype item_value_path: str - :keyword item_title_path: The path to an item property which defines the display name of the - item. - :paramtype item_title_path: str - :keyword item_full_title_path: The path to an item property which defines the display name of - the item. - :paramtype item_full_title_path: str - :keyword item_is_parent: The path to an item property which defines the display name of the - item. - :paramtype item_is_parent: str - :keyword selectable_filter: The path to an item property which defines the display name of the - item. - :paramtype selectable_filter: str - :keyword parameters: Dictionary of :code:``. - :paramtype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeParameter] - """ - super(SwaggerCustomDynamicTreeCommand, self).__init__(**kwargs) - self.operation_id = operation_id - self.items_path = items_path - self.item_value_path = item_value_path - self.item_title_path = item_title_path - self.item_full_title_path = item_full_title_path - self.item_is_parent = item_is_parent - self.selectable_filter = selectable_filter - self.parameters = parameters - - -class SwaggerCustomDynamicTreeParameter(msrest.serialization.Model): - """The swagger custom dynamic tree parameter. - - :ivar selected_item_value_path: Gets or sets a path to a property in the currently selected - item to pass as a value to a parameter for the given operation. - :vartype selected_item_value_path: str - :ivar value: The parameter value. - :vartype value: any - :ivar parameter_reference: The parameter reference. - :vartype parameter_reference: str - :ivar required: Indicates whether the parameter is required. - :vartype required: bool - """ - - _attribute_map = { - 'selected_item_value_path': {'key': 'selectedItemValuePath', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'parameter_reference': {'key': 'parameterReference', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__( - self, - *, - selected_item_value_path: Optional[str] = None, - value: Optional[Any] = None, - parameter_reference: Optional[str] = None, - required: Optional[bool] = None, - **kwargs - ): - """ - :keyword selected_item_value_path: Gets or sets a path to a property in the currently selected - item to pass as a value to a parameter for the given operation. - :paramtype selected_item_value_path: str - :keyword value: The parameter value. - :paramtype value: any - :keyword parameter_reference: The parameter reference. - :paramtype parameter_reference: str - :keyword required: Indicates whether the parameter is required. - :paramtype required: bool - """ - super(SwaggerCustomDynamicTreeParameter, self).__init__(**kwargs) - self.selected_item_value_path = selected_item_value_path - self.value = value - self.parameter_reference = parameter_reference - self.required = required - - -class SwaggerCustomDynamicTreeSettings(msrest.serialization.Model): - """The swagger custom dynamic tree settings. - - :ivar can_select_parent_nodes: Indicates whether parent nodes can be selected. - :vartype can_select_parent_nodes: bool - :ivar can_select_leaf_nodes: Indicates whether leaf nodes can be selected. - :vartype can_select_leaf_nodes: bool - """ - - _attribute_map = { - 'can_select_parent_nodes': {'key': 'CanSelectParentNodes', 'type': 'bool'}, - 'can_select_leaf_nodes': {'key': 'CanSelectLeafNodes', 'type': 'bool'}, - } - - def __init__( - self, - *, - can_select_parent_nodes: Optional[bool] = None, - can_select_leaf_nodes: Optional[bool] = None, - **kwargs - ): - """ - :keyword can_select_parent_nodes: Indicates whether parent nodes can be selected. - :paramtype can_select_parent_nodes: bool - :keyword can_select_leaf_nodes: Indicates whether leaf nodes can be selected. - :paramtype can_select_leaf_nodes: bool - """ - super(SwaggerCustomDynamicTreeSettings, self).__init__(**kwargs) - self.can_select_parent_nodes = can_select_parent_nodes - self.can_select_leaf_nodes = can_select_leaf_nodes - - -class SwaggerExternalDocumentation(msrest.serialization.Model): - """The swagger external documentation. - - :ivar description: The document description. - :vartype description: str - :ivar uri: The documentation Uri. - :vartype uri: str - :ivar extensions: The vendor extensions. - :vartype extensions: dict[str, any] - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'extensions': {'key': 'extensions', 'type': '{object}'}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - uri: Optional[str] = None, - extensions: Optional[Dict[str, Any]] = None, - **kwargs - ): - """ - :keyword description: The document description. - :paramtype description: str - :keyword uri: The documentation Uri. - :paramtype uri: str - :keyword extensions: The vendor extensions. - :paramtype extensions: dict[str, any] - """ - super(SwaggerExternalDocumentation, self).__init__(**kwargs) - self.description = description - self.uri = uri - self.extensions = extensions - - -class SwaggerSchema(msrest.serialization.Model): - """The swagger schema. - - :ivar ref: The reference. - :vartype ref: str - :ivar type: The type. Possible values include: "String", "Number", "Integer", "Boolean", - "Array", "File", "Object", "Null". - :vartype type: str or ~azure.mgmt.logic.models.SwaggerSchemaType - :ivar title: The title. - :vartype title: str - :ivar items: The items schema. - :vartype items: ~azure.mgmt.logic.models.SwaggerSchema - :ivar properties: The object properties. - :vartype properties: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] - :ivar additional_properties: The additional properties. - :vartype additional_properties: any - :ivar required: The object required properties. - :vartype required: list[str] - :ivar max_properties: The maximum number of allowed properties. - :vartype max_properties: int - :ivar min_properties: The minimum number of allowed properties. - :vartype min_properties: int - :ivar all_of: The schemas which must pass validation when this schema is used. - :vartype all_of: list[~azure.mgmt.logic.models.SwaggerSchema] - :ivar discriminator: The discriminator. - :vartype discriminator: str - :ivar read_only: Indicates whether this property must be present in the a request. - :vartype read_only: bool - :ivar xml: The xml representation format for a property. - :vartype xml: ~azure.mgmt.logic.models.SwaggerXml - :ivar external_docs: The external documentation. - :vartype external_docs: ~azure.mgmt.logic.models.SwaggerExternalDocumentation - :ivar example: The example value. - :vartype example: any - :ivar notification_url_extension: Indicates the notification url extension. If this is set, the - property's value should be a callback url for a webhook. - :vartype notification_url_extension: bool - :ivar dynamic_schema_old: The dynamic schema configuration. - :vartype dynamic_schema_old: ~azure.mgmt.logic.models.SwaggerCustomDynamicSchema - :ivar dynamic_schema_new: The dynamic schema configuration. - :vartype dynamic_schema_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties - :ivar dynamic_list_new: The dynamic list. - :vartype dynamic_list_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicList - :ivar dynamic_tree: The dynamic values tree configuration. - :vartype dynamic_tree: ~azure.mgmt.logic.models.SwaggerCustomDynamicTree - """ - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'title', 'type': 'str'}, - 'items': {'key': 'items', 'type': 'SwaggerSchema'}, - 'properties': {'key': 'properties', 'type': '{SwaggerSchema}'}, - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - 'required': {'key': 'required', 'type': '[str]'}, - 'max_properties': {'key': 'maxProperties', 'type': 'int'}, - 'min_properties': {'key': 'minProperties', 'type': 'int'}, - 'all_of': {'key': 'allOf', 'type': '[SwaggerSchema]'}, - 'discriminator': {'key': 'discriminator', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'xml': {'key': 'xml', 'type': 'SwaggerXml'}, - 'external_docs': {'key': 'externalDocs', 'type': 'SwaggerExternalDocumentation'}, - 'example': {'key': 'example', 'type': 'object'}, - 'notification_url_extension': {'key': 'notificationUrlExtension', 'type': 'bool'}, - 'dynamic_schema_old': {'key': 'dynamicSchemaOld', 'type': 'SwaggerCustomDynamicSchema'}, - 'dynamic_schema_new': {'key': 'dynamicSchemaNew', 'type': 'SwaggerCustomDynamicProperties'}, - 'dynamic_list_new': {'key': 'dynamicListNew', 'type': 'SwaggerCustomDynamicList'}, - 'dynamic_tree': {'key': 'dynamicTree', 'type': 'SwaggerCustomDynamicTree'}, - } - - def __init__( - self, - *, - ref: Optional[str] = None, - type: Optional[Union[str, "SwaggerSchemaType"]] = None, - title: Optional[str] = None, - items: Optional["SwaggerSchema"] = None, - properties: Optional[Dict[str, "SwaggerSchema"]] = None, - additional_properties: Optional[Any] = None, - required: Optional[List[str]] = None, - max_properties: Optional[int] = None, - min_properties: Optional[int] = None, - all_of: Optional[List["SwaggerSchema"]] = None, - discriminator: Optional[str] = None, - read_only: Optional[bool] = None, - xml: Optional["SwaggerXml"] = None, - external_docs: Optional["SwaggerExternalDocumentation"] = None, - example: Optional[Any] = None, - notification_url_extension: Optional[bool] = None, - dynamic_schema_old: Optional["SwaggerCustomDynamicSchema"] = None, - dynamic_schema_new: Optional["SwaggerCustomDynamicProperties"] = None, - dynamic_list_new: Optional["SwaggerCustomDynamicList"] = None, - dynamic_tree: Optional["SwaggerCustomDynamicTree"] = None, - **kwargs - ): - """ - :keyword ref: The reference. - :paramtype ref: str - :keyword type: The type. Possible values include: "String", "Number", "Integer", "Boolean", - "Array", "File", "Object", "Null". - :paramtype type: str or ~azure.mgmt.logic.models.SwaggerSchemaType - :keyword title: The title. - :paramtype title: str - :keyword items: The items schema. - :paramtype items: ~azure.mgmt.logic.models.SwaggerSchema - :keyword properties: The object properties. - :paramtype properties: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] - :keyword additional_properties: The additional properties. - :paramtype additional_properties: any - :keyword required: The object required properties. - :paramtype required: list[str] - :keyword max_properties: The maximum number of allowed properties. - :paramtype max_properties: int - :keyword min_properties: The minimum number of allowed properties. - :paramtype min_properties: int - :keyword all_of: The schemas which must pass validation when this schema is used. - :paramtype all_of: list[~azure.mgmt.logic.models.SwaggerSchema] - :keyword discriminator: The discriminator. - :paramtype discriminator: str - :keyword read_only: Indicates whether this property must be present in the a request. - :paramtype read_only: bool - :keyword xml: The xml representation format for a property. - :paramtype xml: ~azure.mgmt.logic.models.SwaggerXml - :keyword external_docs: The external documentation. - :paramtype external_docs: ~azure.mgmt.logic.models.SwaggerExternalDocumentation - :keyword example: The example value. - :paramtype example: any - :keyword notification_url_extension: Indicates the notification url extension. If this is set, - the property's value should be a callback url for a webhook. - :paramtype notification_url_extension: bool - :keyword dynamic_schema_old: The dynamic schema configuration. - :paramtype dynamic_schema_old: ~azure.mgmt.logic.models.SwaggerCustomDynamicSchema - :keyword dynamic_schema_new: The dynamic schema configuration. - :paramtype dynamic_schema_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties - :keyword dynamic_list_new: The dynamic list. - :paramtype dynamic_list_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicList - :keyword dynamic_tree: The dynamic values tree configuration. - :paramtype dynamic_tree: ~azure.mgmt.logic.models.SwaggerCustomDynamicTree - """ - super(SwaggerSchema, self).__init__(**kwargs) - self.ref = ref - self.type = type - self.title = title - self.items = items - self.properties = properties - self.additional_properties = additional_properties - self.required = required - self.max_properties = max_properties - self.min_properties = min_properties - self.all_of = all_of - self.discriminator = discriminator - self.read_only = read_only - self.xml = xml - self.external_docs = external_docs - self.example = example - self.notification_url_extension = notification_url_extension - self.dynamic_schema_old = dynamic_schema_old - self.dynamic_schema_new = dynamic_schema_new - self.dynamic_list_new = dynamic_list_new - self.dynamic_tree = dynamic_tree - - -class SwaggerXml(msrest.serialization.Model): - """The Swagger XML. - - :ivar name: The xml element or attribute name. - :vartype name: str - :ivar namespace: The xml namespace. - :vartype namespace: str - :ivar prefix: The name prefix. - :vartype prefix: str - :ivar attribute: Indicates whether the property should be an attribute instead of an element. - :vartype attribute: bool - :ivar wrapped: Indicates whether the array elements are wrapped in a container element. - :vartype wrapped: bool - :ivar extensions: The vendor extensions. - :vartype extensions: dict[str, any] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'prefix': {'key': 'prefix', 'type': 'str'}, - 'attribute': {'key': 'attribute', 'type': 'bool'}, - 'wrapped': {'key': 'wrapped', 'type': 'bool'}, - 'extensions': {'key': 'extensions', 'type': '{object}'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - namespace: Optional[str] = None, - prefix: Optional[str] = None, - attribute: Optional[bool] = None, - wrapped: Optional[bool] = None, - extensions: Optional[Dict[str, Any]] = None, - **kwargs - ): - """ - :keyword name: The xml element or attribute name. - :paramtype name: str - :keyword namespace: The xml namespace. - :paramtype namespace: str - :keyword prefix: The name prefix. - :paramtype prefix: str - :keyword attribute: Indicates whether the property should be an attribute instead of an - element. - :paramtype attribute: bool - :keyword wrapped: Indicates whether the array elements are wrapped in a container element. - :paramtype wrapped: bool - :keyword extensions: The vendor extensions. - :paramtype extensions: dict[str, any] - """ - super(SwaggerXml, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.prefix = prefix - self.attribute = attribute - self.wrapped = wrapped - self.extensions = extensions - - -class TrackingEvent(msrest.serialization.Model): - """The tracking event. - - All required parameters must be populated in order to send to Azure. - - :ivar event_level: Required. The event level. Possible values include: "LogAlways", "Critical", - "Error", "Warning", "Informational", "Verbose". - :vartype event_level: str or ~azure.mgmt.logic.models.EventLevel - :ivar event_time: Required. The event time. - :vartype event_time: ~datetime.datetime - :ivar record_type: Required. The record type. Possible values include: "NotSpecified", - "Custom", "AS2Message", "AS2MDN", "X12Interchange", "X12FunctionalGroup", "X12TransactionSet", - "X12InterchangeAcknowledgment", "X12FunctionalGroupAcknowledgment", - "X12TransactionSetAcknowledgment", "EdifactInterchange", "EdifactFunctionalGroup", - "EdifactTransactionSet", "EdifactInterchangeAcknowledgment", - "EdifactFunctionalGroupAcknowledgment", "EdifactTransactionSetAcknowledgment". - :vartype record_type: str or ~azure.mgmt.logic.models.TrackingRecordType - :ivar record: The record. - :vartype record: any - :ivar error: The error. - :vartype error: ~azure.mgmt.logic.models.TrackingEventErrorInfo - """ - - _validation = { - 'event_level': {'required': True}, - 'event_time': {'required': True}, - 'record_type': {'required': True}, - } - - _attribute_map = { - 'event_level': {'key': 'eventLevel', 'type': 'str'}, - 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, - 'record_type': {'key': 'recordType', 'type': 'str'}, - 'record': {'key': 'record', 'type': 'object'}, - 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, - } - - def __init__( - self, - *, - event_level: Union[str, "EventLevel"], - event_time: datetime.datetime, - record_type: Union[str, "TrackingRecordType"], - record: Optional[Any] = None, - error: Optional["TrackingEventErrorInfo"] = None, - **kwargs - ): - """ - :keyword event_level: Required. The event level. Possible values include: "LogAlways", - "Critical", "Error", "Warning", "Informational", "Verbose". - :paramtype event_level: str or ~azure.mgmt.logic.models.EventLevel - :keyword event_time: Required. The event time. - :paramtype event_time: ~datetime.datetime - :keyword record_type: Required. The record type. Possible values include: "NotSpecified", - "Custom", "AS2Message", "AS2MDN", "X12Interchange", "X12FunctionalGroup", "X12TransactionSet", - "X12InterchangeAcknowledgment", "X12FunctionalGroupAcknowledgment", - "X12TransactionSetAcknowledgment", "EdifactInterchange", "EdifactFunctionalGroup", - "EdifactTransactionSet", "EdifactInterchangeAcknowledgment", - "EdifactFunctionalGroupAcknowledgment", "EdifactTransactionSetAcknowledgment". - :paramtype record_type: str or ~azure.mgmt.logic.models.TrackingRecordType - :keyword record: The record. - :paramtype record: any - :keyword error: The error. - :paramtype error: ~azure.mgmt.logic.models.TrackingEventErrorInfo - """ - super(TrackingEvent, self).__init__(**kwargs) - self.event_level = event_level - self.event_time = event_time - self.record_type = record_type - self.record = record - self.error = error - - -class TrackingEventErrorInfo(msrest.serialization.Model): - """The tracking event error info. - - :ivar message: The message. - :vartype message: str - :ivar code: The code. - :vartype code: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__( - self, - *, - message: Optional[str] = None, - code: Optional[str] = None, - **kwargs - ): - """ - :keyword message: The message. - :paramtype message: str - :keyword code: The code. - :paramtype code: str - """ - super(TrackingEventErrorInfo, self).__init__(**kwargs) - self.message = message - self.code = code - - -class TrackingEventsDefinition(msrest.serialization.Model): - """The tracking events definition. - - All required parameters must be populated in order to send to Azure. - - :ivar source_type: Required. The source type. - :vartype source_type: str - :ivar track_events_options: The track events options. Possible values include: "None", - "DisableSourceInfoEnrich". - :vartype track_events_options: str or ~azure.mgmt.logic.models.TrackEventsOperationOptions - :ivar events: Required. The events. - :vartype events: list[~azure.mgmt.logic.models.TrackingEvent] - """ - - _validation = { - 'source_type': {'required': True}, - 'events': {'required': True}, - } - - _attribute_map = { - 'source_type': {'key': 'sourceType', 'type': 'str'}, - 'track_events_options': {'key': 'trackEventsOptions', 'type': 'str'}, - 'events': {'key': 'events', 'type': '[TrackingEvent]'}, - } - - def __init__( - self, - *, - source_type: str, - events: List["TrackingEvent"], - track_events_options: Optional[Union[str, "TrackEventsOperationOptions"]] = None, - **kwargs - ): - """ - :keyword source_type: Required. The source type. - :paramtype source_type: str - :keyword track_events_options: The track events options. Possible values include: "None", - "DisableSourceInfoEnrich". - :paramtype track_events_options: str or ~azure.mgmt.logic.models.TrackEventsOperationOptions - :keyword events: Required. The events. - :paramtype events: list[~azure.mgmt.logic.models.TrackingEvent] - """ - super(TrackingEventsDefinition, self).__init__(**kwargs) - self.source_type = source_type - self.track_events_options = track_events_options - self.events = events - - -class UserAssignedIdentity(msrest.serialization.Model): - """User Assigned identity properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: Principal Id of user assigned identity. - :vartype principal_id: str - :ivar client_id: Client Id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(UserAssignedIdentity, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class Workflow(Resource): - """The workflow type. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar identity: Managed service identity properties. - :vartype identity: ~azure.mgmt.logic.models.ManagedServiceIdentity - :ivar provisioning_state: Gets 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". - :vartype provisioning_state: str or ~azure.mgmt.logic.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 - :ivar state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", - "Disabled", "Deleted", "Suspended". - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar version: Gets the version. - :vartype version: str - :ivar access_endpoint: Gets the access endpoint. - :vartype access_endpoint: str - :ivar endpoints_configuration: The endpoints configuration. - :vartype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :ivar access_control: The access control configuration. - :vartype access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku - :ivar integration_account: The integration account. - :vartype integration_account: ~azure.mgmt.logic.models.ResourceReference - :ivar integration_service_environment: The integration service environment. - :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :ivar definition: The definition. - :vartype definition: any - :ivar parameters: The parameters. - :vartype parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'version': {'readonly': True}, - 'access_endpoint': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - '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}'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = 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[Any] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword identity: Managed service identity properties. - :paramtype identity: ~azure.mgmt.logic.models.ManagedServiceIdentity - :keyword state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", - "Disabled", "Deleted", "Suspended". - :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState - :keyword endpoints_configuration: The endpoints configuration. - :paramtype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :keyword access_control: The access control configuration. - :paramtype access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration - :keyword integration_account: The integration account. - :paramtype integration_account: ~azure.mgmt.logic.models.ResourceReference - :keyword integration_service_environment: The integration service environment. - :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :keyword definition: The definition. - :paramtype definition: any - :keyword parameters: The parameters. - :paramtype parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - super(Workflow, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.provisioning_state = None - self.created_time = None - self.changed_time = None - 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 - - -class WorkflowFilter(msrest.serialization.Model): - """The workflow filter. - - :ivar state: The state of workflows. Possible values include: "NotSpecified", "Completed", - "Enabled", "Disabled", "Deleted", "Suspended". - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - *, - state: Optional[Union[str, "WorkflowState"]] = None, - **kwargs - ): - """ - :keyword state: The state of workflows. Possible values include: "NotSpecified", "Completed", - "Enabled", "Disabled", "Deleted", "Suspended". - :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState - """ - super(WorkflowFilter, self).__init__(**kwargs) - self.state = state - - -class WorkflowListResult(msrest.serialization.Model): - """The list of workflows. - - :ivar value: The list of workflows. - :vartype value: list[~azure.mgmt.logic.models.Workflow] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Workflow]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Workflow"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The list of workflows. - :paramtype value: list[~azure.mgmt.logic.models.Workflow] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(WorkflowListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class WorkflowParameter(msrest.serialization.Model): - """The workflow parameters. - - :ivar type: The type. Possible values include: "NotSpecified", "String", "SecureString", "Int", - "Float", "Bool", "Array", "Object", "SecureObject". - :vartype type: str or ~azure.mgmt.logic.models.ParameterType - :ivar value: The value. - :vartype value: any - :ivar metadata: The metadata. - :vartype metadata: any - :ivar description: The description. - :vartype description: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "ParameterType"]] = None, - value: Optional[Any] = None, - metadata: Optional[Any] = None, - description: Optional[str] = None, - **kwargs - ): - """ - :keyword type: The type. Possible values include: "NotSpecified", "String", "SecureString", - "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :paramtype type: str or ~azure.mgmt.logic.models.ParameterType - :keyword value: The value. - :paramtype value: any - :keyword metadata: The metadata. - :paramtype metadata: any - :keyword description: The description. - :paramtype description: str - """ - super(WorkflowParameter, self).__init__(**kwargs) - self.type = type - self.value = value - self.metadata = metadata - self.description = description - - -class WorkflowOutputParameter(WorkflowParameter): - """The workflow output parameter. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type. Possible values include: "NotSpecified", "String", "SecureString", "Int", - "Float", "Bool", "Array", "Object", "SecureObject". - :vartype type: str or ~azure.mgmt.logic.models.ParameterType - :ivar value: The value. - :vartype value: any - :ivar metadata: The metadata. - :vartype metadata: any - :ivar description: The description. - :vartype description: str - :ivar error: Gets the error. - :vartype error: any - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'description': {'key': 'description', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "ParameterType"]] = None, - value: Optional[Any] = None, - metadata: Optional[Any] = None, - description: Optional[str] = None, - **kwargs - ): - """ - :keyword type: The type. Possible values include: "NotSpecified", "String", "SecureString", - "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :paramtype type: str or ~azure.mgmt.logic.models.ParameterType - :keyword value: The value. - :paramtype value: any - :keyword metadata: The metadata. - :paramtype metadata: any - :keyword description: The description. - :paramtype description: str - """ - super(WorkflowOutputParameter, self).__init__(type=type, value=value, metadata=metadata, description=description, **kwargs) - self.error = None - - -class WorkflowReference(ResourceReference): - """The workflow reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - """ - :keyword id: The resource id. - :paramtype id: str - """ - super(WorkflowReference, self).__init__(id=id, **kwargs) - - -class WorkflowRun(SubResource): - """The workflow run. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the workflow run name. - :vartype name: str - :ivar type: Gets the workflow run type. - :vartype type: str - :ivar wait_end_time: Gets the wait end time. - :vartype wait_end_time: ~datetime.datetime - :ivar start_time: Gets the start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: Gets the end time. - :vartype end_time: ~datetime.datetime - :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 - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: any - :ivar correlation_id: Gets the correlation id. - :vartype correlation_id: str - :ivar correlation: The run correlation. - :vartype correlation: ~azure.mgmt.logic.models.Correlation - :ivar workflow: Gets the reference to workflow version. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference - :ivar trigger: Gets the fired trigger. - :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger - :ivar outputs: Gets the outputs. - :vartype outputs: dict[str, ~azure.mgmt.logic.models.WorkflowOutputParameter] - :ivar response: Gets the response of the flow run. - :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'wait_end_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'correlation_id': {'readonly': True}, - 'workflow': {'readonly': True}, - 'trigger': {'readonly': True}, - 'outputs': {'readonly': True}, - 'response': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, - 'trigger': {'key': 'properties.trigger', 'type': 'WorkflowRunTrigger'}, - 'outputs': {'key': 'properties.outputs', 'type': '{WorkflowOutputParameter}'}, - 'response': {'key': 'properties.response', 'type': 'WorkflowRunTrigger'}, - } - - def __init__( - self, - *, - correlation: Optional["Correlation"] = None, - **kwargs - ): - """ - :keyword correlation: The run correlation. - :paramtype correlation: ~azure.mgmt.logic.models.Correlation - """ - super(WorkflowRun, self).__init__(**kwargs) - self.name = None - self.type = None - self.wait_end_time = None - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.correlation_id = None - self.correlation = correlation - self.workflow = None - self.trigger = None - self.outputs = None - self.response = None - - -class WorkflowRunAction(SubResource): - """The workflow run action. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the workflow run action name. - :vartype name: str - :ivar type: Gets the workflow run action type. - :vartype type: str - :ivar start_time: Gets the start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: Gets the end time. - :vartype end_time: ~datetime.datetime - :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 - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: any - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar correlation: The correlation properties. - :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: any - :ivar retry_history: Gets the retry histories. - :vartype retry_history: list[~azure.mgmt.logic.models.RetryHistory] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, - } - - def __init__( - self, - *, - correlation: Optional["RunActionCorrelation"] = None, - retry_history: Optional[List["RetryHistory"]] = None, - **kwargs - ): - """ - :keyword correlation: The correlation properties. - :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :keyword retry_history: Gets the retry histories. - :paramtype retry_history: list[~azure.mgmt.logic.models.RetryHistory] - """ - super(WorkflowRunAction, self).__init__(**kwargs) - self.name = None - self.type = None - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.tracking_id = None - self.correlation = correlation - self.inputs_link = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = retry_history - - -class WorkflowRunActionFilter(msrest.serialization.Model): - """The workflow run action filter. - - :ivar status: The status of workflow run action. 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 - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "WorkflowStatus"]] = None, - **kwargs - ): - """ - :keyword status: The status of workflow run action. Possible values include: "NotSpecified", - "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", - "Faulted", "TimedOut", "Aborted", "Ignored". - :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - super(WorkflowRunActionFilter, self).__init__(**kwargs) - self.status = status - - -class WorkflowRunActionListResult(msrest.serialization.Model): - """The list of workflow run actions. - - :ivar value: A list of workflow run actions. - :vartype value: list[~azure.mgmt.logic.models.WorkflowRunAction] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowRunAction]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["WorkflowRunAction"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: A list of workflow run actions. - :paramtype value: list[~azure.mgmt.logic.models.WorkflowRunAction] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(WorkflowRunActionListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class WorkflowRunActionRepetitionDefinition(Resource): - """The workflow run action repetition definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar start_time: The start time of the workflow scope repetition. - :vartype start_time: ~datetime.datetime - :ivar end_time: The end time of the workflow scope repetition. - :vartype end_time: ~datetime.datetime - :ivar correlation: The correlation properties. - :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :ivar status: The status of the workflow scope repetition. 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 - :ivar code: The workflow scope repetition code. - :vartype code: str - :ivar error: Anything. - :vartype error: any - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: any - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: any - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: any - :ivar retry_history: Gets the retry histories. - :vartype retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :ivar iteration_count: - :vartype iteration_count: int - :ivar repetition_indexes: The repetition indexes. - :vartype repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'inputs': {'key': 'properties.inputs', 'type': 'object'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'properties.outputs', 'type': 'object'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, - 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - correlation: Optional["RunActionCorrelation"] = None, - status: Optional[Union[str, "WorkflowStatus"]] = None, - code: Optional[str] = None, - error: Optional[Any] = None, - retry_history: Optional[List["RetryHistory"]] = None, - iteration_count: Optional[int] = None, - repetition_indexes: Optional[List["RepetitionIndex"]] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword start_time: The start time of the workflow scope repetition. - :paramtype start_time: ~datetime.datetime - :keyword end_time: The end time of the workflow scope repetition. - :paramtype end_time: ~datetime.datetime - :keyword correlation: The correlation properties. - :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :keyword status: The status of the workflow scope repetition. Possible values include: - "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", - "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :keyword code: The workflow scope repetition code. - :paramtype code: str - :keyword error: Anything. - :paramtype error: any - :keyword retry_history: Gets the retry histories. - :paramtype retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :keyword iteration_count: - :paramtype iteration_count: int - :keyword repetition_indexes: The repetition indexes. - :paramtype repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] - """ - super(WorkflowRunActionRepetitionDefinition, self).__init__(location=location, tags=tags, **kwargs) - self.start_time = start_time - self.end_time = end_time - self.correlation = correlation - self.status = status - self.code = code - self.error = error - self.tracking_id = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = retry_history - self.iteration_count = iteration_count - self.repetition_indexes = repetition_indexes - - -class WorkflowRunActionRepetitionDefinitionCollection(msrest.serialization.Model): - """A collection of workflow run action repetitions. - - :ivar next_link: The link used to get the next page of recommendations. - :vartype next_link: str - :ivar value: - :vartype value: list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["WorkflowRunActionRepetitionDefinition"]] = None, - **kwargs - ): - """ - :keyword next_link: The link used to get the next page of recommendations. - :paramtype next_link: str - :keyword value: - :paramtype value: list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] - """ - super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) - self.next_link = next_link - self.value = value - - -class WorkflowRunActionRepetitionProperties(OperationResult): - """The workflow run action repetition properties definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar start_time: The start time of the workflow scope repetition. - :vartype start_time: ~datetime.datetime - :ivar end_time: The end time of the workflow scope repetition. - :vartype end_time: ~datetime.datetime - :ivar correlation: The correlation properties. - :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :ivar status: The status of the workflow scope repetition. 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 - :ivar code: The workflow scope repetition code. - :vartype code: str - :ivar error: Anything. - :vartype error: any - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: any - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: any - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: any - :ivar retry_history: Gets the retry histories. - :vartype retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :ivar iteration_count: - :vartype iteration_count: int - :ivar repetition_indexes: The repetition indexes. - :vartype repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] - """ - - _validation = { - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, - 'repetition_indexes': {'key': 'repetitionIndexes', 'type': '[RepetitionIndex]'}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - correlation: Optional["RunActionCorrelation"] = None, - status: Optional[Union[str, "WorkflowStatus"]] = None, - code: Optional[str] = None, - error: Optional[Any] = None, - retry_history: Optional[List["RetryHistory"]] = None, - iteration_count: Optional[int] = None, - repetition_indexes: Optional[List["RepetitionIndex"]] = None, - **kwargs - ): - """ - :keyword start_time: The start time of the workflow scope repetition. - :paramtype start_time: ~datetime.datetime - :keyword end_time: The end time of the workflow scope repetition. - :paramtype end_time: ~datetime.datetime - :keyword correlation: The correlation properties. - :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :keyword status: The status of the workflow scope repetition. Possible values include: - "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", - "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :keyword code: The workflow scope repetition code. - :paramtype code: str - :keyword error: Anything. - :paramtype error: any - :keyword retry_history: Gets the retry histories. - :paramtype retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :keyword iteration_count: - :paramtype iteration_count: int - :keyword repetition_indexes: The repetition indexes. - :paramtype repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] - """ - super(WorkflowRunActionRepetitionProperties, self).__init__(start_time=start_time, end_time=end_time, correlation=correlation, status=status, code=code, error=error, retry_history=retry_history, iteration_count=iteration_count, **kwargs) - self.repetition_indexes = repetition_indexes - - -class WorkflowRunFilter(msrest.serialization.Model): - """The workflow run filter. - - :ivar status: The status of workflow run. 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 - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "WorkflowStatus"]] = None, - **kwargs - ): - """ - :keyword status: The status of workflow run. Possible values include: "NotSpecified", "Paused", - "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", - "TimedOut", "Aborted", "Ignored". - :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - super(WorkflowRunFilter, self).__init__(**kwargs) - self.status = status - - -class WorkflowRunListResult(msrest.serialization.Model): - """The list of workflow runs. - - :ivar value: A list of workflow runs. - :vartype value: list[~azure.mgmt.logic.models.WorkflowRun] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowRun]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["WorkflowRun"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: A list of workflow runs. - :paramtype value: list[~azure.mgmt.logic.models.WorkflowRun] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(WorkflowRunListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class WorkflowRunTrigger(msrest.serialization.Model): - """The workflow run trigger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Gets the name. - :vartype name: str - :ivar inputs: Gets the inputs. - :vartype inputs: any - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: any - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar scheduled_time: Gets the scheduled time. - :vartype scheduled_time: ~datetime.datetime - :ivar start_time: Gets the start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: Gets the end time. - :vartype end_time: ~datetime.datetime - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar correlation: The run correlation. - :vartype correlation: ~azure.mgmt.logic.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 - :ivar error: Gets the error. - :vartype error: any - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: any - """ - - _validation = { - 'name': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'scheduled_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'code': {'readonly': True}, - 'status': {'readonly': True}, - 'error': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'correlation': {'key': 'correlation', 'type': 'Correlation'}, - 'code': {'key': 'code', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - } - - def __init__( - self, - *, - correlation: Optional["Correlation"] = None, - **kwargs - ): - """ - :keyword correlation: The run correlation. - :paramtype correlation: ~azure.mgmt.logic.models.Correlation - """ - super(WorkflowRunTrigger, self).__init__(**kwargs) - self.name = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.scheduled_time = None - self.start_time = None - self.end_time = None - self.tracking_id = None - self.correlation = correlation - self.code = None - self.status = None - self.error = None - self.tracked_properties = None - - -class WorkflowTrigger(SubResource): - """The workflow trigger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the workflow trigger name. - :vartype name: str - :ivar type: Gets the workflow trigger type. - :vartype type: str - :ivar provisioning_state: Gets the provisioning state. Possible values include: "NotSpecified", - "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 - :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 - :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 - :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 - :ivar workflow: Gets the reference to workflow. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'state': {'readonly': True}, - 'status': {'readonly': True}, - 'last_execution_time': {'readonly': True}, - 'next_execution_time': {'readonly': True}, - 'recurrence': {'readonly': True}, - 'workflow': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_execution_time': {'key': 'properties.lastExecutionTime', 'type': 'iso-8601'}, - 'next_execution_time': {'key': 'properties.nextExecutionTime', 'type': 'iso-8601'}, - 'recurrence': {'key': 'properties.recurrence', 'type': 'WorkflowTriggerRecurrence'}, - 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(WorkflowTrigger, self).__init__(**kwargs) - self.name = None - self.type = None - self.provisioning_state = None - self.created_time = None - self.changed_time = None - self.state = None - self.status = None - self.last_execution_time = None - self.next_execution_time = None - self.recurrence = None - self.workflow = None - - -class WorkflowTriggerCallbackUrl(msrest.serialization.Model): - """The workflow trigger callback URL. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Gets the workflow trigger callback URL. - :vartype value: str - :ivar method: Gets the workflow trigger callback URL HTTP method. - :vartype method: str - :ivar base_path: Gets the workflow trigger callback URL base path. - :vartype base_path: str - :ivar relative_path: Gets the workflow trigger callback URL relative path. - :vartype relative_path: str - :ivar relative_path_parameters: Gets the workflow trigger callback URL relative path - parameters. - :vartype relative_path_parameters: list[str] - :ivar queries: Gets the workflow trigger callback URL query parameters. - :vartype queries: ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries - """ - - _validation = { - 'value': {'readonly': True}, - 'method': {'readonly': True}, - 'base_path': {'readonly': True}, - 'relative_path': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'base_path': {'key': 'basePath', 'type': 'str'}, - 'relative_path': {'key': 'relativePath', 'type': 'str'}, - 'relative_path_parameters': {'key': 'relativePathParameters', 'type': '[str]'}, - 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, - } - - def __init__( - self, - *, - relative_path_parameters: Optional[List[str]] = None, - queries: Optional["WorkflowTriggerListCallbackUrlQueries"] = None, - **kwargs - ): - """ - :keyword relative_path_parameters: Gets the workflow trigger callback URL relative path - parameters. - :paramtype relative_path_parameters: list[str] - :keyword queries: Gets the workflow trigger callback URL query parameters. - :paramtype queries: ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries - """ - super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) - self.value = None - self.method = None - self.base_path = None - self.relative_path = None - self.relative_path_parameters = relative_path_parameters - self.queries = queries - - -class WorkflowTriggerFilter(msrest.serialization.Model): - """The workflow trigger filter. - - :ivar state: The state of workflow trigger. Possible values include: "NotSpecified", - "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - *, - state: Optional[Union[str, "WorkflowState"]] = None, - **kwargs - ): - """ - :keyword state: The state of workflow trigger. Possible values include: "NotSpecified", - "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState - """ - super(WorkflowTriggerFilter, self).__init__(**kwargs) - self.state = state - - -class WorkflowTriggerHistory(SubResource): - """The workflow trigger history. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the workflow trigger history name. - :vartype name: str - :ivar type: Gets the workflow trigger history type. - :vartype type: str - :ivar start_time: Gets the start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: Gets the end time. - :vartype end_time: ~datetime.datetime - :ivar scheduled_time: The scheduled time. - :vartype scheduled_time: ~datetime.datetime - :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 - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: any - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar correlation: The run correlation. - :vartype correlation: ~azure.mgmt.logic.models.Correlation - :ivar inputs_link: Gets the link to input parameters. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs_link: Gets the link to output parameters. - :vartype outputs_link: ~azure.mgmt.logic.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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'scheduled_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'fired': {'readonly': True}, - 'run': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'scheduled_time': {'key': 'properties.scheduledTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'fired': {'key': 'properties.fired', 'type': 'bool'}, - 'run': {'key': 'properties.run', 'type': 'ResourceReference'}, - } - - def __init__( - self, - *, - correlation: Optional["Correlation"] = None, - **kwargs - ): - """ - :keyword correlation: The run correlation. - :paramtype correlation: ~azure.mgmt.logic.models.Correlation - """ - super(WorkflowTriggerHistory, self).__init__(**kwargs) - self.name = None - self.type = None - self.start_time = None - self.end_time = None - self.scheduled_time = None - self.status = None - self.code = None - self.error = None - self.tracking_id = None - self.correlation = correlation - self.inputs_link = None - self.outputs_link = None - self.fired = None - self.run = None - - -class WorkflowTriggerHistoryFilter(msrest.serialization.Model): - """The workflow trigger history filter. - - :ivar status: The status of workflow trigger history. 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 - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "WorkflowStatus"]] = None, - **kwargs - ): - """ - :keyword status: The status of workflow trigger history. Possible values include: - "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", - "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) - self.status = status - - -class WorkflowTriggerHistoryListResult(msrest.serialization.Model): - """The list of workflow trigger histories. - - :ivar value: A list of workflow trigger histories. - :vartype value: list[~azure.mgmt.logic.models.WorkflowTriggerHistory] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowTriggerHistory]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["WorkflowTriggerHistory"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: A list of workflow trigger histories. - :paramtype value: list[~azure.mgmt.logic.models.WorkflowTriggerHistory] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(WorkflowTriggerHistoryListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class WorkflowTriggerListCallbackUrlQueries(msrest.serialization.Model): - """Gets the workflow trigger callback URL query parameters. - - :ivar api_version: The api version. - :vartype api_version: str - :ivar sp: The SAS permissions. - :vartype sp: str - :ivar sv: The SAS version. - :vartype sv: str - :ivar sig: The SAS signature. - :vartype sig: str - :ivar se: The SAS timestamp. - :vartype se: str - """ - - _attribute_map = { - 'api_version': {'key': 'api-version', 'type': 'str'}, - 'sp': {'key': 'sp', 'type': 'str'}, - 'sv': {'key': 'sv', 'type': 'str'}, - 'sig': {'key': 'sig', 'type': 'str'}, - 'se': {'key': 'se', 'type': 'str'}, - } - - def __init__( - self, - *, - api_version: Optional[str] = None, - sp: Optional[str] = None, - sv: Optional[str] = None, - sig: Optional[str] = None, - se: Optional[str] = None, - **kwargs - ): - """ - :keyword api_version: The api version. - :paramtype api_version: str - :keyword sp: The SAS permissions. - :paramtype sp: str - :keyword sv: The SAS version. - :paramtype sv: str - :keyword sig: The SAS signature. - :paramtype sig: str - :keyword se: The SAS timestamp. - :paramtype se: str - """ - super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) - self.api_version = api_version - self.sp = sp - self.sv = sv - self.sig = sig - self.se = se - - -class WorkflowTriggerListResult(msrest.serialization.Model): - """The list of workflow triggers. - - :ivar value: A list of workflow triggers. - :vartype value: list[~azure.mgmt.logic.models.WorkflowTrigger] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowTrigger]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["WorkflowTrigger"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: A list of workflow triggers. - :paramtype value: list[~azure.mgmt.logic.models.WorkflowTrigger] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(WorkflowTriggerListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class WorkflowTriggerRecurrence(msrest.serialization.Model): - """The workflow trigger recurrence. - - :ivar frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", - "Hour", "Day", "Week", "Month", "Year". - :vartype frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency - :ivar interval: The interval. - :vartype interval: int - :ivar start_time: The start time. - :vartype start_time: str - :ivar end_time: The end time. - :vartype end_time: str - :ivar time_zone: The time zone. - :vartype time_zone: str - :ivar schedule: The recurrence schedule. - :vartype schedule: ~azure.mgmt.logic.models.RecurrenceSchedule - """ - - _attribute_map = { - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, - } - - def __init__( - self, - *, - 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, - schedule: Optional["RecurrenceSchedule"] = None, - **kwargs - ): - """ - :keyword frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", - "Hour", "Day", "Week", "Month", "Year". - :paramtype frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency - :keyword interval: The interval. - :paramtype interval: int - :keyword start_time: The start time. - :paramtype start_time: str - :keyword end_time: The end time. - :paramtype end_time: str - :keyword time_zone: The time zone. - :paramtype time_zone: str - :keyword schedule: The recurrence schedule. - :paramtype schedule: ~azure.mgmt.logic.models.RecurrenceSchedule - """ - super(WorkflowTriggerRecurrence, self).__init__(**kwargs) - self.frequency = frequency - self.interval = interval - self.start_time = start_time - self.end_time = end_time - self.time_zone = time_zone - self.schedule = schedule - - -class WorkflowTriggerReference(ResourceReference): - """The workflow trigger reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar flow_name: The workflow name. - :vartype flow_name: str - :ivar trigger_name: The workflow trigger name. - :vartype trigger_name: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'flow_name': {'key': 'flowName', 'type': 'str'}, - 'trigger_name': {'key': 'triggerName', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - flow_name: Optional[str] = None, - trigger_name: Optional[str] = None, - **kwargs - ): - """ - :keyword id: The resource id. - :paramtype id: str - :keyword flow_name: The workflow name. - :paramtype flow_name: str - :keyword trigger_name: The workflow trigger name. - :paramtype trigger_name: str - """ - super(WorkflowTriggerReference, self).__init__(id=id, **kwargs) - self.flow_name = flow_name - self.trigger_name = trigger_name - - -class WorkflowVersion(Resource): - """The workflow version. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :ivar location: The resource location. - :vartype location: str - :ivar tags: A set of tags. The resource tags. - :vartype tags: dict[str, str] - :ivar 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". - :vartype provisioning_state: str or ~azure.mgmt.logic.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 - :ivar state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", - "Disabled", "Deleted", "Suspended". - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar version: Gets the version. - :vartype version: str - :ivar access_endpoint: Gets the access endpoint. - :vartype access_endpoint: str - :ivar endpoints_configuration: The endpoints configuration. - :vartype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :ivar access_control: The access control configuration. - :vartype access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku - :ivar integration_account: The integration account. - :vartype integration_account: ~azure.mgmt.logic.models.ResourceReference - :ivar definition: The definition. - :vartype definition: any - :ivar parameters: The parameters. - :vartype parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'version': {'readonly': True}, - 'access_endpoint': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - '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'}, - 'definition': {'key': 'properties.definition', 'type': 'object'}, - 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, - } - - def __init__( - self, - *, - 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, - definition: Optional[Any] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, - **kwargs - ): - """ - :keyword location: The resource location. - :paramtype location: str - :keyword tags: A set of tags. The resource tags. - :paramtype tags: dict[str, str] - :keyword state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", - "Disabled", "Deleted", "Suspended". - :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState - :keyword endpoints_configuration: The endpoints configuration. - :paramtype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :keyword access_control: The access control configuration. - :paramtype access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration - :keyword integration_account: The integration account. - :paramtype integration_account: ~azure.mgmt.logic.models.ResourceReference - :keyword definition: The definition. - :paramtype definition: any - :keyword parameters: The parameters. - :paramtype parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - super(WorkflowVersion, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.created_time = None - self.changed_time = None - 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.definition = definition - self.parameters = parameters - - -class WorkflowVersionListResult(msrest.serialization.Model): - """The list of workflow versions. - - :ivar value: A list of workflow versions. - :vartype value: list[~azure.mgmt.logic.models.WorkflowVersion] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowVersion]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["WorkflowVersion"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - """ - :keyword value: A list of workflow versions. - :paramtype value: list[~azure.mgmt.logic.models.WorkflowVersion] - :keyword next_link: The URL to get the next set of results. - :paramtype next_link: str - """ - super(WorkflowVersionListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class WsdlService(msrest.serialization.Model): - """The WSDL service. - - :ivar qualified_name: The qualified name. - :vartype qualified_name: str - :ivar endpoint_qualified_names: The list of endpoints' qualified names. - :vartype endpoint_qualified_names: list[str] - """ - - _attribute_map = { - 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, - 'endpoint_qualified_names': {'key': 'EndpointQualifiedNames', 'type': '[str]'}, - } - - def __init__( - self, - *, - qualified_name: Optional[str] = None, - endpoint_qualified_names: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword qualified_name: The qualified name. - :paramtype qualified_name: str - :keyword endpoint_qualified_names: The list of endpoints' qualified names. - :paramtype endpoint_qualified_names: list[str] - """ - super(WsdlService, self).__init__(**kwargs) - self.qualified_name = qualified_name - self.endpoint_qualified_names = endpoint_qualified_names - - -class X12AcknowledgementSettings(msrest.serialization.Model): - """The X12 agreement acknowledgement settings. - - All required parameters must be populated in order to send to Azure. - - :ivar need_technical_acknowledgement: Required. The value indicating whether technical - acknowledgement is needed. - :vartype need_technical_acknowledgement: bool - :ivar batch_technical_acknowledgements: Required. The value indicating whether to batch the - technical acknowledgements. - :vartype batch_technical_acknowledgements: bool - :ivar need_functional_acknowledgement: Required. The value indicating whether functional - acknowledgement is needed. - :vartype need_functional_acknowledgement: bool - :ivar functional_acknowledgement_version: The functional acknowledgement version. - :vartype functional_acknowledgement_version: str - :ivar batch_functional_acknowledgements: Required. The value indicating whether to batch - functional acknowledgements. - :vartype batch_functional_acknowledgements: bool - :ivar need_implementation_acknowledgement: Required. The value indicating whether - implementation acknowledgement is needed. - :vartype need_implementation_acknowledgement: bool - :ivar implementation_acknowledgement_version: The implementation acknowledgement version. - :vartype implementation_acknowledgement_version: str - :ivar batch_implementation_acknowledgements: Required. The value indicating whether to batch - implementation acknowledgements. - :vartype batch_implementation_acknowledgements: bool - :ivar need_loop_for_valid_messages: Required. The value indicating whether a loop is needed for - valid messages. - :vartype need_loop_for_valid_messages: bool - :ivar send_synchronous_acknowledgement: Required. The value indicating whether to send - synchronous acknowledgement. - :vartype send_synchronous_acknowledgement: bool - :ivar acknowledgement_control_number_prefix: The acknowledgement control number prefix. - :vartype acknowledgement_control_number_prefix: str - :ivar acknowledgement_control_number_suffix: The acknowledgement control number suffix. - :vartype acknowledgement_control_number_suffix: str - :ivar acknowledgement_control_number_lower_bound: Required. The acknowledgement control number - lower bound. - :vartype acknowledgement_control_number_lower_bound: int - :ivar acknowledgement_control_number_upper_bound: Required. The acknowledgement control number - upper bound. - :vartype acknowledgement_control_number_upper_bound: int - :ivar rollover_acknowledgement_control_number: Required. The value indicating whether to - rollover acknowledgement control number. - :vartype rollover_acknowledgement_control_number: bool - """ - - _validation = { - 'need_technical_acknowledgement': {'required': True}, - 'batch_technical_acknowledgements': {'required': True}, - 'need_functional_acknowledgement': {'required': True}, - 'batch_functional_acknowledgements': {'required': True}, - 'need_implementation_acknowledgement': {'required': True}, - 'batch_implementation_acknowledgements': {'required': True}, - 'need_loop_for_valid_messages': {'required': True}, - 'send_synchronous_acknowledgement': {'required': True}, - 'acknowledgement_control_number_lower_bound': {'required': True}, - 'acknowledgement_control_number_upper_bound': {'required': True}, - 'rollover_acknowledgement_control_number': {'required': True}, - } - - _attribute_map = { - 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, - 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, - 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, - 'functional_acknowledgement_version': {'key': 'functionalAcknowledgementVersion', 'type': 'str'}, - 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, - 'need_implementation_acknowledgement': {'key': 'needImplementationAcknowledgement', 'type': 'bool'}, - 'implementation_acknowledgement_version': {'key': 'implementationAcknowledgementVersion', 'type': 'str'}, - 'batch_implementation_acknowledgements': {'key': 'batchImplementationAcknowledgements', 'type': 'bool'}, - 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, - 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, - 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, - 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, - 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, - 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, - 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, - } - - def __init__( - self, - *, - need_technical_acknowledgement: bool, - batch_technical_acknowledgements: bool, - need_functional_acknowledgement: bool, - batch_functional_acknowledgements: bool, - need_implementation_acknowledgement: bool, - batch_implementation_acknowledgements: bool, - need_loop_for_valid_messages: bool, - send_synchronous_acknowledgement: bool, - acknowledgement_control_number_lower_bound: int, - acknowledgement_control_number_upper_bound: int, - rollover_acknowledgement_control_number: bool, - functional_acknowledgement_version: Optional[str] = None, - implementation_acknowledgement_version: Optional[str] = None, - acknowledgement_control_number_prefix: Optional[str] = None, - acknowledgement_control_number_suffix: Optional[str] = None, - **kwargs - ): - """ - :keyword need_technical_acknowledgement: Required. The value indicating whether technical - acknowledgement is needed. - :paramtype need_technical_acknowledgement: bool - :keyword batch_technical_acknowledgements: Required. The value indicating whether to batch the - technical acknowledgements. - :paramtype batch_technical_acknowledgements: bool - :keyword need_functional_acknowledgement: Required. The value indicating whether functional - acknowledgement is needed. - :paramtype need_functional_acknowledgement: bool - :keyword functional_acknowledgement_version: The functional acknowledgement version. - :paramtype functional_acknowledgement_version: str - :keyword batch_functional_acknowledgements: Required. The value indicating whether to batch - functional acknowledgements. - :paramtype batch_functional_acknowledgements: bool - :keyword need_implementation_acknowledgement: Required. The value indicating whether - implementation acknowledgement is needed. - :paramtype need_implementation_acknowledgement: bool - :keyword implementation_acknowledgement_version: The implementation acknowledgement version. - :paramtype implementation_acknowledgement_version: str - :keyword batch_implementation_acknowledgements: Required. The value indicating whether to batch - implementation acknowledgements. - :paramtype batch_implementation_acknowledgements: bool - :keyword need_loop_for_valid_messages: Required. The value indicating whether a loop is needed - for valid messages. - :paramtype need_loop_for_valid_messages: bool - :keyword send_synchronous_acknowledgement: Required. The value indicating whether to send - synchronous acknowledgement. - :paramtype send_synchronous_acknowledgement: bool - :keyword acknowledgement_control_number_prefix: The acknowledgement control number prefix. - :paramtype acknowledgement_control_number_prefix: str - :keyword acknowledgement_control_number_suffix: The acknowledgement control number suffix. - :paramtype acknowledgement_control_number_suffix: str - :keyword acknowledgement_control_number_lower_bound: Required. The acknowledgement control - number lower bound. - :paramtype acknowledgement_control_number_lower_bound: int - :keyword acknowledgement_control_number_upper_bound: Required. The acknowledgement control - number upper bound. - :paramtype acknowledgement_control_number_upper_bound: int - :keyword rollover_acknowledgement_control_number: Required. The value indicating whether to - rollover acknowledgement control number. - :paramtype rollover_acknowledgement_control_number: bool - """ - super(X12AcknowledgementSettings, self).__init__(**kwargs) - self.need_technical_acknowledgement = need_technical_acknowledgement - self.batch_technical_acknowledgements = batch_technical_acknowledgements - self.need_functional_acknowledgement = need_functional_acknowledgement - self.functional_acknowledgement_version = functional_acknowledgement_version - self.batch_functional_acknowledgements = batch_functional_acknowledgements - self.need_implementation_acknowledgement = need_implementation_acknowledgement - self.implementation_acknowledgement_version = implementation_acknowledgement_version - self.batch_implementation_acknowledgements = batch_implementation_acknowledgements - self.need_loop_for_valid_messages = need_loop_for_valid_messages - self.send_synchronous_acknowledgement = send_synchronous_acknowledgement - self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix - self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix - self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound - self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound - self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number - - -class X12AgreementContent(msrest.serialization.Model): - """The X12 agreement content. - - All required parameters must be populated in order to send to Azure. - - :ivar receive_agreement: Required. The X12 one-way receive agreement. - :vartype receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - :ivar send_agreement: Required. The X12 one-way send agreement. - :vartype send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'X12OneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, - } - - def __init__( - self, - *, - receive_agreement: "X12OneWayAgreement", - send_agreement: "X12OneWayAgreement", - **kwargs - ): - """ - :keyword receive_agreement: Required. The X12 one-way receive agreement. - :paramtype receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - :keyword send_agreement: Required. The X12 one-way send agreement. - :paramtype send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - """ - super(X12AgreementContent, self).__init__(**kwargs) - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement - - -class X12DelimiterOverrides(msrest.serialization.Model): - """The X12 delimiter override settings. - - All required parameters must be populated in order to send to Azure. - - :ivar protocol_version: The protocol version. - :vartype protocol_version: str - :ivar message_id: The message id. - :vartype message_id: str - :ivar data_element_separator: Required. The data element separator. - :vartype data_element_separator: int - :ivar component_separator: Required. The component separator. - :vartype component_separator: int - :ivar segment_terminator: Required. The segment terminator. - :vartype segment_terminator: int - :ivar segment_terminator_suffix: Required. The segment terminator suffix. Possible values - include: "NotSpecified", "None", "CR", "LF", "CRLF". - :vartype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :ivar replace_character: Required. The replacement character. - :vartype replace_character: int - :ivar replace_separators_in_payload: Required. The value indicating whether to replace - separators in payload. - :vartype replace_separators_in_payload: bool - :ivar target_namespace: The target namespace on which this delimiter settings has to be - applied. - :vartype target_namespace: str - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - 'replace_character': {'required': True}, - 'replace_separators_in_payload': {'required': True}, - } - - _attribute_map = { - 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'str'}, - 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, - 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - } - - def __init__( - self, - *, - data_element_separator: int, - component_separator: int, - segment_terminator: int, - segment_terminator_suffix: Union[str, "SegmentTerminatorSuffix"], - replace_character: int, - replace_separators_in_payload: bool, - protocol_version: Optional[str] = None, - message_id: Optional[str] = None, - target_namespace: Optional[str] = None, - **kwargs - ): - """ - :keyword protocol_version: The protocol version. - :paramtype protocol_version: str - :keyword message_id: The message id. - :paramtype message_id: str - :keyword data_element_separator: Required. The data element separator. - :paramtype data_element_separator: int - :keyword component_separator: Required. The component separator. - :paramtype component_separator: int - :keyword segment_terminator: Required. The segment terminator. - :paramtype segment_terminator: int - :keyword segment_terminator_suffix: Required. The segment terminator suffix. Possible values - include: "NotSpecified", "None", "CR", "LF", "CRLF". - :paramtype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :keyword replace_character: Required. The replacement character. - :paramtype replace_character: int - :keyword replace_separators_in_payload: Required. The value indicating whether to replace - separators in payload. - :paramtype replace_separators_in_payload: bool - :keyword target_namespace: The target namespace on which this delimiter settings has to be - applied. - :paramtype target_namespace: str - """ - super(X12DelimiterOverrides, self).__init__(**kwargs) - self.protocol_version = protocol_version - self.message_id = message_id - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.segment_terminator_suffix = segment_terminator_suffix - self.replace_character = replace_character - self.replace_separators_in_payload = replace_separators_in_payload - self.target_namespace = target_namespace - - -class X12EnvelopeOverride(msrest.serialization.Model): - """The X12 envelope override settings. - - All required parameters must be populated in order to send to Azure. - - :ivar target_namespace: Required. The target namespace on which this envelope settings has to - be applied. - :vartype target_namespace: str - :ivar protocol_version: Required. The protocol version on which this envelope settings has to - be applied. - :vartype protocol_version: str - :ivar message_id: Required. The message id on which this envelope settings has to be applied. - :vartype message_id: str - :ivar responsible_agency_code: Required. The responsible agency code. - :vartype responsible_agency_code: str - :ivar header_version: Required. The header version. - :vartype header_version: str - :ivar sender_application_id: Required. The sender application id. - :vartype sender_application_id: str - :ivar receiver_application_id: Required. The receiver application id. - :vartype receiver_application_id: str - :ivar functional_identifier_code: The functional identifier code. - :vartype functional_identifier_code: str - :ivar date_format: Required. The date format. Possible values include: "NotSpecified", - "CCYYMMDD", "YYMMDD". - :vartype date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :ivar time_format: Required. The time format. Possible values include: "NotSpecified", "HHMM", - "HHMMSS", "HHMMSSdd", "HHMMSSd". - :vartype time_format: str or ~azure.mgmt.logic.models.X12TimeFormat - """ - - _validation = { - 'target_namespace': {'required': True}, - 'protocol_version': {'required': True}, - 'message_id': {'required': True}, - 'responsible_agency_code': {'required': True}, - 'header_version': {'required': True}, - 'sender_application_id': {'required': True}, - 'receiver_application_id': {'required': True}, - 'date_format': {'required': True}, - 'time_format': {'required': True}, - } - - _attribute_map = { - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'responsible_agency_code': {'key': 'responsibleAgencyCode', 'type': 'str'}, - 'header_version': {'key': 'headerVersion', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'functional_identifier_code': {'key': 'functionalIdentifierCode', 'type': 'str'}, - 'date_format': {'key': 'dateFormat', 'type': 'str'}, - 'time_format': {'key': 'timeFormat', 'type': 'str'}, - } - - def __init__( - self, - *, - target_namespace: str, - protocol_version: str, - message_id: str, - responsible_agency_code: str, - header_version: str, - sender_application_id: str, - receiver_application_id: str, - date_format: Union[str, "X12DateFormat"], - time_format: Union[str, "X12TimeFormat"], - functional_identifier_code: Optional[str] = None, - **kwargs - ): - """ - :keyword target_namespace: Required. The target namespace on which this envelope settings has - to be applied. - :paramtype target_namespace: str - :keyword protocol_version: Required. The protocol version on which this envelope settings has - to be applied. - :paramtype protocol_version: str - :keyword message_id: Required. The message id on which this envelope settings has to be - applied. - :paramtype message_id: str - :keyword responsible_agency_code: Required. The responsible agency code. - :paramtype responsible_agency_code: str - :keyword header_version: Required. The header version. - :paramtype header_version: str - :keyword sender_application_id: Required. The sender application id. - :paramtype sender_application_id: str - :keyword receiver_application_id: Required. The receiver application id. - :paramtype receiver_application_id: str - :keyword functional_identifier_code: The functional identifier code. - :paramtype functional_identifier_code: str - :keyword date_format: Required. The date format. Possible values include: "NotSpecified", - "CCYYMMDD", "YYMMDD". - :paramtype date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :keyword time_format: Required. The time format. Possible values include: "NotSpecified", - "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :paramtype time_format: str or ~azure.mgmt.logic.models.X12TimeFormat - """ - super(X12EnvelopeOverride, self).__init__(**kwargs) - self.target_namespace = target_namespace - self.protocol_version = protocol_version - self.message_id = message_id - self.responsible_agency_code = responsible_agency_code - self.header_version = header_version - self.sender_application_id = sender_application_id - self.receiver_application_id = receiver_application_id - self.functional_identifier_code = functional_identifier_code - self.date_format = date_format - self.time_format = time_format - - -class X12EnvelopeSettings(msrest.serialization.Model): - """The X12 agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :ivar control_standards_id: Required. The controls standards id. - :vartype control_standards_id: int - :ivar use_control_standards_id_as_repetition_character: Required. The value indicating whether - to use control standards id as repetition character. - :vartype use_control_standards_id_as_repetition_character: bool - :ivar sender_application_id: Required. The sender application id. - :vartype sender_application_id: str - :ivar receiver_application_id: Required. The receiver application id. - :vartype receiver_application_id: str - :ivar control_version_number: Required. The control version number. - :vartype control_version_number: str - :ivar interchange_control_number_lower_bound: Required. The interchange control number lower - bound. - :vartype interchange_control_number_lower_bound: int - :ivar interchange_control_number_upper_bound: Required. The interchange control number upper - bound. - :vartype interchange_control_number_upper_bound: int - :ivar rollover_interchange_control_number: Required. The value indicating whether to rollover - interchange control number. - :vartype rollover_interchange_control_number: bool - :ivar enable_default_group_headers: Required. The value indicating whether to enable default - group headers. - :vartype enable_default_group_headers: bool - :ivar functional_group_id: The functional group id. - :vartype functional_group_id: str - :ivar group_control_number_lower_bound: Required. The group control number lower bound. - :vartype group_control_number_lower_bound: int - :ivar group_control_number_upper_bound: Required. The group control number upper bound. - :vartype group_control_number_upper_bound: int - :ivar rollover_group_control_number: Required. The value indicating whether to rollover group - control number. - :vartype rollover_group_control_number: bool - :ivar group_header_agency_code: Required. The group header agency code. - :vartype group_header_agency_code: str - :ivar group_header_version: Required. The group header version. - :vartype group_header_version: str - :ivar transaction_set_control_number_lower_bound: Required. The transaction set control number - lower bound. - :vartype transaction_set_control_number_lower_bound: int - :ivar transaction_set_control_number_upper_bound: Required. The transaction set control number - upper bound. - :vartype transaction_set_control_number_upper_bound: int - :ivar rollover_transaction_set_control_number: Required. The value indicating whether to - rollover transaction set control number. - :vartype rollover_transaction_set_control_number: bool - :ivar transaction_set_control_number_prefix: The transaction set control number prefix. - :vartype transaction_set_control_number_prefix: str - :ivar transaction_set_control_number_suffix: The transaction set control number suffix. - :vartype transaction_set_control_number_suffix: str - :ivar overwrite_existing_transaction_set_control_number: Required. The value indicating whether - to overwrite existing transaction set control number. - :vartype overwrite_existing_transaction_set_control_number: bool - :ivar group_header_date_format: Required. The group header date format. Possible values - include: "NotSpecified", "CCYYMMDD", "YYMMDD". - :vartype group_header_date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :ivar group_header_time_format: Required. The group header time format. Possible values - include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :vartype group_header_time_format: str or ~azure.mgmt.logic.models.X12TimeFormat - :ivar usage_indicator: Required. The usage indicator. Possible values include: "NotSpecified", - "Test", "Information", "Production". - :vartype usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator - """ - - _validation = { - 'control_standards_id': {'required': True}, - 'use_control_standards_id_as_repetition_character': {'required': True}, - 'sender_application_id': {'required': True}, - 'receiver_application_id': {'required': True}, - 'control_version_number': {'required': True}, - 'interchange_control_number_lower_bound': {'required': True}, - 'interchange_control_number_upper_bound': {'required': True}, - 'rollover_interchange_control_number': {'required': True}, - 'enable_default_group_headers': {'required': True}, - 'group_control_number_lower_bound': {'required': True}, - 'group_control_number_upper_bound': {'required': True}, - 'rollover_group_control_number': {'required': True}, - 'group_header_agency_code': {'required': True}, - 'group_header_version': {'required': True}, - 'transaction_set_control_number_lower_bound': {'required': True}, - 'transaction_set_control_number_upper_bound': {'required': True}, - 'rollover_transaction_set_control_number': {'required': True}, - 'overwrite_existing_transaction_set_control_number': {'required': True}, - 'group_header_date_format': {'required': True}, - 'group_header_time_format': {'required': True}, - 'usage_indicator': {'required': True}, - } - - _attribute_map = { - 'control_standards_id': {'key': 'controlStandardsId', 'type': 'int'}, - 'use_control_standards_id_as_repetition_character': {'key': 'useControlStandardsIdAsRepetitionCharacter', 'type': 'bool'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'control_version_number': {'key': 'controlVersionNumber', 'type': 'str'}, - 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'int'}, - 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'int'}, - 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, - 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'int'}, - 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'int'}, - 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, - 'group_header_agency_code': {'key': 'groupHeaderAgencyCode', 'type': 'str'}, - 'group_header_version': {'key': 'groupHeaderVersion', 'type': 'str'}, - 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'int'}, - 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'int'}, - 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, - 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, - 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, - 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, - 'group_header_date_format': {'key': 'groupHeaderDateFormat', 'type': 'str'}, - 'group_header_time_format': {'key': 'groupHeaderTimeFormat', 'type': 'str'}, - 'usage_indicator': {'key': 'usageIndicator', 'type': 'str'}, - } - - def __init__( - self, - *, - control_standards_id: int, - use_control_standards_id_as_repetition_character: bool, - sender_application_id: str, - receiver_application_id: str, - control_version_number: str, - interchange_control_number_lower_bound: int, - interchange_control_number_upper_bound: int, - rollover_interchange_control_number: bool, - enable_default_group_headers: bool, - group_control_number_lower_bound: int, - group_control_number_upper_bound: int, - rollover_group_control_number: bool, - group_header_agency_code: str, - group_header_version: str, - transaction_set_control_number_lower_bound: int, - transaction_set_control_number_upper_bound: int, - rollover_transaction_set_control_number: bool, - overwrite_existing_transaction_set_control_number: bool, - group_header_date_format: Union[str, "X12DateFormat"], - group_header_time_format: Union[str, "X12TimeFormat"], - usage_indicator: Union[str, "UsageIndicator"], - functional_group_id: Optional[str] = None, - transaction_set_control_number_prefix: Optional[str] = None, - transaction_set_control_number_suffix: Optional[str] = None, - **kwargs - ): - """ - :keyword control_standards_id: Required. The controls standards id. - :paramtype control_standards_id: int - :keyword use_control_standards_id_as_repetition_character: Required. The value indicating - whether to use control standards id as repetition character. - :paramtype use_control_standards_id_as_repetition_character: bool - :keyword sender_application_id: Required. The sender application id. - :paramtype sender_application_id: str - :keyword receiver_application_id: Required. The receiver application id. - :paramtype receiver_application_id: str - :keyword control_version_number: Required. The control version number. - :paramtype control_version_number: str - :keyword interchange_control_number_lower_bound: Required. The interchange control number - lower bound. - :paramtype interchange_control_number_lower_bound: int - :keyword interchange_control_number_upper_bound: Required. The interchange control number - upper bound. - :paramtype interchange_control_number_upper_bound: int - :keyword rollover_interchange_control_number: Required. The value indicating whether to - rollover interchange control number. - :paramtype rollover_interchange_control_number: bool - :keyword enable_default_group_headers: Required. The value indicating whether to enable default - group headers. - :paramtype enable_default_group_headers: bool - :keyword functional_group_id: The functional group id. - :paramtype functional_group_id: str - :keyword group_control_number_lower_bound: Required. The group control number lower bound. - :paramtype group_control_number_lower_bound: int - :keyword group_control_number_upper_bound: Required. The group control number upper bound. - :paramtype group_control_number_upper_bound: int - :keyword rollover_group_control_number: Required. The value indicating whether to rollover - group control number. - :paramtype rollover_group_control_number: bool - :keyword group_header_agency_code: Required. The group header agency code. - :paramtype group_header_agency_code: str - :keyword group_header_version: Required. The group header version. - :paramtype group_header_version: str - :keyword transaction_set_control_number_lower_bound: Required. The transaction set control - number lower bound. - :paramtype transaction_set_control_number_lower_bound: int - :keyword transaction_set_control_number_upper_bound: Required. The transaction set control - number upper bound. - :paramtype transaction_set_control_number_upper_bound: int - :keyword rollover_transaction_set_control_number: Required. The value indicating whether to - rollover transaction set control number. - :paramtype rollover_transaction_set_control_number: bool - :keyword transaction_set_control_number_prefix: The transaction set control number prefix. - :paramtype transaction_set_control_number_prefix: str - :keyword transaction_set_control_number_suffix: The transaction set control number suffix. - :paramtype transaction_set_control_number_suffix: str - :keyword overwrite_existing_transaction_set_control_number: Required. The value indicating - whether to overwrite existing transaction set control number. - :paramtype overwrite_existing_transaction_set_control_number: bool - :keyword group_header_date_format: Required. The group header date format. Possible values - include: "NotSpecified", "CCYYMMDD", "YYMMDD". - :paramtype group_header_date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :keyword group_header_time_format: Required. The group header time format. Possible values - include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :paramtype group_header_time_format: str or ~azure.mgmt.logic.models.X12TimeFormat - :keyword usage_indicator: Required. The usage indicator. Possible values include: - "NotSpecified", "Test", "Information", "Production". - :paramtype usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator - """ - super(X12EnvelopeSettings, self).__init__(**kwargs) - self.control_standards_id = control_standards_id - self.use_control_standards_id_as_repetition_character = use_control_standards_id_as_repetition_character - self.sender_application_id = sender_application_id - self.receiver_application_id = receiver_application_id - self.control_version_number = control_version_number - self.interchange_control_number_lower_bound = interchange_control_number_lower_bound - self.interchange_control_number_upper_bound = interchange_control_number_upper_bound - self.rollover_interchange_control_number = rollover_interchange_control_number - self.enable_default_group_headers = enable_default_group_headers - self.functional_group_id = functional_group_id - self.group_control_number_lower_bound = group_control_number_lower_bound - self.group_control_number_upper_bound = group_control_number_upper_bound - self.rollover_group_control_number = rollover_group_control_number - self.group_header_agency_code = group_header_agency_code - self.group_header_version = group_header_version - self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound - self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound - self.rollover_transaction_set_control_number = rollover_transaction_set_control_number - self.transaction_set_control_number_prefix = transaction_set_control_number_prefix - self.transaction_set_control_number_suffix = transaction_set_control_number_suffix - self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number - self.group_header_date_format = group_header_date_format - self.group_header_time_format = group_header_time_format - self.usage_indicator = usage_indicator - - -class X12FramingSettings(msrest.serialization.Model): - """The X12 agreement framing settings. - - All required parameters must be populated in order to send to Azure. - - :ivar data_element_separator: Required. The data element separator. - :vartype data_element_separator: int - :ivar component_separator: Required. The component separator. - :vartype component_separator: int - :ivar replace_separators_in_payload: Required. The value indicating whether to replace - separators in payload. - :vartype replace_separators_in_payload: bool - :ivar replace_character: Required. The replacement character. - :vartype replace_character: int - :ivar segment_terminator: Required. The segment terminator. - :vartype segment_terminator: int - :ivar character_set: Required. The X12 character set. Possible values include: "NotSpecified", - "Basic", "Extended", "UTF8". - :vartype character_set: str or ~azure.mgmt.logic.models.X12CharacterSet - :ivar segment_terminator_suffix: Required. The segment terminator suffix. Possible values - include: "NotSpecified", "None", "CR", "LF", "CRLF". - :vartype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'replace_separators_in_payload': {'required': True}, - 'replace_character': {'required': True}, - 'segment_terminator': {'required': True}, - 'character_set': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - } - - _attribute_map = { - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, - 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'character_set': {'key': 'characterSet', 'type': 'str'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'str'}, - } - - def __init__( - self, - *, - data_element_separator: int, - component_separator: int, - replace_separators_in_payload: bool, - replace_character: int, - segment_terminator: int, - character_set: Union[str, "X12CharacterSet"], - segment_terminator_suffix: Union[str, "SegmentTerminatorSuffix"], - **kwargs - ): - """ - :keyword data_element_separator: Required. The data element separator. - :paramtype data_element_separator: int - :keyword component_separator: Required. The component separator. - :paramtype component_separator: int - :keyword replace_separators_in_payload: Required. The value indicating whether to replace - separators in payload. - :paramtype replace_separators_in_payload: bool - :keyword replace_character: Required. The replacement character. - :paramtype replace_character: int - :keyword segment_terminator: Required. The segment terminator. - :paramtype segment_terminator: int - :keyword character_set: Required. The X12 character set. Possible values include: - "NotSpecified", "Basic", "Extended", "UTF8". - :paramtype character_set: str or ~azure.mgmt.logic.models.X12CharacterSet - :keyword segment_terminator_suffix: Required. The segment terminator suffix. Possible values - include: "NotSpecified", "None", "CR", "LF", "CRLF". - :paramtype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - super(X12FramingSettings, self).__init__(**kwargs) - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.replace_separators_in_payload = replace_separators_in_payload - self.replace_character = replace_character - self.segment_terminator = segment_terminator - self.character_set = character_set - self.segment_terminator_suffix = segment_terminator_suffix - - -class X12MessageFilter(msrest.serialization.Model): - """The X12 message filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :ivar message_filter_type: Required. The message filter type. Possible values include: - "NotSpecified", "Include", "Exclude". - :vartype message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType - """ - - _validation = { - 'message_filter_type': {'required': True}, - } - - _attribute_map = { - 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, - } - - def __init__( - self, - *, - message_filter_type: Union[str, "MessageFilterType"], - **kwargs - ): - """ - :keyword message_filter_type: Required. The message filter type. Possible values include: - "NotSpecified", "Include", "Exclude". - :paramtype message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType - """ - super(X12MessageFilter, self).__init__(**kwargs) - self.message_filter_type = message_filter_type - - -class X12MessageIdentifier(msrest.serialization.Model): - """The X12 message identifier. - - All required parameters must be populated in order to send to Azure. - - :ivar message_id: Required. The message id. - :vartype message_id: str - """ - - _validation = { - 'message_id': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - } - - def __init__( - self, - *, - message_id: str, - **kwargs - ): - """ - :keyword message_id: Required. The message id. - :paramtype message_id: str - """ - super(X12MessageIdentifier, self).__init__(**kwargs) - self.message_id = message_id - - -class X12OneWayAgreement(msrest.serialization.Model): - """The X12 one-way agreement. - - All required parameters must be populated in order to send to Azure. - - :ivar sender_business_identity: Required. The sender business identity. - :vartype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :ivar receiver_business_identity: Required. The receiver business identity. - :vartype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :ivar protocol_settings: Required. The X12 protocol settings. - :vartype protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, - } - - def __init__( - self, - *, - sender_business_identity: "BusinessIdentity", - receiver_business_identity: "BusinessIdentity", - protocol_settings: "X12ProtocolSettings", - **kwargs - ): - """ - :keyword sender_business_identity: Required. The sender business identity. - :paramtype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :keyword receiver_business_identity: Required. The receiver business identity. - :paramtype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :keyword protocol_settings: Required. The X12 protocol settings. - :paramtype protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings - """ - super(X12OneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings - - -class X12ProcessingSettings(msrest.serialization.Model): - """The X12 processing settings. - - All required parameters must be populated in order to send to Azure. - - :ivar mask_security_info: Required. The value indicating whether to mask security information. - :vartype mask_security_info: bool - :ivar convert_implied_decimal: Required. The value indicating whether to convert numerical type - to implied decimal. - :vartype convert_implied_decimal: bool - :ivar preserve_interchange: Required. The value indicating whether to preserve interchange. - :vartype preserve_interchange: bool - :ivar suspend_interchange_on_error: Required. The value indicating whether to suspend - interchange on error. - :vartype suspend_interchange_on_error: bool - :ivar create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether to - create empty xml tags for trailing separators. - :vartype create_empty_xml_tags_for_trailing_separators: bool - :ivar use_dot_as_decimal_separator: Required. The value indicating whether to use dot as - decimal separator. - :vartype use_dot_as_decimal_separator: bool - """ - - _validation = { - 'mask_security_info': {'required': True}, - 'convert_implied_decimal': {'required': True}, - 'preserve_interchange': {'required': True}, - 'suspend_interchange_on_error': {'required': True}, - 'create_empty_xml_tags_for_trailing_separators': {'required': True}, - 'use_dot_as_decimal_separator': {'required': True}, - } - - _attribute_map = { - 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, - 'convert_implied_decimal': {'key': 'convertImpliedDecimal', 'type': 'bool'}, - 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, - 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, - 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, - 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, - } - - def __init__( - self, - *, - mask_security_info: bool, - convert_implied_decimal: bool, - preserve_interchange: bool, - suspend_interchange_on_error: bool, - create_empty_xml_tags_for_trailing_separators: bool, - use_dot_as_decimal_separator: bool, - **kwargs - ): - """ - :keyword mask_security_info: Required. The value indicating whether to mask security - information. - :paramtype mask_security_info: bool - :keyword convert_implied_decimal: Required. The value indicating whether to convert numerical - type to implied decimal. - :paramtype convert_implied_decimal: bool - :keyword preserve_interchange: Required. The value indicating whether to preserve interchange. - :paramtype preserve_interchange: bool - :keyword suspend_interchange_on_error: Required. The value indicating whether to suspend - interchange on error. - :paramtype suspend_interchange_on_error: bool - :keyword create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether - to create empty xml tags for trailing separators. - :paramtype create_empty_xml_tags_for_trailing_separators: bool - :keyword use_dot_as_decimal_separator: Required. The value indicating whether to use dot as - decimal separator. - :paramtype use_dot_as_decimal_separator: bool - """ - super(X12ProcessingSettings, self).__init__(**kwargs) - self.mask_security_info = mask_security_info - self.convert_implied_decimal = convert_implied_decimal - self.preserve_interchange = preserve_interchange - self.suspend_interchange_on_error = suspend_interchange_on_error - self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators - self.use_dot_as_decimal_separator = use_dot_as_decimal_separator - - -class X12ProtocolSettings(msrest.serialization.Model): - """The X12 agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :ivar validation_settings: Required. The X12 validation settings. - :vartype validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings - :ivar framing_settings: Required. The X12 framing settings. - :vartype framing_settings: ~azure.mgmt.logic.models.X12FramingSettings - :ivar envelope_settings: Required. The X12 envelope settings. - :vartype envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings - :ivar acknowledgement_settings: Required. The X12 acknowledgment settings. - :vartype acknowledgement_settings: ~azure.mgmt.logic.models.X12AcknowledgementSettings - :ivar message_filter: Required. The X12 message filter. - :vartype message_filter: ~azure.mgmt.logic.models.X12MessageFilter - :ivar security_settings: Required. The X12 security settings. - :vartype security_settings: ~azure.mgmt.logic.models.X12SecuritySettings - :ivar processing_settings: Required. The X12 processing settings. - :vartype processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings - :ivar envelope_overrides: The X12 envelope override settings. - :vartype envelope_overrides: list[~azure.mgmt.logic.models.X12EnvelopeOverride] - :ivar validation_overrides: The X12 validation override settings. - :vartype validation_overrides: list[~azure.mgmt.logic.models.X12ValidationOverride] - :ivar message_filter_list: The X12 message filter list. - :vartype message_filter_list: list[~azure.mgmt.logic.models.X12MessageIdentifier] - :ivar schema_references: Required. The X12 schema references. - :vartype schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] - :ivar x12_delimiter_overrides: The X12 delimiter override settings. - :vartype x12_delimiter_overrides: list[~azure.mgmt.logic.models.X12DelimiterOverrides] - """ - - _validation = { - 'validation_settings': {'required': True}, - 'framing_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'acknowledgement_settings': {'required': True}, - 'message_filter': {'required': True}, - 'security_settings': {'required': True}, - 'processing_settings': {'required': True}, - 'schema_references': {'required': True}, - } - - _attribute_map = { - 'validation_settings': {'key': 'validationSettings', 'type': 'X12ValidationSettings'}, - 'framing_settings': {'key': 'framingSettings', 'type': 'X12FramingSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'X12EnvelopeSettings'}, - 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'X12AcknowledgementSettings'}, - 'message_filter': {'key': 'messageFilter', 'type': 'X12MessageFilter'}, - 'security_settings': {'key': 'securitySettings', 'type': 'X12SecuritySettings'}, - 'processing_settings': {'key': 'processingSettings', 'type': 'X12ProcessingSettings'}, - 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[X12EnvelopeOverride]'}, - 'validation_overrides': {'key': 'validationOverrides', 'type': '[X12ValidationOverride]'}, - 'message_filter_list': {'key': 'messageFilterList', 'type': '[X12MessageIdentifier]'}, - 'schema_references': {'key': 'schemaReferences', 'type': '[X12SchemaReference]'}, - 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, - } - - def __init__( - self, - *, - validation_settings: "X12ValidationSettings", - framing_settings: "X12FramingSettings", - envelope_settings: "X12EnvelopeSettings", - acknowledgement_settings: "X12AcknowledgementSettings", - message_filter: "X12MessageFilter", - security_settings: "X12SecuritySettings", - processing_settings: "X12ProcessingSettings", - schema_references: List["X12SchemaReference"], - envelope_overrides: Optional[List["X12EnvelopeOverride"]] = None, - validation_overrides: Optional[List["X12ValidationOverride"]] = None, - message_filter_list: Optional[List["X12MessageIdentifier"]] = None, - x12_delimiter_overrides: Optional[List["X12DelimiterOverrides"]] = None, - **kwargs - ): - """ - :keyword validation_settings: Required. The X12 validation settings. - :paramtype validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings - :keyword framing_settings: Required. The X12 framing settings. - :paramtype framing_settings: ~azure.mgmt.logic.models.X12FramingSettings - :keyword envelope_settings: Required. The X12 envelope settings. - :paramtype envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings - :keyword acknowledgement_settings: Required. The X12 acknowledgment settings. - :paramtype acknowledgement_settings: ~azure.mgmt.logic.models.X12AcknowledgementSettings - :keyword message_filter: Required. The X12 message filter. - :paramtype message_filter: ~azure.mgmt.logic.models.X12MessageFilter - :keyword security_settings: Required. The X12 security settings. - :paramtype security_settings: ~azure.mgmt.logic.models.X12SecuritySettings - :keyword processing_settings: Required. The X12 processing settings. - :paramtype processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings - :keyword envelope_overrides: The X12 envelope override settings. - :paramtype envelope_overrides: list[~azure.mgmt.logic.models.X12EnvelopeOverride] - :keyword validation_overrides: The X12 validation override settings. - :paramtype validation_overrides: list[~azure.mgmt.logic.models.X12ValidationOverride] - :keyword message_filter_list: The X12 message filter list. - :paramtype message_filter_list: list[~azure.mgmt.logic.models.X12MessageIdentifier] - :keyword schema_references: Required. The X12 schema references. - :paramtype schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] - :keyword x12_delimiter_overrides: The X12 delimiter override settings. - :paramtype x12_delimiter_overrides: list[~azure.mgmt.logic.models.X12DelimiterOverrides] - """ - super(X12ProtocolSettings, self).__init__(**kwargs) - self.validation_settings = validation_settings - self.framing_settings = framing_settings - self.envelope_settings = envelope_settings - self.acknowledgement_settings = acknowledgement_settings - self.message_filter = message_filter - self.security_settings = security_settings - self.processing_settings = processing_settings - self.envelope_overrides = envelope_overrides - self.validation_overrides = validation_overrides - self.message_filter_list = message_filter_list - self.schema_references = schema_references - self.x12_delimiter_overrides = x12_delimiter_overrides - - -class X12SchemaReference(msrest.serialization.Model): - """The X12 schema reference. - - All required parameters must be populated in order to send to Azure. - - :ivar message_id: Required. The message id. - :vartype message_id: str - :ivar sender_application_id: The sender application id. - :vartype sender_application_id: str - :ivar schema_version: Required. The schema version. - :vartype schema_version: str - :ivar schema_name: Required. The schema name. - :vartype schema_name: str - """ - - _validation = { - 'message_id': {'required': True}, - 'schema_version': {'required': True}, - 'schema_name': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'schema_version': {'key': 'schemaVersion', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - } - - def __init__( - self, - *, - message_id: str, - schema_version: str, - schema_name: str, - sender_application_id: Optional[str] = None, - **kwargs - ): - """ - :keyword message_id: Required. The message id. - :paramtype message_id: str - :keyword sender_application_id: The sender application id. - :paramtype sender_application_id: str - :keyword schema_version: Required. The schema version. - :paramtype schema_version: str - :keyword schema_name: Required. The schema name. - :paramtype schema_name: str - """ - super(X12SchemaReference, self).__init__(**kwargs) - self.message_id = message_id - self.sender_application_id = sender_application_id - self.schema_version = schema_version - self.schema_name = schema_name - - -class X12SecuritySettings(msrest.serialization.Model): - """The X12 agreement security settings. - - All required parameters must be populated in order to send to Azure. - - :ivar authorization_qualifier: Required. The authorization qualifier. - :vartype authorization_qualifier: str - :ivar authorization_value: The authorization value. - :vartype authorization_value: str - :ivar security_qualifier: Required. The security qualifier. - :vartype security_qualifier: str - :ivar password_value: The password value. - :vartype password_value: str - """ - - _validation = { - 'authorization_qualifier': {'required': True}, - 'security_qualifier': {'required': True}, - } - - _attribute_map = { - 'authorization_qualifier': {'key': 'authorizationQualifier', 'type': 'str'}, - 'authorization_value': {'key': 'authorizationValue', 'type': 'str'}, - 'security_qualifier': {'key': 'securityQualifier', 'type': 'str'}, - 'password_value': {'key': 'passwordValue', 'type': 'str'}, - } - - def __init__( - self, - *, - authorization_qualifier: str, - security_qualifier: str, - authorization_value: Optional[str] = None, - password_value: Optional[str] = None, - **kwargs - ): - """ - :keyword authorization_qualifier: Required. The authorization qualifier. - :paramtype authorization_qualifier: str - :keyword authorization_value: The authorization value. - :paramtype authorization_value: str - :keyword security_qualifier: Required. The security qualifier. - :paramtype security_qualifier: str - :keyword password_value: The password value. - :paramtype password_value: str - """ - super(X12SecuritySettings, self).__init__(**kwargs) - self.authorization_qualifier = authorization_qualifier - self.authorization_value = authorization_value - self.security_qualifier = security_qualifier - self.password_value = password_value - - -class X12ValidationOverride(msrest.serialization.Model): - """The X12 validation override settings. - - All required parameters must be populated in order to send to Azure. - - :ivar message_id: Required. The message id on which the validation settings has to be applied. - :vartype message_id: str - :ivar validate_edi_types: Required. The value indicating whether to validate EDI types. - :vartype validate_edi_types: bool - :ivar validate_xsd_types: Required. The value indicating whether to validate XSD types. - :vartype validate_xsd_types: bool - :ivar allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - allow leading and trailing spaces and zeroes. - :vartype allow_leading_and_trailing_spaces_and_zeroes: bool - :ivar validate_character_set: Required. The value indicating whether to validate character Set. - :vartype validate_character_set: bool - :ivar trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :vartype trim_leading_and_trailing_spaces_and_zeroes: bool - :ivar trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :vartype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'message_id': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'validate_character_set': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__( - self, - *, - message_id: str, - validate_edi_types: bool, - validate_xsd_types: bool, - allow_leading_and_trailing_spaces_and_zeroes: bool, - validate_character_set: bool, - trim_leading_and_trailing_spaces_and_zeroes: bool, - trailing_separator_policy: Union[str, "TrailingSeparatorPolicy"], - **kwargs - ): - """ - :keyword message_id: Required. The message id on which the validation settings has to be - applied. - :paramtype message_id: str - :keyword validate_edi_types: Required. The value indicating whether to validate EDI types. - :paramtype validate_edi_types: bool - :keyword validate_xsd_types: Required. The value indicating whether to validate XSD types. - :paramtype validate_xsd_types: bool - :keyword allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether - to allow leading and trailing spaces and zeroes. - :paramtype allow_leading_and_trailing_spaces_and_zeroes: bool - :keyword validate_character_set: Required. The value indicating whether to validate character - Set. - :paramtype validate_character_set: bool - :keyword trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :paramtype trim_leading_and_trailing_spaces_and_zeroes: bool - :keyword trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :paramtype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - super(X12ValidationOverride, self).__init__(**kwargs) - self.message_id = message_id - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.validate_character_set = validate_character_set - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy - - -class X12ValidationSettings(msrest.serialization.Model): - """The X12 agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :ivar validate_character_set: Required. The value indicating whether to validate character set - in the message. - :vartype validate_character_set: bool - :ivar check_duplicate_interchange_control_number: Required. The value indicating whether to - check for duplicate interchange control number. - :vartype check_duplicate_interchange_control_number: bool - :ivar interchange_control_number_validity_days: Required. The validity period of interchange - control number. - :vartype interchange_control_number_validity_days: int - :ivar check_duplicate_group_control_number: Required. The value indicating whether to check for - duplicate group control number. - :vartype check_duplicate_group_control_number: bool - :ivar check_duplicate_transaction_set_control_number: Required. The value indicating whether to - check for duplicate transaction set control number. - :vartype check_duplicate_transaction_set_control_number: bool - :ivar validate_edi_types: Required. The value indicating whether to Whether to validate EDI - types. - :vartype validate_edi_types: bool - :ivar validate_xsd_types: Required. The value indicating whether to Whether to validate XSD - types. - :vartype validate_xsd_types: bool - :ivar allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - allow leading and trailing spaces and zeroes. - :vartype allow_leading_and_trailing_spaces_and_zeroes: bool - :ivar trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :vartype trim_leading_and_trailing_spaces_and_zeroes: bool - :ivar trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :vartype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'validate_character_set': {'required': True}, - 'check_duplicate_interchange_control_number': {'required': True}, - 'interchange_control_number_validity_days': {'required': True}, - 'check_duplicate_group_control_number': {'required': True}, - 'check_duplicate_transaction_set_control_number': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, - 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, - 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__( - self, - *, - validate_character_set: bool, - check_duplicate_interchange_control_number: bool, - interchange_control_number_validity_days: int, - check_duplicate_group_control_number: bool, - check_duplicate_transaction_set_control_number: bool, - validate_edi_types: bool, - validate_xsd_types: bool, - allow_leading_and_trailing_spaces_and_zeroes: bool, - trim_leading_and_trailing_spaces_and_zeroes: bool, - trailing_separator_policy: Union[str, "TrailingSeparatorPolicy"], - **kwargs - ): - """ - :keyword validate_character_set: Required. The value indicating whether to validate character - set in the message. - :paramtype validate_character_set: bool - :keyword check_duplicate_interchange_control_number: Required. The value indicating whether to - check for duplicate interchange control number. - :paramtype check_duplicate_interchange_control_number: bool - :keyword interchange_control_number_validity_days: Required. The validity period of interchange - control number. - :paramtype interchange_control_number_validity_days: int - :keyword check_duplicate_group_control_number: Required. The value indicating whether to check - for duplicate group control number. - :paramtype check_duplicate_group_control_number: bool - :keyword check_duplicate_transaction_set_control_number: Required. The value indicating whether - to check for duplicate transaction set control number. - :paramtype check_duplicate_transaction_set_control_number: bool - :keyword validate_edi_types: Required. The value indicating whether to Whether to validate EDI - types. - :paramtype validate_edi_types: bool - :keyword validate_xsd_types: Required. The value indicating whether to Whether to validate XSD - types. - :paramtype validate_xsd_types: bool - :keyword allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether - to allow leading and trailing spaces and zeroes. - :paramtype allow_leading_and_trailing_spaces_and_zeroes: bool - :keyword trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :paramtype trim_leading_and_trailing_spaces_and_zeroes: bool - :keyword trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :paramtype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - super(X12ValidationSettings, self).__init__(**kwargs) - self.validate_character_set = validate_character_set - self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number - self.interchange_control_number_validity_days = interchange_control_number_validity_days - self.check_duplicate_group_control_number = check_duplicate_group_control_number - self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py deleted file mode 100644 index 5c557560db0..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._workflows_operations import WorkflowsOperations -from ._workflow_versions_operations import WorkflowVersionsOperations -from ._workflow_triggers_operations import WorkflowTriggersOperations -from ._workflow_version_triggers_operations import WorkflowVersionTriggersOperations -from ._workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations -from ._workflow_runs_operations import WorkflowRunsOperations -from ._workflow_run_actions_operations import WorkflowRunActionsOperations -from ._workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations -from ._workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations -from ._workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations -from ._workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations -from ._workflow_run_operations_operations import WorkflowRunOperationsOperations -from ._integration_accounts_operations import IntegrationAccountsOperations -from ._integration_account_assemblies_operations import IntegrationAccountAssembliesOperations -from ._integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations -from ._integration_account_schemas_operations import IntegrationAccountSchemasOperations -from ._integration_account_maps_operations import IntegrationAccountMapsOperations -from ._integration_account_partners_operations import IntegrationAccountPartnersOperations -from ._integration_account_agreements_operations import IntegrationAccountAgreementsOperations -from ._integration_account_certificates_operations import IntegrationAccountCertificatesOperations -from ._integration_account_sessions_operations import IntegrationAccountSessionsOperations -from ._integration_service_environments_operations import IntegrationServiceEnvironmentsOperations -from ._integration_service_environment_skus_operations import IntegrationServiceEnvironmentSkusOperations -from ._integration_service_environment_network_health_operations import IntegrationServiceEnvironmentNetworkHealthOperations -from ._integration_service_environment_managed_apis_operations import IntegrationServiceEnvironmentManagedApisOperations -from ._integration_service_environment_managed_api_operations_operations import IntegrationServiceEnvironmentManagedApiOperationsOperations -from ._operations import Operations - -__all__ = [ - 'WorkflowsOperations', - 'WorkflowVersionsOperations', - 'WorkflowTriggersOperations', - 'WorkflowVersionTriggersOperations', - 'WorkflowTriggerHistoriesOperations', - 'WorkflowRunsOperations', - 'WorkflowRunActionsOperations', - 'WorkflowRunActionRepetitionsOperations', - 'WorkflowRunActionRepetitionsRequestHistoriesOperations', - 'WorkflowRunActionRequestHistoriesOperations', - 'WorkflowRunActionScopeRepetitionsOperations', - 'WorkflowRunOperationsOperations', - 'IntegrationAccountsOperations', - 'IntegrationAccountAssembliesOperations', - 'IntegrationAccountBatchConfigurationsOperations', - 'IntegrationAccountSchemasOperations', - 'IntegrationAccountMapsOperations', - 'IntegrationAccountPartnersOperations', - 'IntegrationAccountAgreementsOperations', - 'IntegrationAccountCertificatesOperations', - 'IntegrationAccountSessionsOperations', - 'IntegrationServiceEnvironmentsOperations', - 'IntegrationServiceEnvironmentSkusOperations', - 'IntegrationServiceEnvironmentNetworkHealthOperations', - 'IntegrationServiceEnvironmentManagedApisOperations', - 'IntegrationServiceEnvironmentManagedApiOperationsOperations', - 'Operations', -] diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py deleted file mode 100644 index f372c09328f..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py +++ /dev/null @@ -1,621 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "agreementName": _SERIALIZER.url("agreement_name", agreement_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "agreementName": _SERIALIZER.url("agreement_name", agreement_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "agreementName": _SERIALIZER.url("agreement_name", agreement_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_content_callback_url_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "agreementName": _SERIALIZER.url("agreement_name", agreement_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class IntegrationAccountAgreementsOperations(object): - """IntegrationAccountAgreementsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: - AgreementType. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountAgreementListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreementListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - agreement_name=agreement_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - agreement: "_models.IntegrationAccountAgreement", - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(agreement, 'IntegrationAccountAgreement') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - agreement_name=agreement_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - agreement_name=agreement_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - list_content_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_content_callback_url: - :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - agreement_name=agreement_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_account_assemblies_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assemblies_operations.py deleted file mode 100644 index dbd34a4f7f8..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assemblies_operations.py +++ /dev/null @@ -1,586 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "assemblyArtifactName": _SERIALIZER.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "assemblyArtifactName": _SERIALIZER.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "assemblyArtifactName": _SERIALIZER.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_content_callback_url_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "assemblyArtifactName": _SERIALIZER.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class IntegrationAccountAssembliesOperations(object): - """IntegrationAccountAssembliesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.AssemblyCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.AssemblyCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - assembly_artifact_name=assembly_artifact_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - assembly_artifact: "_models.AssemblyDefinition", - **kwargs: Any - ) -> "_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 assembly_artifact: The assembly artifact. - :type assembly_artifact: ~azure.mgmt.logic.models.AssemblyDefinition - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(assembly_artifact, 'AssemblyDefinition') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - assembly_artifact_name=assembly_artifact_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - assembly_artifact_name=assembly_artifact_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - assembly_artifact_name=assembly_artifact_name, - api_version=api_version, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_account_batch_configurations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configurations_operations.py deleted file mode 100644 index 4e1e4c5c0ec..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configurations_operations.py +++ /dev/null @@ -1,486 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "batchConfigurationName": _SERIALIZER.url("batch_configuration_name", batch_configuration_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "batchConfigurationName": _SERIALIZER.url("batch_configuration_name", batch_configuration_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "batchConfigurationName": _SERIALIZER.url("batch_configuration_name", batch_configuration_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class IntegrationAccountBatchConfigurationsOperations(object): - """IntegrationAccountBatchConfigurationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.BatchConfigurationCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchConfigurationCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - batch_configuration_name=batch_configuration_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - batch_configuration: "_models.BatchConfiguration", - **kwargs: Any - ) -> "_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_configuration: The batch configuration. - :type batch_configuration: ~azure.mgmt.logic.models.BatchConfiguration - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(batch_configuration, 'BatchConfiguration') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - batch_configuration_name=batch_configuration_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - batch_configuration_name=batch_configuration_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_account_certificates_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificates_operations.py deleted file mode 100644 index f7c31d7ddc9..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificates_operations.py +++ /dev/null @@ -1,496 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class IntegrationAccountCertificatesOperations(object): - """IntegrationAccountCertificatesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountCertificateListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificateListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - certificate_name=certificate_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - certificate: "_models.IntegrationAccountCertificate", - **kwargs: Any - ) -> "_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 certificate: The integration account certificate. - :type certificate: ~azure.mgmt.logic.models.IntegrationAccountCertificate - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(certificate, 'IntegrationAccountCertificate') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - certificate_name=certificate_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - certificate_name=certificate_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_account_maps_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_maps_operations.py deleted file mode 100644 index a3a26e51174..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_maps_operations.py +++ /dev/null @@ -1,622 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - map_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "mapName": _SERIALIZER.url("map_name", map_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - map_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "mapName": _SERIALIZER.url("map_name", map_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - map_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "mapName": _SERIALIZER.url("map_name", map_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_content_callback_url_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - map_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "mapName": _SERIALIZER.url("map_name", map_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class IntegrationAccountMapsOperations(object): - """IntegrationAccountMapsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: MapType. - Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountMapListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountMapListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - map_name=map_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - map: "_models.IntegrationAccountMap", - **kwargs: Any - ) -> "_models.IntegrationAccountMap": - """Creates or updates an integration account map. If the map is larger than 4 MB, you need to - store the map in an Azure blob and use the blob's Shared Access Signature (SAS) URL as the - 'contentLink' property value. - - :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: The integration account map. - :type map: ~azure.mgmt.logic.models.IntegrationAccountMap - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(map, 'IntegrationAccountMap') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - map_name=map_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - map_name=map_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - list_content_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_content_callback_url: - :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - map_name=map_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_account_partners_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partners_operations.py deleted file mode 100644 index e8eacf36762..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partners_operations.py +++ /dev/null @@ -1,621 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "partnerName": _SERIALIZER.url("partner_name", partner_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "partnerName": _SERIALIZER.url("partner_name", partner_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "partnerName": _SERIALIZER.url("partner_name", partner_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_content_callback_url_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "partnerName": _SERIALIZER.url("partner_name", partner_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class IntegrationAccountPartnersOperations(object): - """IntegrationAccountPartnersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: PartnerType. - Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountPartnerListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartnerListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - partner_name=partner_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - partner: "_models.IntegrationAccountPartner", - **kwargs: Any - ) -> "_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: The integration account partner. - :type partner: ~azure.mgmt.logic.models.IntegrationAccountPartner - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(partner, 'IntegrationAccountPartner') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - partner_name=partner_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - partner_name=partner_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - list_content_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_content_callback_url: - :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - partner_name=partner_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_account_schemas_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schemas_operations.py deleted file mode 100644 index 44ba9f683ee..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schemas_operations.py +++ /dev/null @@ -1,621 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_content_callback_url_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class IntegrationAccountSchemasOperations(object): - """IntegrationAccountSchemasOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: SchemaType. - Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountSchemaListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchemaListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - schema_name=schema_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - schema: "_models.IntegrationAccountSchema", - **kwargs: Any - ) -> "_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: The integration account schema. - :type schema: ~azure.mgmt.logic.models.IntegrationAccountSchema - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(schema, 'IntegrationAccountSchema') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - schema_name=schema_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - schema_name=schema_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - list_content_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_content_callback_url: - :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - - request = build_list_content_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - schema_name=schema_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_content_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_account_sessions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_sessions_operations.py deleted file mode 100644 index f2c15ac68ca..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_sessions_operations.py +++ /dev/null @@ -1,505 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - session_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "sessionName": _SERIALIZER.url("session_name", session_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - session_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "sessionName": _SERIALIZER.url("session_name", session_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - session_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - "sessionName": _SERIALIZER.url("session_name", session_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class IntegrationAccountSessionsOperations(object): - """IntegrationAccountSessionsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: ChangedTime. - Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountSessionListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSessionListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - integration_account_name: str, - session_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - session_name=session_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - session_name: str, - session: "_models.IntegrationAccountSession", - **kwargs: Any - ) -> "_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 session: The integration account session. - :type session: ~azure.mgmt.logic.models.IntegrationAccountSession - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(session, 'IntegrationAccountSession') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - session_name=session_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - session_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - session_name=session_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_accounts_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_accounts_operations.py deleted file mode 100644 index d416bc47bfe..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_accounts_operations.py +++ /dev/null @@ -1,1157 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_by_subscription_request( - subscription_id: str, - *, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_by_resource_group_request( - subscription_id: str, - resource_group_name: str, - *, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_update_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_callback_url_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_list_key_vault_keys_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_log_tracking_events_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_regenerate_access_key_request( - subscription_id: str, - resource_group_name: str, - integration_account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class IntegrationAccountsOperations(object): - """IntegrationAccountsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list_by_subscription( - self, - top: Optional[int] = None, - **kwargs: Any - ) -> Iterable["_models.IntegrationAccountListResult"]: - """Gets a list of integration accounts by subscription. - - :param top: The number of items to be included in the result. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - template_url=self.list_by_subscription.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def list_by_resource_group( - self, - resource_group_name: str, - top: Optional[int] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - top=top, - template_url=self.list_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - integration_account: "_models.IntegrationAccount", - **kwargs: Any - ) -> "_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 integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_account, 'IntegrationAccount') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def update( - self, - resource_group_name: str, - integration_account_name: str, - integration_account: "_models.IntegrationAccount", - **kwargs: Any - ) -> "_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 integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_account, 'IntegrationAccount') - - request = build_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - parameters: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 parameters: The callback URL parameters. - :type parameters: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(parameters, 'GetCallbackUrlParameters') - - request = build_list_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_key_vault_keys( - self, - resource_group_name: str, - integration_account_name: str, - list_key_vault_keys: "_models.ListKeyVaultKeysDefinition", - **kwargs: Any - ) -> 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 list_key_vault_keys: The key vault parameters. - :type list_key_vault_keys: ~azure.mgmt.logic.models.ListKeyVaultKeysDefinition - :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.paging.ItemPaged[~azure.mgmt.logic.models.KeyVaultKeyCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyVaultKeyCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - _json = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') - - request = build_list_key_vault_keys_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_key_vault_keys.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - _json = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') - - request = build_list_key_vault_keys_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - - return ItemPaged( - get_next, extract_data - ) - list_key_vault_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys"} # type: ignore - - @distributed_trace - def log_tracking_events( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - integration_account_name: str, - log_tracking_events: "_models.TrackingEventsDefinition", - **kwargs: Any - ) -> 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 log_tracking_events: The callback URL parameters. - :type log_tracking_events: ~azure.mgmt.logic.models.TrackingEventsDefinition - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') - - request = build_log_tracking_events_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.log_tracking_events.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - log_tracking_events.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents"} # type: ignore - - - @distributed_trace - def regenerate_access_key( - self, - resource_group_name: str, - integration_account_name: str, - regenerate_access_key: "_models.RegenerateActionParameter", - **kwargs: Any - ) -> "_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 regenerate_access_key: The access key type. - :type regenerate_access_key: ~azure.mgmt.logic.models.RegenerateActionParameter - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(regenerate_access_key, 'RegenerateActionParameter') - - request = build_regenerate_access_key_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - integration_account_name=integration_account_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.regenerate_access_key.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_service_environment_managed_api_operations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations_operations.py deleted file mode 100644 index 84c1a24d6c3..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations_operations.py +++ /dev/null @@ -1,174 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - "apiName": _SERIALIZER.url("api_name", api_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class IntegrationServiceEnvironmentManagedApiOperationsOperations(object): - """IntegrationServiceEnvironmentManagedApiOperationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.ApiOperationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiOperationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py deleted file mode 100644 index 606b55a1957..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py +++ /dev/null @@ -1,602 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -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 HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - "apiName": _SERIALIZER.url("api_name", api_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_put_request_initial( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - "apiName": _SERIALIZER.url("api_name", api_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request_initial( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - "apiName": _SERIALIZER.url("api_name", api_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class IntegrationServiceEnvironmentManagedApisOperations(object): - """IntegrationServiceEnvironmentManagedApisOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> Iterable["_models.IntegrationServiceEnvironmentManagedApiListResult"]: - """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 IntegrationServiceEnvironmentManagedApiListResult - or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApiListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IntegrationServiceEnvironmentManagedApiListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any - ) -> "_models.IntegrationServiceEnvironmentManagedApi": - """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: IntegrationServiceEnvironmentManagedApi, or the result of cls(response) - :rtype: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', 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 - - - def _put_initial( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - integration_service_environment_managed_api: "_models.IntegrationServiceEnvironmentManagedApi", - **kwargs: Any - ) -> "_models.IntegrationServiceEnvironmentManagedApi": - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_service_environment_managed_api, 'IntegrationServiceEnvironmentManagedApi') - - request = build_put_request_initial( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self._put_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', 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 - - - @distributed_trace - def begin_put( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - integration_service_environment_managed_api: "_models.IntegrationServiceEnvironmentManagedApi", - **kwargs: Any - ) -> LROPoller["_models.IntegrationServiceEnvironmentManagedApi"]: - """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 - :param integration_service_environment_managed_api: The integration service environment managed - api. - :type integration_service_environment_managed_api: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi - :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: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :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 IntegrationServiceEnvironmentManagedApi - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] - 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, - integration_service_environment_managed_api=integration_service_environment_managed_api, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - 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 - ) - 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( # pylint: disable=inconsistent-return-statements - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - template_url=self._delete_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, 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 - - - @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs: Any - ) -> LROPoller[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: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :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 - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - 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 = self._delete_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - api_version=api_version, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - 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 - ) - 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 deleted file mode 100644 index f29dca2895b..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_network_health_operations.py +++ /dev/null @@ -1,143 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_get_request( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class IntegrationServiceEnvironmentNetworkHealthOperations(object): - """IntegrationServiceEnvironmentNetworkHealthOperations 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: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def get( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> 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, ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_integration_service_environment_skus_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_skus_operations.py deleted file mode 100644 index 1e4f51eb454..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_skus_operations.py +++ /dev/null @@ -1,168 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class IntegrationServiceEnvironmentSkusOperations(object): - """IntegrationServiceEnvironmentSkusOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentSkuList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py deleted file mode 100644 index ba39412535c..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py +++ /dev/null @@ -1,903 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -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 HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_by_subscription_request( - subscription_id: str, - *, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_by_resource_group_request( - subscription_id: str, - resource_group: str, - *, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request_initial( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_update_request_initial( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_restart_request( - subscription_id: str, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), - "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class IntegrationServiceEnvironmentsOperations(object): - """IntegrationServiceEnvironmentsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list_by_subscription( - self, - top: Optional[int] = None, - **kwargs: Any - ) -> Iterable["_models.IntegrationServiceEnvironmentListResult"]: - """Gets a list of integration service environments by subscription. - - :param top: The number of items to be included in the result. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - template_url=self.list_by_subscription.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def list_by_resource_group( - self, - resource_group: str, - top: Optional[int] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - api_version=api_version, - top=top, - template_url=self.list_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - def _create_or_update_initial( - self, - resource_group: str, - integration_service_environment_name: str, - integration_service_environment: "_models.IntegrationServiceEnvironment", - **kwargs: Any - ) -> "_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', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') - - request = build_create_or_update_request_initial( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self._create_or_update_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, 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 - - - @distributed_trace - def begin_create_or_update( - self, - resource_group: str, - integration_service_environment_name: str, - integration_service_environment: "_models.IntegrationServiceEnvironment", - **kwargs: Any - ) -> LROPoller["_models.IntegrationServiceEnvironment"]: - """Creates or updates an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :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[~azure.mgmt.logic.models.IntegrationServiceEnvironment] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - 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 = self._create_or_update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - integration_service_environment=integration_service_environment, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - 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 - ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore - - def _update_initial( - self, - resource_group: str, - integration_service_environment_name: str, - integration_service_environment: "_models.IntegrationServiceEnvironment", - **kwargs: Any - ) -> "_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', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') - - request = build_update_request_initial( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self._update_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, 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 - - - @distributed_trace - def begin_update( - self, - resource_group: str, - integration_service_environment_name: str, - integration_service_environment: "_models.IntegrationServiceEnvironment", - **kwargs: Any - ) -> LROPoller["_models.IntegrationServiceEnvironment"]: - """Updates an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :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[~azure.mgmt.logic.models.IntegrationServiceEnvironment] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - 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 = self._update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - integration_service_environment=integration_service_environment, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - 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 - ) - 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 - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def restart( # pylint: disable=inconsistent-return-statements - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_restart_request( - subscription_id=self._config.subscription_id, - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_version=api_version, - template_url=self.restart.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_operations.py deleted file mode 100644 index 910e567678e..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_operations.py +++ /dev/null @@ -1,144 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.Logic/operations") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class Operations(object): - """Operations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - **kwargs: Any - ) -> 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: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.OperationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py deleted file mode 100644 index 9d6c7a9938a..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py +++ /dev/null @@ -1,434 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_expression_traces_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowRunActionRepetitionsOperations(object): - """WorkflowRunActionRepetitionsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_expression_traces( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.ExpressionTraces] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressionTraces"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_expression_traces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=self.list_expression_traces.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_expression_traces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - - return ItemPaged( - get_next, extract_data - ) - list_expression_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py deleted file mode 100644 index 58e08e200e2..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py +++ /dev/null @@ -1,307 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - request_history_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), - "requestHistoryName": _SERIALIZER.url("request_history_name", request_history_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowRunActionRepetitionsRequestHistoriesOperations(object): - """WorkflowRunActionRepetitionsRequestHistoriesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.RequestHistoryListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - request_history_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - 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, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_workflow_run_action_request_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_histories_operations.py deleted file mode 100644 index 908eb9943df..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_histories_operations.py +++ /dev/null @@ -1,294 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - request_history_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - "requestHistoryName": _SERIALIZER.url("request_history_name", request_history_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowRunActionRequestHistoriesOperations(object): - """WorkflowRunActionRequestHistoriesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.RequestHistoryListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - request_history_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - request_history_name=request_history_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_workflow_run_action_scope_repetitions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetitions_operations.py deleted file mode 100644 index af2a611309b..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetitions_operations.py +++ /dev/null @@ -1,295 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowRunActionScopeRepetitionsOperations(object): - """WorkflowRunActionScopeRepetitionsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - repetition_name=repetition_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_workflow_run_actions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_actions_operations.py deleted file mode 100644 index 7bc663fef43..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_actions_operations.py +++ /dev/null @@ -1,431 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_expression_traces_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "actionName": _SERIALIZER.url("action_name", action_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowRunActionsOperations(object): - """WorkflowRunActionsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status. - Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowRunActionListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_expression_traces( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs: Any - ) -> Iterable["_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.paging.ItemPaged[~azure.mgmt.logic.models.ExpressionTraces] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressionTraces"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_expression_traces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=self.list_expression_traces.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_expression_traces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - action_name=action_name, - api_version=api_version, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - - return ItemPaged( - get_next, extract_data - ) - list_expression_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py deleted file mode 100644 index 188c400fa26..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py +++ /dev/null @@ -1,154 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - operation_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowRunOperationsOperations(object): - """WorkflowRunOperationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - operation_id: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - operation_id=operation_id, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_workflow_runs_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_runs_operations.py deleted file mode 100644 index 912ab0782a5..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_runs_operations.py +++ /dev/null @@ -1,383 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_cancel_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - run_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "runName": _SERIALIZER.url("run_name", run_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowRunsOperations(object): - """WorkflowRunsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowRunListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def cancel( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_cancel_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - run_name=run_name, - api_version=api_version, - template_url=self.cancel.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_workflow_trigger_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_histories_operations.py deleted file mode 100644 index 273c5b79946..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_histories_operations.py +++ /dev/null @@ -1,404 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - history_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - "historyName": _SERIALIZER.url("history_name", history_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_resubmit_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - history_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - "historyName": _SERIALIZER.url("history_name", history_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowTriggerHistoriesOperations(object): - """WorkflowTriggerHistoriesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowTriggerHistoryListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerHistoryListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - history_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - history_name=history_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def resubmit( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - history_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_resubmit_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - history_name=history_name, - api_version=api_version, - template_url=self.resubmit.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_workflow_triggers_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_triggers_operations.py deleted file mode 100644 index e8390689bcb..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_triggers_operations.py +++ /dev/null @@ -1,794 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_reset_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_run_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_schema_json_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_set_state_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_list_callback_url_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowTriggersOperations(object): - """WorkflowTriggersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowTriggerListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def reset( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_reset_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.reset.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def run( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_run_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.run.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def get_schema_json( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_schema_json_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.get_schema_json.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def set_state( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - set_state: "_models.SetTriggerStateActionDefinition", - **kwargs: Any - ) -> 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 set_state: The workflow trigger state. - :type set_state: ~azure.mgmt.logic.models.SetTriggerStateActionDefinition - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(set_state, 'SetTriggerStateActionDefinition') - - request = build_set_state_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.set_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_callback_url( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_list_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - trigger_name=trigger_name, - api_version=api_version, - template_url=self.list_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_workflow_version_triggers_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_triggers_operations.py deleted file mode 100644 index 152e2aea24a..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_triggers_operations.py +++ /dev/null @@ -1,173 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_callback_url_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - version_id: str, - trigger_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "versionId": _SERIALIZER.url("version_id", version_id, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class WorkflowVersionTriggersOperations(object): - """WorkflowVersionTriggersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list_callback_url( - self, - resource_group_name: str, - workflow_name: str, - version_id: str, - trigger_name: str, - parameters: Optional["_models.GetCallbackUrlParameters"] = None, - **kwargs: Any - ) -> "_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 parameters: The callback URL parameters. Default value is None. - :type parameters: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if parameters is not None: - _json = self._serialize.body(parameters, 'GetCallbackUrlParameters') - else: - _json = None - - request = build_list_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - version_id=version_id, - trigger_name=trigger_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_workflow_versions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_versions_operations.py deleted file mode 100644 index 8b0e2802a12..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_versions_operations.py +++ /dev/null @@ -1,277 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar - -from msrest import Serializer - -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 HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - *, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - version_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - "versionId": _SERIALIZER.url("version_id", version_id, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class WorkflowVersionsOperations(object): - """WorkflowVersionsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list( - self, - resource_group_name: str, - workflow_name: str, - top: Optional[int] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowVersionListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowVersionListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - version_id: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - version_id=version_id, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/operations/_workflows_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflows_operations.py deleted file mode 100644 index 8aaa77ccc7c..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflows_operations.py +++ /dev/null @@ -1,1677 +0,0 @@ -# pylint: disable=too-many-lines -# 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, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -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 HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_list_by_subscription_request( - subscription_id: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_by_resource_group_request( - subscription_id: str, - resource_group_name: str, - *, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_update_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_disable_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_enable_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_generate_upgraded_definition_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_list_callback_url_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_list_swagger_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_move_request_initial( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_regenerate_access_key_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_validate_by_resource_group_request( - subscription_id: str, - resource_group_name: str, - workflow_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_validate_by_location_request( - subscription_id: str, - resource_group_name: str, - location: str, - workflow_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "location": _SERIALIZER.url("location", location, 'str'), - "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class WorkflowsOperations(object): - """WorkflowsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.logic.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): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def list_by_subscription( - self, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_models.WorkflowListResult"]: - """Gets a list of workflows by subscription. - - :param top: The number of items to be included in the result. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list_by_subscription.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def list_by_resource_group( - self, - resource_group_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_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. Default value is None. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. Default value is None. - :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.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - top=top, - filter=filter, - template_url=self.list_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - top=top, - filter=filter, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - 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, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - 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"} # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - workflow_name: str, - workflow: "_models.Workflow", - **kwargs: Any - ) -> "_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 workflow: The workflow. - :type workflow: ~azure.mgmt.logic.models.Workflow - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(workflow, 'Workflow') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def update( - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> "_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: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_delete_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def disable( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_disable_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.disable.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def enable( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_enable_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.enable.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def generate_upgraded_definition( - self, - resource_group_name: str, - workflow_name: str, - parameters: "_models.GenerateUpgradedDefinitionParameters", - **kwargs: Any - ) -> Any: - """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 parameters: Parameters for generating an upgraded definition. - :type parameters: ~azure.mgmt.logic.models.GenerateUpgradedDefinitionParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: any, or the result of cls(response) - :rtype: any - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') - - request = build_generate_upgraded_definition_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.generate_upgraded_definition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_callback_url( - self, - resource_group_name: str, - workflow_name: str, - list_callback_url: "_models.GetCallbackUrlParameters", - **kwargs: Any - ) -> "_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 list_callback_url: Which callback url to list. - :type list_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl, or the result of cls(response) - :rtype: ~azure.mgmt.logic.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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(list_callback_url, 'GetCallbackUrlParameters') - - request = build_list_callback_url_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.list_callback_url.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def list_swagger( - self, - resource_group_name: str, - workflow_name: str, - **kwargs: Any - ) -> Any: - """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: any, or the result of cls(response) - :rtype: any - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - - - request = build_list_swagger_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - template_url=self.list_swagger.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - def _move_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - move: "_models.WorkflowReference", - **kwargs: Any - ) -> 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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(move, 'WorkflowReference') - - request = build_move_request_initial( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self._move_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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) - raise HttpResponseError(response=response, 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 - - - @distributed_trace - def begin_move( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - move: "_models.WorkflowReference", - **kwargs: Any - ) -> 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 move: The workflow to move. - :type move: ~azure.mgmt.logic.models.WorkflowReference - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :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 - """ - api_version = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - 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 = self._move_initial( - resource_group_name=resource_group_name, - workflow_name=workflow_name, - move=move, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - 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 - ) - 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 - - @distributed_trace - def regenerate_access_key( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - key_type: "_models.RegenerateActionParameter", - **kwargs: Any - ) -> 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 access key type. - :type key_type: ~azure.mgmt.logic.models.RegenerateActionParameter - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(key_type, 'RegenerateActionParameter') - - request = build_regenerate_access_key_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.regenerate_access_key.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def validate_by_resource_group( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - workflow_name: str, - validate: "_models.Workflow", - **kwargs: Any - ) -> 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 validate: The workflow. - :type validate: ~azure.mgmt.logic.models.Workflow - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(validate, 'Workflow') - - request = build_validate_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.validate_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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 - - - @distributed_trace - def validate_by_location( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - location: str, - workflow_name: str, - validate: "_models.Workflow", - **kwargs: Any - ) -> 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 validate: The workflow. - :type validate: ~azure.mgmt.logic.models.Workflow - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :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 = kwargs.pop('api_version', "2019-05-01") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(validate, 'Workflow') - - request = build_validate_by_location_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - location=location, - workflow_name=workflow_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.validate_by_location.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - 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.failsafe_deserialize(_models.ErrorResponse, pipeline_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/py.typed b/src/logic/azext_logic/vendored_sdks/logic/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/logic/setup.cfg b/src/logic/setup.cfg index e69de29bb2d..deea46a1d4c 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 740fdae8157..250203aca3d 100644 --- a/src/logic/setup.py +++ b/src/logic/setup.py @@ -1,22 +1,16 @@ -#!/usr/bin/env python - # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools # -------------------------------------------------------------------------------------------- - 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.7' +VERSION = '1.0.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers @@ -26,13 +20,12 @@ 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'License :: OSI Approved :: MIT License', ] -# TODO: Add any additional SDK dependencies here DEPENDENCIES = [] with open('README.md', 'r', encoding='utf-8') as f: @@ -43,15 +36,14 @@ setup( name='logic', version=VERSION, - description='Microsoft Azure Command-Line Tools LogicManagementClient Extension', - # TODO: Update author and email, if applicable + description='Microsoft Azure Command-Line Tools Logic Extension.', + long_description=README + '\n\n' + HISTORY, + license='MIT', author='Microsoft Corporation', author_email='azpycli@microsoft.com', url='https://github.com/Azure/azure-cli-extensions/tree/main/src/logic', - long_description=README + '\n\n' + HISTORY, - license='MIT', classifiers=CLASSIFIERS, - packages=find_packages(), - install_requires=DEPENDENCIES, + packages=find_packages(exclude=["tests"]), package_data={'azext_logic': ['azext_metadata.json']}, + install_requires=DEPENDENCIES )