diff --git a/src/azure-data-transfer/HISTORY.rst b/src/azure-data-transfer/HISTORY.rst new file mode 100644 index 00000000000..abbff5a61a7 --- /dev/null +++ b/src/azure-data-transfer/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +1.0.0b1 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/azure-data-transfer/README.md b/src/azure-data-transfer/README.md new file mode 100644 index 00000000000..eaae6ad670c --- /dev/null +++ b/src/azure-data-transfer/README.md @@ -0,0 +1,5 @@ +# Azure CLI AzureDataTransfer Extension # +This is an extension to Azure CLI to manage AzureDataTransfer resources. + +## How to use ## +Please add commands usage here. \ No newline at end of file diff --git a/src/azure-data-transfer/azext_azure_data_transfer/__init__.py b/src/azure-data-transfer/azext_azure_data_transfer/__init__.py new file mode 100644 index 00000000000..9b521e2a7e3 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/__init__.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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_azure_data_transfer._help import helps # pylint: disable=unused-import + + +class AzureDataTransferCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + custom_command_type = CliCommandType( + operations_tmpl='azext_azure_data_transfer.custom#{}') + super().__init__(cli_ctx=cli_ctx, + custom_command_type=custom_command_type) + + def load_command_table(self, args): + from azext_azure_data_transfer.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_azure_data_transfer._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = AzureDataTransferCommandsLoader diff --git a/src/azure-data-transfer/azext_azure_data_transfer/_help.py b/src/azure-data-transfer/azext_azure_data_transfer/_help.py new file mode 100644 index 00000000000..126d5d00714 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/_help.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/azure-data-transfer/azext_azure_data_transfer/_params.py b/src/azure-data-transfer/azext_azure_data_transfer/_params.py new file mode 100644 index 00000000000..cfcec717c9c --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/_params.py @@ -0,0 +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=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/__init__.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/__init__.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/__init__.py new file mode 100644 index 00000000000..f6acc11aa4e --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/__init__.py @@ -0,0 +1,10 @@ +# -------------------------------------------------------------------------------------------- +# 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 + diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/__cmd_group.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/__cmd_group.py new file mode 100644 index 00000000000..408c798a69c --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/__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( + "azure-data-transfer", +) +class __CMDGroup(AAZCommandGroup): + """Azure data transfer commands + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/__init__.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/__cmd_group.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/__cmd_group.py new file mode 100644 index 00000000000..2c8e95be505 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/__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( + "azure-data-transfer connection", +) +class __CMDGroup(AAZCommandGroup): + """Azure data transfer connection commands + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/__init__.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/__init__.py new file mode 100644 index 00000000000..6a8f5cfc3fe --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/__init__.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._link import * +from ._list import * +from ._list_pending_connection import * +from ._list_pending_flow import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_create.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_create.py new file mode 100644 index 00000000000..5a9ef966d19 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_create.py @@ -0,0 +1,587 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection create", +) +class Create(AAZCommand): + """Create the connection resource. + + :example: Creates a receive side connection + az azure-data-transfer connection create --resource-group testRG --connection-name testConnection --location East US --justification justification --pipeline testdc --requirement-id id --direction Receive --remote-subscription-id 1cca59fe-5643-4156-99c7-284a599092c0 + + :example: Creates a send side connection + az azure-data-transfer connection create --resource-group testRG --connection-name testConnection --location East US --pipeline testdc --pin 1234 + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.connection_name = AAZStrArg( + options=["-n", "--name", "--connection", "--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Connection" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Connection", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Connection", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Identity" + + _args_schema = cls._args_schema + _args_schema.mi_system_assigned = AAZStrArg( + options=["--system-assigned", "--mi-system-assigned"], + arg_group="Identity", + help="Set the system managed identity.", + blank="True", + ) + _args_schema.mi_user_assigned = AAZListArg( + options=["--user-assigned", "--mi-user-assigned"], + arg_group="Identity", + help="Set the user managed identities.", + blank=[], + ) + + mi_user_assigned = cls._args_schema.mi_user_assigned + mi_user_assigned.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.direction = AAZStrArg( + options=["--direction"], + arg_group="Properties", + help="Direction of data movement. Allowed values: Receive, Send.", + enum={"Receive": "Receive", "Send": "Send"}, + ) + _args_schema.flow_types = AAZListArg( + options=["--flow-types"], + arg_group="Properties", + help="The flow types being requested for this connection", + ) + _args_schema.justification = AAZStrArg( + options=["--justification"], + arg_group="Properties", + help="Justification for the connection request", + ) + _args_schema.pin = AAZStrArg( + options=["--pin"], + arg_group="Properties", + help="PIN to link requests together", + ) + _args_schema.pipeline = AAZStrArg( + options=["--pipeline"], + arg_group="Properties", + help="Pipeline to use to transfer data", + ) + _args_schema.policies = AAZListArg( + options=["--policies"], + arg_group="Properties", + help="The policies for this connection", + ) + _args_schema.primary_contact = AAZStrArg( + options=["--primary-contact"], + arg_group="Properties", + help="The primary contact for this connection request", + ) + _args_schema.remote_subscription_id = AAZStrArg( + options=["--remote-subscription-id"], + arg_group="Properties", + help="Subscription ID to link cloud subscriptions together", + ) + _args_schema.requirement_id = AAZStrArg( + options=["--requirement-id"], + arg_group="Properties", + help="Requirement ID of the connection", + ) + _args_schema.schema_uris = AAZListArg( + options=["--schema-uris"], + arg_group="Properties", + help="The schema URIs for this connection", + ) + _args_schema.schemas = AAZListArg( + options=["--schemas"], + arg_group="Properties", + help="The schemas for this connection", + ) + _args_schema.secondary_contacts = AAZListArg( + options=["--secondary-contacts"], + arg_group="Properties", + help="The secondary contacts for this connection request", + ) + + flow_types = cls._args_schema.flow_types + flow_types.Element = AAZStrArg( + enum={"API": "API", "BasicFiles": "BasicFiles", "Complex": "Complex", "Data": "Data", "DevSecOps": "DevSecOps", "DiskImages": "DiskImages", "Messaging": "Messaging", "MicrosoftInternal": "MicrosoftInternal", "Mission": "Mission", "MissionOpaqueXML": "MissionOpaqueXML", "Opaque": "Opaque", "Standard": "Standard", "StreamingVideo": "StreamingVideo", "Unknown": "Unknown"}, + ) + + policies = cls._args_schema.policies + policies.Element = AAZStrArg() + + schema_uris = cls._args_schema.schema_uris + schema_uris.Element = AAZStrArg() + + schemas = cls._args_schema.schemas + schemas.Element = AAZObjectArg() + + _element = cls._args_schema.schemas.Element + _element.connection_id = AAZStrArg( + options=["connection-id"], + help="Connection ID associated with this schema", + ) + _element.content = AAZStrArg( + options=["content"], + help="Content of the schema", + ) + _element.direction = AAZStrArg( + options=["direction"], + help="The direction of the schema.", + enum={"Receive": "Receive", "Send": "Send"}, + ) + _element.id = AAZStrArg( + options=["id"], + help="ID associated with this schema", + ) + _element.name = AAZStrArg( + options=["name"], + help="Name of the schema", + ) + _element.schema_type = AAZStrArg( + options=["schema-type"], + help="The Schema Type", + enum={"Xsd": "Xsd", "Zip": "Zip"}, + ) + _element.schema_uri = AAZStrArg( + options=["schema-uri"], + help="Uri containing SAS token for the zipped schema", + ) + _element.status = AAZStrArg( + options=["status"], + help="Status of the schema", + enum={"Approved": "Approved", "New": "New"}, + ) + + secondary_contacts = cls._args_schema.secondary_contacts + secondary_contacts.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ConnectionsCreateOrUpdate(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 ConnectionsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + 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", AAZIdentityObjectType) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={"flags": {"action": "create"}}) + identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={"flags": {"action": "create"}}) + + user_assigned = _builder.get(".identity.userAssigned") + if user_assigned is not None: + user_assigned.set_elements(AAZStrType, ".") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("direction", AAZStrType, ".direction") + properties.set_prop("flowTypes", AAZListType, ".flow_types") + properties.set_prop("justification", AAZStrType, ".justification") + properties.set_prop("pin", AAZStrType, ".pin") + properties.set_prop("pipeline", AAZStrType, ".pipeline", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("policies", AAZListType, ".policies") + properties.set_prop("primaryContact", AAZStrType, ".primary_contact") + properties.set_prop("remoteSubscriptionId", AAZStrType, ".remote_subscription_id") + properties.set_prop("requirementId", AAZStrType, ".requirement_id") + properties.set_prop("schemaUris", AAZListType, ".schema_uris") + properties.set_prop("schemas", AAZListType, ".schemas") + properties.set_prop("secondaryContacts", AAZListType, ".secondary_contacts") + + flow_types = _builder.get(".properties.flowTypes") + if flow_types is not None: + flow_types.set_elements(AAZStrType, ".") + + policies = _builder.get(".properties.policies") + if policies is not None: + policies.set_elements(AAZStrType, ".") + + schema_uris = _builder.get(".properties.schemaUris") + if schema_uris is not None: + schema_uris.set_elements(AAZStrType, ".") + + schemas = _builder.get(".properties.schemas") + if schemas is not None: + schemas.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.schemas[]") + if _elements is not None: + _elements.set_prop("connectionId", AAZStrType, ".connection_id") + _elements.set_prop("content", AAZStrType, ".content") + _elements.set_prop("direction", AAZStrType, ".direction") + _elements.set_prop("id", AAZStrType, ".id") + _elements.set_prop("name", AAZStrType, ".name") + _elements.set_prop("schemaType", AAZStrType, ".schema_type") + _elements.set_prop("schemaUri", AAZStrType, ".schema_uri") + _elements.set_prop("status", AAZStrType, ".status") + + secondary_contacts = _builder.get(".properties.secondaryContacts") + if secondary_contacts is not None: + secondary_contacts.set_elements(AAZStrType, ".") + + 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 = AAZIdentityObjectType() + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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.approver = AAZStrType( + flags={"read_only": True}, + ) + properties.date_submitted = AAZStrType( + serialized_name="dateSubmitted", + flags={"read_only": True}, + ) + properties.direction = AAZStrType() + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.justification = AAZStrType() + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_connection_id = AAZStrType( + serialized_name="linkedConnectionId", + flags={"read_only": True}, + ) + properties.pin = AAZStrType() + properties.pipeline = AAZStrType( + flags={"required": True}, + ) + properties.policies = AAZListType() + properties.primary_contact = AAZStrType( + serialized_name="primaryContact", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_subscription_id = AAZStrType( + serialized_name="remoteSubscriptionId", + ) + properties.requirement_id = AAZStrType( + serialized_name="requirementId", + ) + properties.schema_uris = AAZListType( + serialized_name="schemaUris", + ) + properties.schemas = AAZListType() + properties.secondary_contacts = AAZListType( + serialized_name="secondaryContacts", + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.status_reason = AAZStrType( + serialized_name="statusReason", + flags={"read_only": True}, + ) + + flow_types = cls._schema_on_200_201.properties.flow_types + flow_types.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200_201.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + policies = cls._schema_on_200_201.properties.policies + policies.Element = AAZStrType() + + schema_uris = cls._schema_on_200_201.properties.schema_uris + schema_uris.Element = AAZStrType() + + schemas = cls._schema_on_200_201.properties.schemas + schemas.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.schemas.Element + _element.connection_id = AAZStrType( + serialized_name="connectionId", + ) + _element.content = AAZStrType() + _element.direction = AAZStrType() + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.schema_type = AAZStrType( + serialized_name="schemaType", + ) + _element.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + _element.status = AAZStrType() + + secondary_contacts = cls._schema_on_200_201.properties.secondary_contacts + secondary_contacts.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + 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/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_delete.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_delete.py new file mode 100644 index 00000000000..2f5dea12cf5 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_delete.py @@ -0,0 +1,168 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete the connection resource. + + :example: Deletes the connection resource + az azure-data-transfer connection delete --resource-group testRG --connection-name testConnection + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, 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.connection_name = AAZStrArg( + options=["-n", "--name", "--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ConnectionsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ConnectionsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_link.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_link.py new file mode 100644 index 00000000000..bf885d2efba --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_link.py @@ -0,0 +1,381 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection link", +) +class Link(AAZCommand): + """Links the connection to its pending connection. + + :example: Links the specified connection + az azure-data-transfer connection link --resource-group testRG --connection-name receiveConnection --pending-connection-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.AzureDataTransfer/connections/sendConnection + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/link", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.connection_name = AAZStrArg( + options=["-n", "--name", "--connection-name"], + help="Name of the connection for linking(Receive side)", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Connection" + + _args_schema = cls._args_schema + _args_schema.pending_connection_id = AAZStrArg( + options=["--id", "--pending-connection-id"], + arg_group="Connection", + help="ID of the Send side connection to link", + required=True, + ) + _args_schema.status_reason = AAZStrArg( + options=["--status-reason"], + arg_group="Connection", + help="Reason for resource operation.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ConnectionsLink(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 ConnectionsLink(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + 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("id", AAZStrType, ".pending_connection_id", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("statusReason", AAZStrType, ".status_reason") + + 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.identity = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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.approver = AAZStrType( + flags={"read_only": True}, + ) + properties.date_submitted = AAZStrType( + serialized_name="dateSubmitted", + flags={"read_only": True}, + ) + properties.direction = AAZStrType() + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.justification = AAZStrType() + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_connection_id = AAZStrType( + serialized_name="linkedConnectionId", + flags={"read_only": True}, + ) + properties.pin = AAZStrType() + properties.pipeline = AAZStrType( + flags={"required": True}, + ) + properties.policies = AAZListType() + properties.primary_contact = AAZStrType( + serialized_name="primaryContact", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_subscription_id = AAZStrType( + serialized_name="remoteSubscriptionId", + ) + properties.requirement_id = AAZStrType( + serialized_name="requirementId", + ) + properties.schema_uris = AAZListType( + serialized_name="schemaUris", + ) + properties.schemas = AAZListType() + properties.secondary_contacts = AAZListType( + serialized_name="secondaryContacts", + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.status_reason = AAZStrType( + serialized_name="statusReason", + flags={"read_only": True}, + ) + + flow_types = cls._schema_on_200.properties.flow_types + flow_types.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema_uris = cls._schema_on_200.properties.schema_uris + schema_uris.Element = AAZStrType() + + schemas = cls._schema_on_200.properties.schemas + schemas.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.schemas.Element + _element.connection_id = AAZStrType( + serialized_name="connectionId", + ) + _element.content = AAZStrType() + _element.direction = AAZStrType() + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.schema_type = AAZStrType( + serialized_name="schemaType", + ) + _element.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + _element.status = AAZStrType() + + secondary_contacts = cls._schema_on_200.properties.secondary_contacts + secondary_contacts.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _LinkHelper: + """Helper class for Link""" + + +__all__ = ["Link"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_list.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_list.py new file mode 100644 index 00000000000..cfbb79a4f2e --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_list.py @@ -0,0 +1,332 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection list", +) +class List(AAZCommand): + """List connections in a resource group. + + :example: Gets connections in a resource group + az azure-data-transfer connection list --resource-group testRG + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections", "2025-05-21"], + ] + } + + 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( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ConnectionsListByResourceGroup(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 ConnectionsListByResourceGroup(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.AzureDataTransfer/connections", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-05-21", + 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( + flags={"required": True}, + ) + + 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 = AAZIdentityObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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.approver = AAZStrType( + flags={"read_only": True}, + ) + properties.date_submitted = AAZStrType( + serialized_name="dateSubmitted", + flags={"read_only": True}, + ) + properties.direction = AAZStrType() + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.justification = AAZStrType() + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_connection_id = AAZStrType( + serialized_name="linkedConnectionId", + flags={"read_only": True}, + ) + properties.pin = AAZStrType() + properties.pipeline = AAZStrType( + flags={"required": True}, + ) + properties.policies = AAZListType() + properties.primary_contact = AAZStrType( + serialized_name="primaryContact", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_subscription_id = AAZStrType( + serialized_name="remoteSubscriptionId", + ) + properties.requirement_id = AAZStrType( + serialized_name="requirementId", + ) + properties.schema_uris = AAZListType( + serialized_name="schemaUris", + ) + properties.schemas = AAZListType() + properties.secondary_contacts = AAZListType( + serialized_name="secondaryContacts", + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.status_reason = AAZStrType( + serialized_name="statusReason", + flags={"read_only": True}, + ) + + flow_types = cls._schema_on_200.value.Element.properties.flow_types + flow_types.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.value.Element.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + policies = cls._schema_on_200.value.Element.properties.policies + policies.Element = AAZStrType() + + schema_uris = cls._schema_on_200.value.Element.properties.schema_uris + schema_uris.Element = AAZStrType() + + schemas = cls._schema_on_200.value.Element.properties.schemas + schemas.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.schemas.Element + _element.connection_id = AAZStrType( + serialized_name="connectionId", + ) + _element.content = AAZStrType() + _element.direction = AAZStrType() + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.schema_type = AAZStrType( + serialized_name="schemaType", + ) + _element.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + _element.status = AAZStrType() + + secondary_contacts = cls._schema_on_200.value.Element.properties.secondary_contacts + secondary_contacts.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + 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/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_list_pending_connection.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_list_pending_connection.py new file mode 100644 index 00000000000..5baa157f524 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_list_pending_connection.py @@ -0,0 +1,315 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection list-pending-connection", +) +class ListPendingConnection(AAZCommand): + """Lists all pending remote connections that are linkable to this connection. + + :example: Lists a list of pending connections + az azure-data-transfer connection list-pending-connection --resource-group testRG --connection-name testConnection + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/listpendingconnections", "2025-05-21"], + ] + } + + 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.connection_name = AAZStrArg( + options=["-n", "--name", "--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ListPendingConnectionsList(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 ListPendingConnectionsList(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.AzureDataTransfer/connections/{connectionName}/listPendingConnections", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + 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( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.approver = AAZStrType( + flags={"read_only": True}, + ) + _element.date_submitted = AAZStrType( + serialized_name="dateSubmitted", + flags={"read_only": True}, + ) + _element.direction = AAZStrType() + _element.flow_types = AAZListType( + serialized_name="flowTypes", + ) + _element.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.justification = AAZStrType() + _element.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + _element.linked_connection_id = AAZStrType( + serialized_name="linkedConnectionId", + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.pin = AAZStrType() + _element.pipeline = AAZStrType( + flags={"required": True}, + ) + _element.policies = AAZListType() + _element.primary_contact = AAZStrType( + serialized_name="primaryContact", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + _element.remote_subscription_id = AAZStrType( + serialized_name="remoteSubscriptionId", + ) + _element.requirement_id = AAZStrType( + serialized_name="requirementId", + ) + _element.schema_uris = AAZListType( + serialized_name="schemaUris", + ) + _element.schemas = AAZListType() + _element.secondary_contacts = AAZListType( + serialized_name="secondaryContacts", + ) + _element.status = AAZStrType( + flags={"read_only": True}, + ) + _element.status_reason = AAZStrType( + serialized_name="statusReason", + flags={"read_only": True}, + ) + _element.subscription_id = AAZStrType( + serialized_name="subscriptionId", + flags={"read_only": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + flow_types = cls._schema_on_200.value.Element.flow_types + flow_types.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.value.Element.force_disabled_status + force_disabled_status.Element = AAZStrType() + + policies = cls._schema_on_200.value.Element.policies + policies.Element = AAZStrType() + + schema_uris = cls._schema_on_200.value.Element.schema_uris + schema_uris.Element = AAZStrType() + + schemas = cls._schema_on_200.value.Element.schemas + schemas.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.schemas.Element + _element.connection_id = AAZStrType( + serialized_name="connectionId", + ) + _element.content = AAZStrType() + _element.direction = AAZStrType() + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.schema_type = AAZStrType( + serialized_name="schemaType", + ) + _element.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + _element.status = AAZStrType() + + secondary_contacts = cls._schema_on_200.value.Element.secondary_contacts + secondary_contacts.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListPendingConnectionHelper: + """Helper class for ListPendingConnection""" + + +__all__ = ["ListPendingConnection"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_list_pending_flow.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_list_pending_flow.py new file mode 100644 index 00000000000..35f0146ebe7 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_list_pending_flow.py @@ -0,0 +1,383 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection list-pending-flow", +) +class ListPendingFlow(AAZCommand): + """List all pending flows for linking to a receive flow[P.[ + + :example: Lists a list of pending flows + az azure-data-transfer connection list-pending-flow --resource-group testRG --connection-name testConnection + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/listpendingflows", "2025-05-21"], + ] + } + + 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.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ListPendingFlowsList(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 ListPendingFlowsList(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.AzureDataTransfer/connections/{connectionName}/listPendingFlows", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + 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( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.api_flow_options = AAZObjectType( + serialized_name="apiFlowOptions", + ) + _element.connection = AAZObjectType() + _element.connection_id = AAZStrType( + serialized_name="connectionId", + flags={"read_only": True}, + ) + _element.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + _element.customer_managed_key_vault_uri = AAZStrType( + serialized_name="customerManagedKeyVaultUri", + ) + _element.data_type = AAZStrType( + serialized_name="dataType", + ) + _element.destination_endpoint_ports = AAZListType( + serialized_name="destinationEndpointPorts", + ) + _element.destination_endpoints = AAZListType( + serialized_name="destinationEndpoints", + ) + _element.event_hub_id = AAZStrType( + serialized_name="eventHubId", + ) + _element.flow_id = AAZStrType( + serialized_name="flowId", + flags={"read_only": True}, + ) + _element.flow_type = AAZStrType( + serialized_name="flowType", + ) + _element.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.key_vault_uri = AAZStrType( + serialized_name="keyVaultUri", + ) + _element.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + _element.linked_flow_id = AAZStrType( + serialized_name="linkedFlowId", + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.messaging_options = AAZObjectType( + serialized_name="messagingOptions", + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.passphrase = AAZStrType() + _element.policies = AAZListType() + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + _element.schema = AAZObjectType() + _element.service_bus_queue_id = AAZStrType( + serialized_name="serviceBusQueueId", + ) + _element.source_addresses = AAZObjectType( + serialized_name="sourceAddresses", + ) + _element.status = AAZStrType() + _element.storage_account_id = AAZStrType( + serialized_name="storageAccountId", + ) + _element.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + _element.storage_container_name = AAZStrType( + serialized_name="storageContainerName", + ) + _element.storage_table_name = AAZStrType( + serialized_name="storageTableName", + ) + _element.stream_id = AAZStrType( + serialized_name="streamId", + ) + _element.stream_latency = AAZIntType( + serialized_name="streamLatency", + ) + _element.stream_protocol = AAZStrType( + serialized_name="streamProtocol", + ) + _element.subscription_id = AAZStrType( + serialized_name="subscriptionId", + flags={"read_only": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + api_flow_options = cls._schema_on_200.value.Element.api_flow_options + api_flow_options.api_mode = AAZStrType( + serialized_name="apiMode", + ) + api_flow_options.audience_override = AAZStrType( + serialized_name="audienceOverride", + ) + api_flow_options.cname = AAZStrType() + api_flow_options.identity_translation = AAZStrType( + serialized_name="identityTranslation", + ) + api_flow_options.remote_calling_mode_client_id = AAZStrType( + serialized_name="remoteCallingModeClientId", + ) + api_flow_options.remote_endpoint = AAZStrType( + serialized_name="remoteEndpoint", + ) + api_flow_options.sender_client_id = AAZStrType( + serialized_name="senderClientId", + ) + + connection = cls._schema_on_200.value.Element.connection + connection.id = AAZStrType( + flags={"required": True}, + ) + connection.location = AAZStrType() + connection.name = AAZStrType() + connection.subscription_name = AAZStrType( + serialized_name="subscriptionName", + ) + + destination_endpoint_ports = cls._schema_on_200.value.Element.destination_endpoint_ports + destination_endpoint_ports.Element = AAZIntType() + + destination_endpoints = cls._schema_on_200.value.Element.destination_endpoints + destination_endpoints.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.value.Element.force_disabled_status + force_disabled_status.Element = AAZStrType() + + messaging_options = cls._schema_on_200.value.Element.messaging_options + messaging_options.billing_tier = AAZStrType( + serialized_name="billingTier", + ) + + policies = cls._schema_on_200.value.Element.policies + policies.Element = AAZStrType() + + schema = cls._schema_on_200.value.Element.schema + schema.connection_id = AAZStrType( + serialized_name="connectionId", + ) + schema.content = AAZStrType() + schema.direction = AAZStrType() + schema.id = AAZStrType() + schema.name = AAZStrType() + schema.schema_type = AAZStrType( + serialized_name="schemaType", + ) + schema.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + schema.status = AAZStrType() + + source_addresses = cls._schema_on_200.value.Element.source_addresses + source_addresses.source_addresses = AAZListType( + serialized_name="sourceAddresses", + ) + + source_addresses = cls._schema_on_200.value.Element.source_addresses.source_addresses + source_addresses.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListPendingFlowHelper: + """Helper class for ListPendingFlow""" + + +__all__ = ["ListPendingFlow"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_show.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_show.py new file mode 100644 index 00000000000..b9df3eb1968 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_show.py @@ -0,0 +1,334 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection show", +) +class Show(AAZCommand): + """Get connection resource. + + :example: Gets connection resource + az azure-data-transfer connection show --resource-group testRG --connection-name testConnection + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}", "2025-05-21"], + ] + } + + 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.connection_name = AAZStrArg( + options=["-n", "--name", "--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ConnectionsGet(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 ConnectionsGet(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.AzureDataTransfer/connections/{connectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + 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 = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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.approver = AAZStrType( + flags={"read_only": True}, + ) + properties.date_submitted = AAZStrType( + serialized_name="dateSubmitted", + flags={"read_only": True}, + ) + properties.direction = AAZStrType() + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.justification = AAZStrType() + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_connection_id = AAZStrType( + serialized_name="linkedConnectionId", + flags={"read_only": True}, + ) + properties.pin = AAZStrType() + properties.pipeline = AAZStrType( + flags={"required": True}, + ) + properties.policies = AAZListType() + properties.primary_contact = AAZStrType( + serialized_name="primaryContact", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_subscription_id = AAZStrType( + serialized_name="remoteSubscriptionId", + ) + properties.requirement_id = AAZStrType( + serialized_name="requirementId", + ) + properties.schema_uris = AAZListType( + serialized_name="schemaUris", + ) + properties.schemas = AAZListType() + properties.secondary_contacts = AAZListType( + serialized_name="secondaryContacts", + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.status_reason = AAZStrType( + serialized_name="statusReason", + flags={"read_only": True}, + ) + + flow_types = cls._schema_on_200.properties.flow_types + flow_types.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema_uris = cls._schema_on_200.properties.schema_uris + schema_uris.Element = AAZStrType() + + schemas = cls._schema_on_200.properties.schemas + schemas.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.schemas.Element + _element.connection_id = AAZStrType( + serialized_name="connectionId", + ) + _element.content = AAZStrType() + _element.direction = AAZStrType() + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.schema_type = AAZStrType( + serialized_name="schemaType", + ) + _element.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + _element.status = AAZStrType() + + secondary_contacts = cls._schema_on_200.properties.secondary_contacts + secondary_contacts.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + 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/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_update.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_update.py new file mode 100644 index 00000000000..b2b92ceb8de --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_update.py @@ -0,0 +1,536 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection update", +) +class Update(AAZCommand): + """Update the connection resource. + + :example: Update the given connection + az azure-data-transfer connection update --name connectionName --resourceGroup testRG --tags key1=value1 key2=value2 + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.connection_name = AAZStrArg( + options=["-n", "--name", "--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Connection" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Connection", + help="Resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Identity" + + # define Arg Group "Properties" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ConnectionsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.ConnectionsCreateOrUpdate(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 ConnectionsGet(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.AzureDataTransfer/connections/{connectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + 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_connection_read(cls._schema_on_200) + + return cls._schema_on_200 + + class ConnectionsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "PATCH" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + 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_connection_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", AAZIdentityObjectType) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + 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_connection_read = None + + @classmethod + def _build_schema_connection_read(cls, _schema): + if cls._schema_connection_read is not None: + _schema.id = cls._schema_connection_read.id + _schema.identity = cls._schema_connection_read.identity + _schema.location = cls._schema_connection_read.location + _schema.name = cls._schema_connection_read.name + _schema.properties = cls._schema_connection_read.properties + _schema.system_data = cls._schema_connection_read.system_data + _schema.tags = cls._schema_connection_read.tags + _schema.type = cls._schema_connection_read.type + return + + cls._schema_connection_read = _schema_connection_read = AAZObjectType() + + connection_read = _schema_connection_read + connection_read.id = AAZStrType( + flags={"read_only": True}, + ) + connection_read.identity = AAZIdentityObjectType() + connection_read.location = AAZStrType( + flags={"required": True}, + ) + connection_read.name = AAZStrType( + flags={"read_only": True}, + ) + connection_read.properties = AAZObjectType() + connection_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + connection_read.tags = AAZDictType() + connection_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_connection_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_connection_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = _schema_connection_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_connection_read.properties + properties.approver = AAZStrType( + flags={"read_only": True}, + ) + properties.date_submitted = AAZStrType( + serialized_name="dateSubmitted", + flags={"read_only": True}, + ) + properties.direction = AAZStrType() + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.justification = AAZStrType() + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_connection_id = AAZStrType( + serialized_name="linkedConnectionId", + flags={"read_only": True}, + ) + properties.pin = AAZStrType() + properties.pipeline = AAZStrType( + flags={"required": True}, + ) + properties.policies = AAZListType() + properties.primary_contact = AAZStrType( + serialized_name="primaryContact", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_subscription_id = AAZStrType( + serialized_name="remoteSubscriptionId", + ) + properties.requirement_id = AAZStrType( + serialized_name="requirementId", + ) + properties.schema_uris = AAZListType( + serialized_name="schemaUris", + ) + properties.schemas = AAZListType() + properties.secondary_contacts = AAZListType( + serialized_name="secondaryContacts", + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.status_reason = AAZStrType( + serialized_name="statusReason", + flags={"read_only": True}, + ) + + flow_types = _schema_connection_read.properties.flow_types + flow_types.Element = AAZStrType() + + force_disabled_status = _schema_connection_read.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + policies = _schema_connection_read.properties.policies + policies.Element = AAZStrType() + + schema_uris = _schema_connection_read.properties.schema_uris + schema_uris.Element = AAZStrType() + + schemas = _schema_connection_read.properties.schemas + schemas.Element = AAZObjectType() + + _element = _schema_connection_read.properties.schemas.Element + _element.connection_id = AAZStrType( + serialized_name="connectionId", + ) + _element.content = AAZStrType() + _element.direction = AAZStrType() + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.schema_type = AAZStrType( + serialized_name="schemaType", + ) + _element.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + _element.status = AAZStrType() + + secondary_contacts = _schema_connection_read.properties.secondary_contacts + secondary_contacts.Element = AAZStrType() + + system_data = _schema_connection_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = _schema_connection_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_connection_read.id + _schema.identity = cls._schema_connection_read.identity + _schema.location = cls._schema_connection_read.location + _schema.name = cls._schema_connection_read.name + _schema.properties = cls._schema_connection_read.properties + _schema.system_data = cls._schema_connection_read.system_data + _schema.tags = cls._schema_connection_read.tags + _schema.type = cls._schema_connection_read.type + + +__all__ = ["Update"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_wait.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_wait.py new file mode 100644 index 00000000000..6b15277e1a4 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/_wait.py @@ -0,0 +1,330 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}", "2025-05-21"], + ] + } + + 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.connection_name = AAZStrArg( + options=["-n", "--name", "--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ConnectionsGet(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=False) + return result + + class ConnectionsGet(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.AzureDataTransfer/connections/{connectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + 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 = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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.approver = AAZStrType( + flags={"read_only": True}, + ) + properties.date_submitted = AAZStrType( + serialized_name="dateSubmitted", + flags={"read_only": True}, + ) + properties.direction = AAZStrType() + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.justification = AAZStrType() + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_connection_id = AAZStrType( + serialized_name="linkedConnectionId", + flags={"read_only": True}, + ) + properties.pin = AAZStrType() + properties.pipeline = AAZStrType( + flags={"required": True}, + ) + properties.policies = AAZListType() + properties.primary_contact = AAZStrType( + serialized_name="primaryContact", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_subscription_id = AAZStrType( + serialized_name="remoteSubscriptionId", + ) + properties.requirement_id = AAZStrType( + serialized_name="requirementId", + ) + properties.schema_uris = AAZListType( + serialized_name="schemaUris", + ) + properties.schemas = AAZListType() + properties.secondary_contacts = AAZListType( + serialized_name="secondaryContacts", + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.status_reason = AAZStrType( + serialized_name="statusReason", + flags={"read_only": True}, + ) + + flow_types = cls._schema_on_200.properties.flow_types + flow_types.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema_uris = cls._schema_on_200.properties.schema_uris + schema_uris.Element = AAZStrType() + + schemas = cls._schema_on_200.properties.schemas + schemas.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.schemas.Element + _element.connection_id = AAZStrType( + serialized_name="connectionId", + ) + _element.content = AAZStrType() + _element.direction = AAZStrType() + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.schema_type = AAZStrType( + serialized_name="schemaType", + ) + _element.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + _element.status = AAZStrType() + + secondary_contacts = cls._schema_on_200.properties.secondary_contacts + secondary_contacts.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/__cmd_group.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/__cmd_group.py new file mode 100644 index 00000000000..8821bc5b61a --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/__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( + "azure-data-transfer connection flow", +) +class __CMDGroup(AAZCommandGroup): + """Azure data transfer flow commands + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/__init__.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/__init__.py new file mode 100644 index 00000000000..6d41db155c6 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/__init__.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._disable import * +from ._enable import * +from ._link import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_create.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_create.py new file mode 100644 index 00000000000..2fde637bbc5 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_create.py @@ -0,0 +1,821 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection flow create", +) +class Create(AAZCommand): + """Create the flow resource. + + :example: Creates the flow resource + az azure-data-transfer connection flow create --resource-group testRG --connection-name testConnection --flow-name testFlow --location East US --connection --flow-type Complex --storage-account-name testsa --staorage-account-id /subscriptions/389ff96a-b137-405b-a3c8-4d22514708b5/resourceGroups/rpaas-rg/providers/Private.AzureDataTransfer/storageAccounts/testsa --storage-container-name testcontainer + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/flows/{}", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.flow_name = AAZStrArg( + options=["-n", "--name", "--flow-name"], + help="The name for the flow to perform the operation on.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Flow" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Flow", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.plan = AAZObjectArg( + options=["--plan"], + arg_group="Flow", + help="Details of the resource plan.", + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Flow", + help="Resource tags.", + ) + + plan = cls._args_schema.plan + plan.name = AAZStrArg( + options=["name"], + help="A user defined name of the 3rd Party Artifact that is being procured.", + required=True, + ) + plan.product = AAZStrArg( + options=["product"], + help="The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + required=True, + ) + plan.promotion_code = AAZStrArg( + options=["promotion-code"], + help="A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + ) + plan.publisher = AAZStrArg( + options=["publisher"], + help="The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + required=True, + ) + plan.version = AAZStrArg( + options=["version"], + help="The version of the desired product/artifact.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Identity" + + _args_schema = cls._args_schema + _args_schema.mi_system_assigned = AAZStrArg( + options=["--system-assigned", "--mi-system-assigned"], + arg_group="Identity", + help="Set the system managed identity.", + blank="True", + ) + _args_schema.mi_user_assigned = AAZListArg( + options=["--user-assigned", "--mi-user-assigned"], + arg_group="Identity", + help="Set the user managed identities.", + blank=[], + ) + + mi_user_assigned = cls._args_schema.mi_user_assigned + mi_user_assigned.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.api_flow_options = AAZObjectArg( + options=["--api-flow-options"], + arg_group="Properties", + help="The API Flow configuration options for Azure Data Transfer API Flow type.", + ) + _args_schema.consumer_group = AAZStrArg( + options=["--consumer-group"], + arg_group="Properties", + help="Event Hub Consumer Group", + ) + _args_schema.customer_key_vault_uri = AAZStrArg( + options=["--customer-key-vault-uri"], + arg_group="Properties", + help="The URI to the customer managed key for this flow", + ) + _args_schema.data_type = AAZStrArg( + options=["--data-type"], + arg_group="Properties", + help="Type of data to transfer via the flow.", + enum={"Blob": "Blob", "Table": "Table"}, + ) + _args_schema.endpoint_ports = AAZListArg( + options=["--endpoint-ports"], + arg_group="Properties", + help="The destination endpoint ports of the stream", + ) + _args_schema.destination_endpoints = AAZListArg( + options=["--destination-endpoints"], + arg_group="Properties", + help="The destination endpoints of the stream", + ) + _args_schema.event_hub_id = AAZResourceIdArg( + options=["--event-hub-id"], + arg_group="Properties", + help="Event Hub ID", + ) + _args_schema.flow_type = AAZStrArg( + options=["--flow-type"], + arg_group="Properties", + help="The flow type for this flow", + enum={"API": "API", "BasicFiles": "BasicFiles", "Complex": "Complex", "Data": "Data", "DevSecOps": "DevSecOps", "DiskImages": "DiskImages", "Messaging": "Messaging", "MicrosoftInternal": "MicrosoftInternal", "Mission": "Mission", "MissionOpaqueXML": "MissionOpaqueXML", "Opaque": "Opaque", "Standard": "Standard", "StreamingVideo": "StreamingVideo", "Unknown": "Unknown"}, + ) + _args_schema.messaging_options = AAZObjectArg( + options=["--messaging-options"], + arg_group="Properties", + help="The messaging options for this flow", + ) + _args_schema.passphrase = AAZStrArg( + options=["--passphrase"], + arg_group="Properties", + help="The passphrase used for SRT streams", + ) + _args_schema.schema = AAZObjectArg( + options=["--schema"], + arg_group="Properties", + help="The selected schema for this flow", + ) + _args_schema.service_bus_queue_id = AAZResourceIdArg( + options=["--service-bus-queue-id"], + arg_group="Properties", + help="Service Bus Queue ID", + ) + _args_schema.source_addresses = AAZObjectArg( + options=["--source-addresses"], + arg_group="Properties", + help="The source IP address and CIDR ranges of the stream", + ) + _args_schema.status = AAZStrArg( + options=["--status"], + arg_group="Properties", + help="Status of the current flow", + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + _args_schema.storage_account_id = AAZResourceIdArg( + options=["--storage-account-id"], + arg_group="Properties", + help="Storage Account ID", + ) + _args_schema.storage_account_name = AAZStrArg( + options=["--storage-account-name"], + arg_group="Properties", + help="Storage Account", + ) + _args_schema.storage_container_name = AAZStrArg( + options=["--storage-container-name"], + arg_group="Properties", + help="Storage Container Name", + ) + _args_schema.storage_table_name = AAZStrArg( + options=["--storage-table-name"], + arg_group="Properties", + help="Storage Table Name", + ) + _args_schema.stream_id = AAZStrArg( + options=["--stream-id"], + arg_group="Properties", + help="The flow stream identifier", + ) + _args_schema.stream_latency = AAZIntArg( + options=["--stream-latency"], + arg_group="Properties", + help="The latency of the stream in milliseconds", + ) + _args_schema.stream_protocol = AAZStrArg( + options=["--stream-protocol"], + arg_group="Properties", + help="The protocol of the stream", + enum={"RTP": "RTP", "SRT": "SRT", "UDP": "UDP"}, + ) + + api_flow_options = cls._args_schema.api_flow_options + api_flow_options.api_mode = AAZStrArg( + options=["api-mode"], + help="Remote Calling Mode in the Azure Data Transfer API Flow, which describes how the API Flow will be invoked", + enum={"Endpoint": "Endpoint", "SDK": "SDK"}, + ) + api_flow_options.audience_override = AAZStrArg( + options=["audience-override"], + help="Optional field to override the audience of the remote endpoint", + ) + api_flow_options.cname = AAZStrArg( + options=["cname"], + help="Unique CNAME to represent the Azure Data Transfer API Flow instance", + ) + api_flow_options.identity_translation = AAZStrArg( + options=["identity-translation"], + help="Flag for if Azure Data Transfer API Flow should extract the user token", + enum={"ServiceIdentity": "ServiceIdentity", "UserIdentity": "UserIdentity"}, + ) + api_flow_options.remote_calling_mode_client_id = AAZStrArg( + options=["remote-calling-mode-client-id"], + help="Remote stub app registration Client ID", + ) + api_flow_options.remote_endpoint = AAZStrArg( + options=["remote-endpoint"], + help="Remote host to which communication needs to be made", + ) + api_flow_options.sender_client_id = AAZStrArg( + options=["sender-client-id"], + help="Sender's app user assigned Manage Identity client ID", + ) + + endpoint_ports = cls._args_schema.endpoint_ports + endpoint_ports.Element = AAZIntArg() + + destination_endpoints = cls._args_schema.destination_endpoints + destination_endpoints.Element = AAZStrArg() + + messaging_options = cls._args_schema.messaging_options + messaging_options.billing_tier = AAZStrArg( + options=["billing-tier"], + help="Billing tier for this messaging flow", + enum={"BlobTransport": "BlobTransport", "Premium": "Premium", "Standard": "Standard"}, + ) + + schema = cls._args_schema.schema + schema.connection_id = AAZStrArg( + options=["connection-id"], + help="Connection ID associated with this schema", + ) + schema.content = AAZStrArg( + options=["content"], + help="Content of the schema", + ) + schema.direction = AAZStrArg( + options=["direction"], + help="The direction of the schema.", + enum={"Receive": "Receive", "Send": "Send"}, + ) + schema.id = AAZStrArg( + options=["id"], + help="ID associated with this schema", + ) + schema.name = AAZStrArg( + options=["name"], + help="Name of the schema", + ) + schema.schema_type = AAZStrArg( + options=["schema-type"], + help="The Schema Type", + enum={"Xsd": "Xsd", "Zip": "Zip"}, + ) + schema.schema_uri = AAZStrArg( + options=["schema-uri"], + help="Uri containing SAS token for the zipped schema", + ) + schema.status = AAZStrArg( + options=["status"], + help="Status of the schema", + enum={"Approved": "Approved", "New": "New"}, + ) + + source_addresses = cls._args_schema.source_addresses + source_addresses.source_addresses = AAZListArg( + options=["source-addresses"], + help="A source IP address or CIDR range", + ) + + source_addresses = cls._args_schema.source_addresses.source_addresses + source_addresses.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FlowsCreateOrUpdate(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 FlowsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_name, + required=True, + ), + **self.serialize_url_param( + "flowName", self.ctx.args.flow_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", "2025-05-21", + 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", AAZIdentityObjectType) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("plan", AAZObjectType, ".plan") + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={"flags": {"action": "create"}}) + identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={"flags": {"action": "create"}}) + + user_assigned = _builder.get(".identity.userAssigned") + if user_assigned is not None: + user_assigned.set_elements(AAZStrType, ".") + + plan = _builder.get(".plan") + if plan is not None: + plan.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("product", AAZStrType, ".product", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("promotionCode", AAZStrType, ".promotion_code") + plan.set_prop("publisher", AAZStrType, ".publisher", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("version", AAZStrType, ".version") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("apiFlowOptions", AAZObjectType, ".api_flow_options") + properties.set_prop("consumerGroup", AAZStrType, ".consumer_group") + properties.set_prop("customerManagedKeyVaultUri", AAZStrType, ".customer_key_vault_uri") + properties.set_prop("dataType", AAZStrType, ".data_type") + properties.set_prop("destinationEndpointPorts", AAZListType, ".endpoint_ports") + properties.set_prop("destinationEndpoints", AAZListType, ".destination_endpoints") + properties.set_prop("eventHubId", AAZStrType, ".event_hub_id") + properties.set_prop("flowType", AAZStrType, ".flow_type") + properties.set_prop("messagingOptions", AAZObjectType, ".messaging_options") + properties.set_prop("passphrase", AAZStrType, ".passphrase") + properties.set_prop("schema", AAZObjectType, ".schema") + properties.set_prop("serviceBusQueueId", AAZStrType, ".service_bus_queue_id") + properties.set_prop("sourceAddresses", AAZObjectType, ".source_addresses") + properties.set_prop("status", AAZStrType, ".status") + properties.set_prop("storageAccountId", AAZStrType, ".storage_account_id") + properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") + properties.set_prop("storageContainerName", AAZStrType, ".storage_container_name") + properties.set_prop("storageTableName", AAZStrType, ".storage_table_name") + properties.set_prop("streamId", AAZStrType, ".stream_id") + properties.set_prop("streamLatency", AAZIntType, ".stream_latency") + properties.set_prop("streamProtocol", AAZStrType, ".stream_protocol") + + api_flow_options = _builder.get(".properties.apiFlowOptions") + if api_flow_options is not None: + api_flow_options.set_prop("apiMode", AAZStrType, ".api_mode") + api_flow_options.set_prop("audienceOverride", AAZStrType, ".audience_override") + api_flow_options.set_prop("cname", AAZStrType, ".cname") + api_flow_options.set_prop("identityTranslation", AAZStrType, ".identity_translation") + api_flow_options.set_prop("remoteCallingModeClientId", AAZStrType, ".remote_calling_mode_client_id") + api_flow_options.set_prop("remoteEndpoint", AAZStrType, ".remote_endpoint") + api_flow_options.set_prop("senderClientId", AAZStrType, ".sender_client_id") + + destination_endpoint_ports = _builder.get(".properties.destinationEndpointPorts") + if destination_endpoint_ports is not None: + destination_endpoint_ports.set_elements(AAZIntType, ".") + + destination_endpoints = _builder.get(".properties.destinationEndpoints") + if destination_endpoints is not None: + destination_endpoints.set_elements(AAZStrType, ".") + + messaging_options = _builder.get(".properties.messagingOptions") + if messaging_options is not None: + messaging_options.set_prop("billingTier", AAZStrType, ".billing_tier") + + schema = _builder.get(".properties.schema") + if schema is not None: + schema.set_prop("connectionId", AAZStrType, ".connection_id") + schema.set_prop("content", AAZStrType, ".content") + schema.set_prop("direction", AAZStrType, ".direction") + schema.set_prop("id", AAZStrType, ".id") + schema.set_prop("name", AAZStrType, ".name") + schema.set_prop("schemaType", AAZStrType, ".schema_type") + schema.set_prop("schemaUri", AAZStrType, ".schema_uri") + schema.set_prop("status", AAZStrType, ".status") + + source_addresses = _builder.get(".properties.sourceAddresses") + if source_addresses is not None: + source_addresses.set_prop("sourceAddresses", AAZListType, ".source_addresses") + + source_addresses = _builder.get(".properties.sourceAddresses.sourceAddresses") + if source_addresses is not None: + source_addresses.set_elements(AAZStrType, ".") + + 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 = AAZIdentityObjectType() + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.plan = AAZObjectType() + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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}, + ) + + plan = cls._schema_on_200_201.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200_201.properties + properties.api_flow_options = AAZObjectType( + serialized_name="apiFlowOptions", + ) + properties.connection = AAZObjectType() + properties.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + properties.customer_managed_key_vault_uri = AAZStrType( + serialized_name="customerManagedKeyVaultUri", + ) + properties.data_type = AAZStrType( + serialized_name="dataType", + ) + properties.destination_endpoint_ports = AAZListType( + serialized_name="destinationEndpointPorts", + ) + properties.destination_endpoints = AAZListType( + serialized_name="destinationEndpoints", + ) + properties.event_hub_id = AAZStrType( + serialized_name="eventHubId", + ) + properties.flow_id = AAZStrType( + serialized_name="flowId", + flags={"read_only": True}, + ) + properties.flow_type = AAZStrType( + serialized_name="flowType", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.key_vault_uri = AAZStrType( + serialized_name="keyVaultUri", + ) + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_flow_id = AAZStrType( + serialized_name="linkedFlowId", + flags={"read_only": True}, + ) + properties.messaging_options = AAZObjectType( + serialized_name="messagingOptions", + ) + properties.passphrase = AAZStrType() + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.schema = AAZObjectType() + properties.service_bus_queue_id = AAZStrType( + serialized_name="serviceBusQueueId", + ) + properties.source_addresses = AAZObjectType( + serialized_name="sourceAddresses", + ) + properties.status = AAZStrType() + properties.storage_account_id = AAZStrType( + serialized_name="storageAccountId", + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + properties.storage_container_name = AAZStrType( + serialized_name="storageContainerName", + ) + properties.storage_table_name = AAZStrType( + serialized_name="storageTableName", + ) + properties.stream_id = AAZStrType( + serialized_name="streamId", + ) + properties.stream_latency = AAZIntType( + serialized_name="streamLatency", + ) + properties.stream_protocol = AAZStrType( + serialized_name="streamProtocol", + ) + + api_flow_options = cls._schema_on_200_201.properties.api_flow_options + api_flow_options.api_mode = AAZStrType( + serialized_name="apiMode", + ) + api_flow_options.audience_override = AAZStrType( + serialized_name="audienceOverride", + ) + api_flow_options.cname = AAZStrType() + api_flow_options.identity_translation = AAZStrType( + serialized_name="identityTranslation", + ) + api_flow_options.remote_calling_mode_client_id = AAZStrType( + serialized_name="remoteCallingModeClientId", + ) + api_flow_options.remote_endpoint = AAZStrType( + serialized_name="remoteEndpoint", + ) + api_flow_options.sender_client_id = AAZStrType( + serialized_name="senderClientId", + ) + + connection = cls._schema_on_200_201.properties.connection + connection.id = AAZStrType( + flags={"required": True}, + ) + connection.location = AAZStrType() + connection.name = AAZStrType() + connection.subscription_name = AAZStrType( + serialized_name="subscriptionName", + ) + + destination_endpoint_ports = cls._schema_on_200_201.properties.destination_endpoint_ports + destination_endpoint_ports.Element = AAZIntType() + + destination_endpoints = cls._schema_on_200_201.properties.destination_endpoints + destination_endpoints.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200_201.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + messaging_options = cls._schema_on_200_201.properties.messaging_options + messaging_options.billing_tier = AAZStrType( + serialized_name="billingTier", + ) + + policies = cls._schema_on_200_201.properties.policies + policies.Element = AAZStrType() + + schema = cls._schema_on_200_201.properties.schema + schema.connection_id = AAZStrType( + serialized_name="connectionId", + ) + schema.content = AAZStrType() + schema.direction = AAZStrType() + schema.id = AAZStrType() + schema.name = AAZStrType() + schema.schema_type = AAZStrType( + serialized_name="schemaType", + ) + schema.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + schema.status = AAZStrType() + + source_addresses = cls._schema_on_200_201.properties.source_addresses + source_addresses.source_addresses = AAZListType( + serialized_name="sourceAddresses", + ) + + source_addresses = cls._schema_on_200_201.properties.source_addresses.source_addresses + source_addresses.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + 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/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_delete.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_delete.py new file mode 100644 index 00000000000..d22b84fab01 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_delete.py @@ -0,0 +1,183 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection flow delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete the flow resource. + + :example: Deletes the flow resource + az azure-data-transfer connection flow delete --resource-group testRG --connection-name testConnection --flow-name testFlow + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/flows/{}", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, 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.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.flow_name = AAZStrArg( + options=["-n", "--name", "--flow-name"], + help="The name for the flow to perform the operation on.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FlowsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class FlowsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_name, + required=True, + ), + **self.serialize_url_param( + "flowName", self.ctx.args.flow_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", "2025-05-21", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_disable.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_disable.py new file mode 100644 index 00000000000..1e8ece0c55e --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_disable.py @@ -0,0 +1,446 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection flow disable", +) +class Disable(AAZCommand): + """Disables the specified flow + + :example: Disables the specified flow + az azure-data-transfer connection flow disable --resource-group testRG --connection-name testConnection --flow-name testFlow + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/flows/{}/disable", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.flow_name = AAZStrArg( + options=["--flow-name"], + help="The name for the flow to perform the operation on.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FlowsDisable(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 FlowsDisable(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/disable", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_name, + required=True, + ), + **self.serialize_url_param( + "flowName", self.ctx.args.flow_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", "2025-05-21", + 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 = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.api_flow_options = AAZObjectType( + serialized_name="apiFlowOptions", + ) + properties.connection = AAZObjectType() + properties.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + properties.customer_managed_key_vault_uri = AAZStrType( + serialized_name="customerManagedKeyVaultUri", + ) + properties.data_type = AAZStrType( + serialized_name="dataType", + ) + properties.destination_endpoint_ports = AAZListType( + serialized_name="destinationEndpointPorts", + ) + properties.destination_endpoints = AAZListType( + serialized_name="destinationEndpoints", + ) + properties.event_hub_id = AAZStrType( + serialized_name="eventHubId", + ) + properties.flow_id = AAZStrType( + serialized_name="flowId", + flags={"read_only": True}, + ) + properties.flow_type = AAZStrType( + serialized_name="flowType", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.key_vault_uri = AAZStrType( + serialized_name="keyVaultUri", + ) + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_flow_id = AAZStrType( + serialized_name="linkedFlowId", + flags={"read_only": True}, + ) + properties.messaging_options = AAZObjectType( + serialized_name="messagingOptions", + ) + properties.passphrase = AAZStrType() + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.schema = AAZObjectType() + properties.service_bus_queue_id = AAZStrType( + serialized_name="serviceBusQueueId", + ) + properties.source_addresses = AAZObjectType( + serialized_name="sourceAddresses", + ) + properties.status = AAZStrType() + properties.storage_account_id = AAZStrType( + serialized_name="storageAccountId", + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + properties.storage_container_name = AAZStrType( + serialized_name="storageContainerName", + ) + properties.storage_table_name = AAZStrType( + serialized_name="storageTableName", + ) + properties.stream_id = AAZStrType( + serialized_name="streamId", + ) + properties.stream_latency = AAZIntType( + serialized_name="streamLatency", + ) + properties.stream_protocol = AAZStrType( + serialized_name="streamProtocol", + ) + + api_flow_options = cls._schema_on_200.properties.api_flow_options + api_flow_options.api_mode = AAZStrType( + serialized_name="apiMode", + ) + api_flow_options.audience_override = AAZStrType( + serialized_name="audienceOverride", + ) + api_flow_options.cname = AAZStrType() + api_flow_options.identity_translation = AAZStrType( + serialized_name="identityTranslation", + ) + api_flow_options.remote_calling_mode_client_id = AAZStrType( + serialized_name="remoteCallingModeClientId", + ) + api_flow_options.remote_endpoint = AAZStrType( + serialized_name="remoteEndpoint", + ) + api_flow_options.sender_client_id = AAZStrType( + serialized_name="senderClientId", + ) + + connection = cls._schema_on_200.properties.connection + connection.id = AAZStrType( + flags={"required": True}, + ) + connection.location = AAZStrType() + connection.name = AAZStrType() + connection.subscription_name = AAZStrType( + serialized_name="subscriptionName", + ) + + destination_endpoint_ports = cls._schema_on_200.properties.destination_endpoint_ports + destination_endpoint_ports.Element = AAZIntType() + + destination_endpoints = cls._schema_on_200.properties.destination_endpoints + destination_endpoints.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + messaging_options = cls._schema_on_200.properties.messaging_options + messaging_options.billing_tier = AAZStrType( + serialized_name="billingTier", + ) + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema = cls._schema_on_200.properties.schema + schema.connection_id = AAZStrType( + serialized_name="connectionId", + ) + schema.content = AAZStrType() + schema.direction = AAZStrType() + schema.id = AAZStrType() + schema.name = AAZStrType() + schema.schema_type = AAZStrType( + serialized_name="schemaType", + ) + schema.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + schema.status = AAZStrType() + + source_addresses = cls._schema_on_200.properties.source_addresses + source_addresses.source_addresses = AAZListType( + serialized_name="sourceAddresses", + ) + + source_addresses = cls._schema_on_200.properties.source_addresses.source_addresses + source_addresses.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _DisableHelper: + """Helper class for Disable""" + + +__all__ = ["Disable"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_enable.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_enable.py new file mode 100644 index 00000000000..63623a2e2c8 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_enable.py @@ -0,0 +1,446 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection flow enable", +) +class Enable(AAZCommand): + """Enables the specified flow. + + :example: Enables the specified flow + az azure-data-transfer connection flow enable --resource-group testRG --connection-name testConnection --flow-name testFlow + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/flows/{}/enable", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.flow_name = AAZStrArg( + options=["--flow-name"], + help="The name for the flow to perform the operation on.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FlowsEnable(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 FlowsEnable(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/enable", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_name, + required=True, + ), + **self.serialize_url_param( + "flowName", self.ctx.args.flow_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", "2025-05-21", + 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 = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.api_flow_options = AAZObjectType( + serialized_name="apiFlowOptions", + ) + properties.connection = AAZObjectType() + properties.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + properties.customer_managed_key_vault_uri = AAZStrType( + serialized_name="customerManagedKeyVaultUri", + ) + properties.data_type = AAZStrType( + serialized_name="dataType", + ) + properties.destination_endpoint_ports = AAZListType( + serialized_name="destinationEndpointPorts", + ) + properties.destination_endpoints = AAZListType( + serialized_name="destinationEndpoints", + ) + properties.event_hub_id = AAZStrType( + serialized_name="eventHubId", + ) + properties.flow_id = AAZStrType( + serialized_name="flowId", + flags={"read_only": True}, + ) + properties.flow_type = AAZStrType( + serialized_name="flowType", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.key_vault_uri = AAZStrType( + serialized_name="keyVaultUri", + ) + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_flow_id = AAZStrType( + serialized_name="linkedFlowId", + flags={"read_only": True}, + ) + properties.messaging_options = AAZObjectType( + serialized_name="messagingOptions", + ) + properties.passphrase = AAZStrType() + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.schema = AAZObjectType() + properties.service_bus_queue_id = AAZStrType( + serialized_name="serviceBusQueueId", + ) + properties.source_addresses = AAZObjectType( + serialized_name="sourceAddresses", + ) + properties.status = AAZStrType() + properties.storage_account_id = AAZStrType( + serialized_name="storageAccountId", + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + properties.storage_container_name = AAZStrType( + serialized_name="storageContainerName", + ) + properties.storage_table_name = AAZStrType( + serialized_name="storageTableName", + ) + properties.stream_id = AAZStrType( + serialized_name="streamId", + ) + properties.stream_latency = AAZIntType( + serialized_name="streamLatency", + ) + properties.stream_protocol = AAZStrType( + serialized_name="streamProtocol", + ) + + api_flow_options = cls._schema_on_200.properties.api_flow_options + api_flow_options.api_mode = AAZStrType( + serialized_name="apiMode", + ) + api_flow_options.audience_override = AAZStrType( + serialized_name="audienceOverride", + ) + api_flow_options.cname = AAZStrType() + api_flow_options.identity_translation = AAZStrType( + serialized_name="identityTranslation", + ) + api_flow_options.remote_calling_mode_client_id = AAZStrType( + serialized_name="remoteCallingModeClientId", + ) + api_flow_options.remote_endpoint = AAZStrType( + serialized_name="remoteEndpoint", + ) + api_flow_options.sender_client_id = AAZStrType( + serialized_name="senderClientId", + ) + + connection = cls._schema_on_200.properties.connection + connection.id = AAZStrType( + flags={"required": True}, + ) + connection.location = AAZStrType() + connection.name = AAZStrType() + connection.subscription_name = AAZStrType( + serialized_name="subscriptionName", + ) + + destination_endpoint_ports = cls._schema_on_200.properties.destination_endpoint_ports + destination_endpoint_ports.Element = AAZIntType() + + destination_endpoints = cls._schema_on_200.properties.destination_endpoints + destination_endpoints.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + messaging_options = cls._schema_on_200.properties.messaging_options + messaging_options.billing_tier = AAZStrType( + serialized_name="billingTier", + ) + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema = cls._schema_on_200.properties.schema + schema.connection_id = AAZStrType( + serialized_name="connectionId", + ) + schema.content = AAZStrType() + schema.direction = AAZStrType() + schema.id = AAZStrType() + schema.name = AAZStrType() + schema.schema_type = AAZStrType( + serialized_name="schemaType", + ) + schema.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + schema.status = AAZStrType() + + source_addresses = cls._schema_on_200.properties.source_addresses + source_addresses.source_addresses = AAZListType( + serialized_name="sourceAddresses", + ) + + source_addresses = cls._schema_on_200.properties.source_addresses.source_addresses + source_addresses.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _EnableHelper: + """Helper class for Enable""" + + +__all__ = ["Enable"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_link.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_link.py new file mode 100644 index 00000000000..aebe7344750 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_link.py @@ -0,0 +1,476 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection flow link", +) +class Link(AAZCommand): + """Links the specified flow. + + :example: Links the specified flow + az azure-data-transfer connection flow link --resource-group testRG --connection-name testConnection --flow-name testFlow --id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.AzureDataTransfer/connections/testConnection/flows/testFlow + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/flows/{}/link", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.flow_name = AAZStrArg( + options=["--flow-name"], + help="The name for the flow to perform the operation on.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Flow" + + _args_schema = cls._args_schema + _args_schema.id = AAZStrArg( + options=["--id"], + arg_group="Flow", + help="ID of the resource.", + required=True, + ) + _args_schema.status_reason = AAZStrArg( + options=["--status-reason"], + arg_group="Flow", + help="Reason for resource operation.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FlowsLink(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 FlowsLink(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_name, + required=True, + ), + **self.serialize_url_param( + "flowName", self.ctx.args.flow_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", "2025-05-21", + 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("id", AAZStrType, ".id", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("statusReason", AAZStrType, ".status_reason") + + 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.identity = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.api_flow_options = AAZObjectType( + serialized_name="apiFlowOptions", + ) + properties.connection = AAZObjectType() + properties.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + properties.customer_managed_key_vault_uri = AAZStrType( + serialized_name="customerManagedKeyVaultUri", + ) + properties.data_type = AAZStrType( + serialized_name="dataType", + ) + properties.destination_endpoint_ports = AAZListType( + serialized_name="destinationEndpointPorts", + ) + properties.destination_endpoints = AAZListType( + serialized_name="destinationEndpoints", + ) + properties.event_hub_id = AAZStrType( + serialized_name="eventHubId", + ) + properties.flow_id = AAZStrType( + serialized_name="flowId", + flags={"read_only": True}, + ) + properties.flow_type = AAZStrType( + serialized_name="flowType", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.key_vault_uri = AAZStrType( + serialized_name="keyVaultUri", + ) + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_flow_id = AAZStrType( + serialized_name="linkedFlowId", + flags={"read_only": True}, + ) + properties.messaging_options = AAZObjectType( + serialized_name="messagingOptions", + ) + properties.passphrase = AAZStrType() + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.schema = AAZObjectType() + properties.service_bus_queue_id = AAZStrType( + serialized_name="serviceBusQueueId", + ) + properties.source_addresses = AAZObjectType( + serialized_name="sourceAddresses", + ) + properties.status = AAZStrType() + properties.storage_account_id = AAZStrType( + serialized_name="storageAccountId", + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + properties.storage_container_name = AAZStrType( + serialized_name="storageContainerName", + ) + properties.storage_table_name = AAZStrType( + serialized_name="storageTableName", + ) + properties.stream_id = AAZStrType( + serialized_name="streamId", + ) + properties.stream_latency = AAZIntType( + serialized_name="streamLatency", + ) + properties.stream_protocol = AAZStrType( + serialized_name="streamProtocol", + ) + + api_flow_options = cls._schema_on_200.properties.api_flow_options + api_flow_options.api_mode = AAZStrType( + serialized_name="apiMode", + ) + api_flow_options.audience_override = AAZStrType( + serialized_name="audienceOverride", + ) + api_flow_options.cname = AAZStrType() + api_flow_options.identity_translation = AAZStrType( + serialized_name="identityTranslation", + ) + api_flow_options.remote_calling_mode_client_id = AAZStrType( + serialized_name="remoteCallingModeClientId", + ) + api_flow_options.remote_endpoint = AAZStrType( + serialized_name="remoteEndpoint", + ) + api_flow_options.sender_client_id = AAZStrType( + serialized_name="senderClientId", + ) + + connection = cls._schema_on_200.properties.connection + connection.id = AAZStrType( + flags={"required": True}, + ) + connection.location = AAZStrType() + connection.name = AAZStrType() + connection.subscription_name = AAZStrType( + serialized_name="subscriptionName", + ) + + destination_endpoint_ports = cls._schema_on_200.properties.destination_endpoint_ports + destination_endpoint_ports.Element = AAZIntType() + + destination_endpoints = cls._schema_on_200.properties.destination_endpoints + destination_endpoints.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + messaging_options = cls._schema_on_200.properties.messaging_options + messaging_options.billing_tier = AAZStrType( + serialized_name="billingTier", + ) + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema = cls._schema_on_200.properties.schema + schema.connection_id = AAZStrType( + serialized_name="connectionId", + ) + schema.content = AAZStrType() + schema.direction = AAZStrType() + schema.id = AAZStrType() + schema.name = AAZStrType() + schema.schema_type = AAZStrType( + serialized_name="schemaType", + ) + schema.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + schema.status = AAZStrType() + + source_addresses = cls._schema_on_200.properties.source_addresses + source_addresses.source_addresses = AAZListType( + serialized_name="sourceAddresses", + ) + + source_addresses = cls._schema_on_200.properties.source_addresses.source_addresses + source_addresses.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _LinkHelper: + """Helper class for Link""" + + +__all__ = ["Link"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_list.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_list.py new file mode 100644 index 00000000000..fe98a6764e7 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_list.py @@ -0,0 +1,426 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection flow list", +) +class List(AAZCommand): + """List flows in a connection. + + :example: Gets flows in a connection + az azure-data-transfer connection flow list --resource-group testRG --connection-name testConnection + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/flows", "2025-05-21"], + ] + } + + 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.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FlowsListByConnection(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 FlowsListByConnection(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.AzureDataTransfer/connections/{connectionName}/flows", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_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", "2025-05-21", + 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( + flags={"required": True}, + ) + + 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 = AAZIdentityObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.plan = AAZObjectType() + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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}, + ) + + plan = cls._schema_on_200.value.Element.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.value.Element.properties + properties.api_flow_options = AAZObjectType( + serialized_name="apiFlowOptions", + ) + properties.connection = AAZObjectType() + properties.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + properties.customer_managed_key_vault_uri = AAZStrType( + serialized_name="customerManagedKeyVaultUri", + ) + properties.data_type = AAZStrType( + serialized_name="dataType", + ) + properties.destination_endpoint_ports = AAZListType( + serialized_name="destinationEndpointPorts", + ) + properties.destination_endpoints = AAZListType( + serialized_name="destinationEndpoints", + ) + properties.event_hub_id = AAZStrType( + serialized_name="eventHubId", + ) + properties.flow_id = AAZStrType( + serialized_name="flowId", + flags={"read_only": True}, + ) + properties.flow_type = AAZStrType( + serialized_name="flowType", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.key_vault_uri = AAZStrType( + serialized_name="keyVaultUri", + ) + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_flow_id = AAZStrType( + serialized_name="linkedFlowId", + flags={"read_only": True}, + ) + properties.messaging_options = AAZObjectType( + serialized_name="messagingOptions", + ) + properties.passphrase = AAZStrType() + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.schema = AAZObjectType() + properties.service_bus_queue_id = AAZStrType( + serialized_name="serviceBusQueueId", + ) + properties.source_addresses = AAZObjectType( + serialized_name="sourceAddresses", + ) + properties.status = AAZStrType() + properties.storage_account_id = AAZStrType( + serialized_name="storageAccountId", + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + properties.storage_container_name = AAZStrType( + serialized_name="storageContainerName", + ) + properties.storage_table_name = AAZStrType( + serialized_name="storageTableName", + ) + properties.stream_id = AAZStrType( + serialized_name="streamId", + ) + properties.stream_latency = AAZIntType( + serialized_name="streamLatency", + ) + properties.stream_protocol = AAZStrType( + serialized_name="streamProtocol", + ) + + api_flow_options = cls._schema_on_200.value.Element.properties.api_flow_options + api_flow_options.api_mode = AAZStrType( + serialized_name="apiMode", + ) + api_flow_options.audience_override = AAZStrType( + serialized_name="audienceOverride", + ) + api_flow_options.cname = AAZStrType() + api_flow_options.identity_translation = AAZStrType( + serialized_name="identityTranslation", + ) + api_flow_options.remote_calling_mode_client_id = AAZStrType( + serialized_name="remoteCallingModeClientId", + ) + api_flow_options.remote_endpoint = AAZStrType( + serialized_name="remoteEndpoint", + ) + api_flow_options.sender_client_id = AAZStrType( + serialized_name="senderClientId", + ) + + connection = cls._schema_on_200.value.Element.properties.connection + connection.id = AAZStrType( + flags={"required": True}, + ) + connection.location = AAZStrType() + connection.name = AAZStrType() + connection.subscription_name = AAZStrType( + serialized_name="subscriptionName", + ) + + destination_endpoint_ports = cls._schema_on_200.value.Element.properties.destination_endpoint_ports + destination_endpoint_ports.Element = AAZIntType() + + destination_endpoints = cls._schema_on_200.value.Element.properties.destination_endpoints + destination_endpoints.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.value.Element.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + messaging_options = cls._schema_on_200.value.Element.properties.messaging_options + messaging_options.billing_tier = AAZStrType( + serialized_name="billingTier", + ) + + policies = cls._schema_on_200.value.Element.properties.policies + policies.Element = AAZStrType() + + schema = cls._schema_on_200.value.Element.properties.schema + schema.connection_id = AAZStrType( + serialized_name="connectionId", + ) + schema.content = AAZStrType() + schema.direction = AAZStrType() + schema.id = AAZStrType() + schema.name = AAZStrType() + schema.schema_type = AAZStrType( + serialized_name="schemaType", + ) + schema.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + schema.status = AAZStrType() + + source_addresses = cls._schema_on_200.value.Element.properties.source_addresses + source_addresses.source_addresses = AAZListType( + serialized_name="sourceAddresses", + ) + + source_addresses = cls._schema_on_200.value.Element.properties.source_addresses.source_addresses + source_addresses.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + 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/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_show.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_show.py new file mode 100644 index 00000000000..6d570a9dc78 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_show.py @@ -0,0 +1,429 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection flow show", +) +class Show(AAZCommand): + """Get flow resource. + + :example: Gets flow resource + az azure-data-transfer connection flow show --resource-group testRG --connection-name testConnection --flow-name testFlow + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/flows/{}", "2025-05-21"], + ] + } + + 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.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.flow_name = AAZStrArg( + options=["-n", "--name", "--flow-name"], + help="The name for the flow to perform the operation on.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FlowsGet(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 FlowsGet(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.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_name, + required=True, + ), + **self.serialize_url_param( + "flowName", self.ctx.args.flow_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", "2025-05-21", + 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 = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.api_flow_options = AAZObjectType( + serialized_name="apiFlowOptions", + ) + properties.connection = AAZObjectType() + properties.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + properties.customer_managed_key_vault_uri = AAZStrType( + serialized_name="customerManagedKeyVaultUri", + ) + properties.data_type = AAZStrType( + serialized_name="dataType", + ) + properties.destination_endpoint_ports = AAZListType( + serialized_name="destinationEndpointPorts", + ) + properties.destination_endpoints = AAZListType( + serialized_name="destinationEndpoints", + ) + properties.event_hub_id = AAZStrType( + serialized_name="eventHubId", + ) + properties.flow_id = AAZStrType( + serialized_name="flowId", + flags={"read_only": True}, + ) + properties.flow_type = AAZStrType( + serialized_name="flowType", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.key_vault_uri = AAZStrType( + serialized_name="keyVaultUri", + ) + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_flow_id = AAZStrType( + serialized_name="linkedFlowId", + flags={"read_only": True}, + ) + properties.messaging_options = AAZObjectType( + serialized_name="messagingOptions", + ) + properties.passphrase = AAZStrType() + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.schema = AAZObjectType() + properties.service_bus_queue_id = AAZStrType( + serialized_name="serviceBusQueueId", + ) + properties.source_addresses = AAZObjectType( + serialized_name="sourceAddresses", + ) + properties.status = AAZStrType() + properties.storage_account_id = AAZStrType( + serialized_name="storageAccountId", + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + properties.storage_container_name = AAZStrType( + serialized_name="storageContainerName", + ) + properties.storage_table_name = AAZStrType( + serialized_name="storageTableName", + ) + properties.stream_id = AAZStrType( + serialized_name="streamId", + ) + properties.stream_latency = AAZIntType( + serialized_name="streamLatency", + ) + properties.stream_protocol = AAZStrType( + serialized_name="streamProtocol", + ) + + api_flow_options = cls._schema_on_200.properties.api_flow_options + api_flow_options.api_mode = AAZStrType( + serialized_name="apiMode", + ) + api_flow_options.audience_override = AAZStrType( + serialized_name="audienceOverride", + ) + api_flow_options.cname = AAZStrType() + api_flow_options.identity_translation = AAZStrType( + serialized_name="identityTranslation", + ) + api_flow_options.remote_calling_mode_client_id = AAZStrType( + serialized_name="remoteCallingModeClientId", + ) + api_flow_options.remote_endpoint = AAZStrType( + serialized_name="remoteEndpoint", + ) + api_flow_options.sender_client_id = AAZStrType( + serialized_name="senderClientId", + ) + + connection = cls._schema_on_200.properties.connection + connection.id = AAZStrType( + flags={"required": True}, + ) + connection.location = AAZStrType() + connection.name = AAZStrType() + connection.subscription_name = AAZStrType( + serialized_name="subscriptionName", + ) + + destination_endpoint_ports = cls._schema_on_200.properties.destination_endpoint_ports + destination_endpoint_ports.Element = AAZIntType() + + destination_endpoints = cls._schema_on_200.properties.destination_endpoints + destination_endpoints.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + messaging_options = cls._schema_on_200.properties.messaging_options + messaging_options.billing_tier = AAZStrType( + serialized_name="billingTier", + ) + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema = cls._schema_on_200.properties.schema + schema.connection_id = AAZStrType( + serialized_name="connectionId", + ) + schema.content = AAZStrType() + schema.direction = AAZStrType() + schema.id = AAZStrType() + schema.name = AAZStrType() + schema.schema_type = AAZStrType( + serialized_name="schemaType", + ) + schema.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + schema.status = AAZStrType() + + source_addresses = cls._schema_on_200.properties.source_addresses + source_addresses.source_addresses = AAZListType( + serialized_name="sourceAddresses", + ) + + source_addresses = cls._schema_on_200.properties.source_addresses.source_addresses + source_addresses.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + 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/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_update.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_update.py new file mode 100644 index 00000000000..ba7b535effe --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_update.py @@ -0,0 +1,987 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection flow update", +) +class Update(AAZCommand): + """Update the flow resource. + + :example: Update the flow + az azure-data-transfer connection flow --resource-group testRG --connection testConnection --name testFlow --flow-type Complex + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/flows/{}", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.flow_name = AAZStrArg( + options=["-n", "--name", "--flow-name"], + help="The name for the flow to perform the operation on.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Flow" + + _args_schema = cls._args_schema + _args_schema.plan = AAZObjectArg( + options=["--plan"], + arg_group="Flow", + help="Details of the resource plan.", + nullable=True, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Flow", + help="Resource tags.", + nullable=True, + ) + + plan = cls._args_schema.plan + plan.name = AAZStrArg( + options=["name"], + help="A user defined name of the 3rd Party Artifact that is being procured.", + ) + plan.product = AAZStrArg( + options=["product"], + help="The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + ) + plan.promotion_code = AAZStrArg( + options=["promotion-code"], + help="A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + nullable=True, + ) + plan.publisher = AAZStrArg( + options=["publisher"], + help="The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + ) + plan.version = AAZStrArg( + options=["version"], + help="The version of the desired product/artifact.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Identity" + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.api_flow_options = AAZObjectArg( + options=["--api-flow-options"], + arg_group="Properties", + help="The API Flow configuration options for Azure Data Transfer API Flow type.", + nullable=True, + ) + _args_schema.consumer_group = AAZStrArg( + options=["--consumer-group"], + arg_group="Properties", + help="Event Hub Consumer Group", + nullable=True, + ) + _args_schema.customer_key_vault_uri = AAZStrArg( + options=["--customer-key-vault-uri"], + arg_group="Properties", + help="The URI to the customer managed key for this flow", + nullable=True, + ) + _args_schema.data_type = AAZStrArg( + options=["--data-type"], + arg_group="Properties", + help="Type of data to transfer via the flow.", + nullable=True, + enum={"Blob": "Blob", "Table": "Table"}, + ) + _args_schema.endpoint_ports = AAZListArg( + options=["--endpoint-ports"], + arg_group="Properties", + help="The destination endpoint ports of the stream", + nullable=True, + ) + _args_schema.destination_endpoints = AAZListArg( + options=["--destination-endpoints"], + arg_group="Properties", + help="The destination endpoints of the stream", + nullable=True, + ) + _args_schema.event_hub_id = AAZResourceIdArg( + options=["--event-hub-id"], + arg_group="Properties", + help="Event Hub ID", + nullable=True, + ) + _args_schema.flow_type = AAZStrArg( + options=["--flow-type"], + arg_group="Properties", + help="The flow type for this flow", + nullable=True, + enum={"API": "API", "BasicFiles": "BasicFiles", "Complex": "Complex", "Data": "Data", "DevSecOps": "DevSecOps", "DiskImages": "DiskImages", "Messaging": "Messaging", "MicrosoftInternal": "MicrosoftInternal", "Mission": "Mission", "MissionOpaqueXML": "MissionOpaqueXML", "Opaque": "Opaque", "Standard": "Standard", "StreamingVideo": "StreamingVideo", "Unknown": "Unknown"}, + ) + _args_schema.messaging_options = AAZObjectArg( + options=["--messaging-options"], + arg_group="Properties", + help="The messaging options for this flow", + nullable=True, + ) + _args_schema.passphrase = AAZStrArg( + options=["--passphrase"], + arg_group="Properties", + help="The passphrase used for SRT streams", + nullable=True, + ) + _args_schema.schema = AAZObjectArg( + options=["--schema"], + arg_group="Properties", + help="The selected schema for this flow", + nullable=True, + ) + _args_schema.service_bus_queue_id = AAZResourceIdArg( + options=["--service-bus-queue-id"], + arg_group="Properties", + help="Service Bus Queue ID", + nullable=True, + ) + _args_schema.source_addresses = AAZObjectArg( + options=["--source-addresses"], + arg_group="Properties", + help="The source IP address and CIDR ranges of the stream", + nullable=True, + ) + _args_schema.status = AAZStrArg( + options=["--status"], + arg_group="Properties", + help="Status of the current flow", + nullable=True, + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + _args_schema.storage_account_id = AAZResourceIdArg( + options=["--storage-account-id"], + arg_group="Properties", + help="Storage Account ID", + nullable=True, + ) + _args_schema.storage_account_name = AAZStrArg( + options=["--storage-account-name"], + arg_group="Properties", + help="Storage Account", + nullable=True, + ) + _args_schema.storage_container_name = AAZStrArg( + options=["--storage-container-name"], + arg_group="Properties", + help="Storage Container Name", + nullable=True, + ) + _args_schema.storage_table_name = AAZStrArg( + options=["--storage-table-name"], + arg_group="Properties", + help="Storage Table Name", + nullable=True, + ) + _args_schema.stream_id = AAZStrArg( + options=["--stream-id"], + arg_group="Properties", + help="The flow stream identifier", + nullable=True, + ) + _args_schema.stream_latency = AAZIntArg( + options=["--stream-latency"], + arg_group="Properties", + help="The latency of the stream in milliseconds", + nullable=True, + ) + _args_schema.stream_protocol = AAZStrArg( + options=["--stream-protocol"], + arg_group="Properties", + help="The protocol of the stream", + nullable=True, + enum={"RTP": "RTP", "SRT": "SRT", "UDP": "UDP"}, + ) + + api_flow_options = cls._args_schema.api_flow_options + api_flow_options.api_mode = AAZStrArg( + options=["api-mode"], + help="Remote Calling Mode in the Azure Data Transfer API Flow, which describes how the API Flow will be invoked", + nullable=True, + enum={"Endpoint": "Endpoint", "SDK": "SDK"}, + ) + api_flow_options.audience_override = AAZStrArg( + options=["audience-override"], + help="Optional field to override the audience of the remote endpoint", + nullable=True, + ) + api_flow_options.cname = AAZStrArg( + options=["cname"], + help="Unique CNAME to represent the Azure Data Transfer API Flow instance", + nullable=True, + ) + api_flow_options.identity_translation = AAZStrArg( + options=["identity-translation"], + help="Flag for if Azure Data Transfer API Flow should extract the user token", + nullable=True, + enum={"ServiceIdentity": "ServiceIdentity", "UserIdentity": "UserIdentity"}, + ) + api_flow_options.remote_calling_mode_client_id = AAZStrArg( + options=["remote-calling-mode-client-id"], + help="Remote stub app registration Client ID", + nullable=True, + ) + api_flow_options.remote_endpoint = AAZStrArg( + options=["remote-endpoint"], + help="Remote host to which communication needs to be made", + nullable=True, + ) + api_flow_options.sender_client_id = AAZStrArg( + options=["sender-client-id"], + help="Sender's app user assigned Manage Identity client ID", + nullable=True, + ) + + endpoint_ports = cls._args_schema.endpoint_ports + endpoint_ports.Element = AAZIntArg( + nullable=True, + ) + + destination_endpoints = cls._args_schema.destination_endpoints + destination_endpoints.Element = AAZStrArg( + nullable=True, + ) + + messaging_options = cls._args_schema.messaging_options + messaging_options.billing_tier = AAZStrArg( + options=["billing-tier"], + help="Billing tier for this messaging flow", + nullable=True, + enum={"BlobTransport": "BlobTransport", "Premium": "Premium", "Standard": "Standard"}, + ) + + schema = cls._args_schema.schema + schema.connection_id = AAZStrArg( + options=["connection-id"], + help="Connection ID associated with this schema", + nullable=True, + ) + schema.content = AAZStrArg( + options=["content"], + help="Content of the schema", + nullable=True, + ) + schema.direction = AAZStrArg( + options=["direction"], + help="The direction of the schema.", + nullable=True, + enum={"Receive": "Receive", "Send": "Send"}, + ) + schema.id = AAZStrArg( + options=["id"], + help="ID associated with this schema", + nullable=True, + ) + schema.name = AAZStrArg( + options=["name"], + help="Name of the schema", + nullable=True, + ) + schema.schema_type = AAZStrArg( + options=["schema-type"], + help="The Schema Type", + nullable=True, + enum={"Xsd": "Xsd", "Zip": "Zip"}, + ) + schema.schema_uri = AAZStrArg( + options=["schema-uri"], + help="Uri containing SAS token for the zipped schema", + nullable=True, + ) + schema.status = AAZStrArg( + options=["status"], + help="Status of the schema", + nullable=True, + enum={"Approved": "Approved", "New": "New"}, + ) + + source_addresses = cls._args_schema.source_addresses + source_addresses.source_addresses = AAZListArg( + options=["source-addresses"], + help="A source IP address or CIDR range", + nullable=True, + ) + + source_addresses = cls._args_schema.source_addresses.source_addresses + source_addresses.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FlowsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.FlowsCreateOrUpdate(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 FlowsGet(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.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_name, + required=True, + ), + **self.serialize_url_param( + "flowName", self.ctx.args.flow_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", "2025-05-21", + 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_flow_read(cls._schema_on_200) + + return cls._schema_on_200 + + class FlowsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_name, + required=True, + ), + **self.serialize_url_param( + "flowName", self.ctx.args.flow_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", "2025-05-21", + 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_flow_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", AAZIdentityObjectType) + _builder.set_prop("plan", AAZObjectType, ".plan") + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + plan = _builder.get(".plan") + if plan is not None: + plan.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("product", AAZStrType, ".product", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("promotionCode", AAZStrType, ".promotion_code") + plan.set_prop("publisher", AAZStrType, ".publisher", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("version", AAZStrType, ".version") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("apiFlowOptions", AAZObjectType, ".api_flow_options") + properties.set_prop("consumerGroup", AAZStrType, ".consumer_group") + properties.set_prop("customerManagedKeyVaultUri", AAZStrType, ".customer_key_vault_uri") + properties.set_prop("dataType", AAZStrType, ".data_type") + properties.set_prop("destinationEndpointPorts", AAZListType, ".endpoint_ports") + properties.set_prop("destinationEndpoints", AAZListType, ".destination_endpoints") + properties.set_prop("eventHubId", AAZStrType, ".event_hub_id") + properties.set_prop("flowType", AAZStrType, ".flow_type") + properties.set_prop("messagingOptions", AAZObjectType, ".messaging_options") + properties.set_prop("passphrase", AAZStrType, ".passphrase") + properties.set_prop("schema", AAZObjectType, ".schema") + properties.set_prop("serviceBusQueueId", AAZStrType, ".service_bus_queue_id") + properties.set_prop("sourceAddresses", AAZObjectType, ".source_addresses") + properties.set_prop("status", AAZStrType, ".status") + properties.set_prop("storageAccountId", AAZStrType, ".storage_account_id") + properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") + properties.set_prop("storageContainerName", AAZStrType, ".storage_container_name") + properties.set_prop("storageTableName", AAZStrType, ".storage_table_name") + properties.set_prop("streamId", AAZStrType, ".stream_id") + properties.set_prop("streamLatency", AAZIntType, ".stream_latency") + properties.set_prop("streamProtocol", AAZStrType, ".stream_protocol") + + api_flow_options = _builder.get(".properties.apiFlowOptions") + if api_flow_options is not None: + api_flow_options.set_prop("apiMode", AAZStrType, ".api_mode") + api_flow_options.set_prop("audienceOverride", AAZStrType, ".audience_override") + api_flow_options.set_prop("cname", AAZStrType, ".cname") + api_flow_options.set_prop("identityTranslation", AAZStrType, ".identity_translation") + api_flow_options.set_prop("remoteCallingModeClientId", AAZStrType, ".remote_calling_mode_client_id") + api_flow_options.set_prop("remoteEndpoint", AAZStrType, ".remote_endpoint") + api_flow_options.set_prop("senderClientId", AAZStrType, ".sender_client_id") + + destination_endpoint_ports = _builder.get(".properties.destinationEndpointPorts") + if destination_endpoint_ports is not None: + destination_endpoint_ports.set_elements(AAZIntType, ".") + + destination_endpoints = _builder.get(".properties.destinationEndpoints") + if destination_endpoints is not None: + destination_endpoints.set_elements(AAZStrType, ".") + + messaging_options = _builder.get(".properties.messagingOptions") + if messaging_options is not None: + messaging_options.set_prop("billingTier", AAZStrType, ".billing_tier") + + schema = _builder.get(".properties.schema") + if schema is not None: + schema.set_prop("connectionId", AAZStrType, ".connection_id") + schema.set_prop("content", AAZStrType, ".content") + schema.set_prop("direction", AAZStrType, ".direction") + schema.set_prop("id", AAZStrType, ".id") + schema.set_prop("name", AAZStrType, ".name") + schema.set_prop("schemaType", AAZStrType, ".schema_type") + schema.set_prop("schemaUri", AAZStrType, ".schema_uri") + schema.set_prop("status", AAZStrType, ".status") + + source_addresses = _builder.get(".properties.sourceAddresses") + if source_addresses is not None: + source_addresses.set_prop("sourceAddresses", AAZListType, ".source_addresses") + + source_addresses = _builder.get(".properties.sourceAddresses.sourceAddresses") + if source_addresses is not None: + source_addresses.set_elements(AAZStrType, ".") + + 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_read = None + + @classmethod + def _build_schema_flow_read(cls, _schema): + if cls._schema_flow_read is not None: + _schema.id = cls._schema_flow_read.id + _schema.identity = cls._schema_flow_read.identity + _schema.location = cls._schema_flow_read.location + _schema.name = cls._schema_flow_read.name + _schema.plan = cls._schema_flow_read.plan + _schema.properties = cls._schema_flow_read.properties + _schema.system_data = cls._schema_flow_read.system_data + _schema.tags = cls._schema_flow_read.tags + _schema.type = cls._schema_flow_read.type + return + + cls._schema_flow_read = _schema_flow_read = AAZObjectType() + + flow_read = _schema_flow_read + flow_read.id = AAZStrType( + flags={"read_only": True}, + ) + flow_read.identity = AAZIdentityObjectType() + flow_read.location = AAZStrType( + flags={"required": True}, + ) + flow_read.name = AAZStrType( + flags={"read_only": True}, + ) + flow_read.plan = AAZObjectType() + flow_read.properties = AAZObjectType() + flow_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + flow_read.tags = AAZDictType() + flow_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_flow_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_flow_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = _schema_flow_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}, + ) + + plan = _schema_flow_read.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = _schema_flow_read.properties + properties.api_flow_options = AAZObjectType( + serialized_name="apiFlowOptions", + ) + properties.connection = AAZObjectType() + properties.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + properties.customer_managed_key_vault_uri = AAZStrType( + serialized_name="customerManagedKeyVaultUri", + ) + properties.data_type = AAZStrType( + serialized_name="dataType", + ) + properties.destination_endpoint_ports = AAZListType( + serialized_name="destinationEndpointPorts", + ) + properties.destination_endpoints = AAZListType( + serialized_name="destinationEndpoints", + ) + properties.event_hub_id = AAZStrType( + serialized_name="eventHubId", + ) + properties.flow_id = AAZStrType( + serialized_name="flowId", + flags={"read_only": True}, + ) + properties.flow_type = AAZStrType( + serialized_name="flowType", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.key_vault_uri = AAZStrType( + serialized_name="keyVaultUri", + ) + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_flow_id = AAZStrType( + serialized_name="linkedFlowId", + flags={"read_only": True}, + ) + properties.messaging_options = AAZObjectType( + serialized_name="messagingOptions", + ) + properties.passphrase = AAZStrType() + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.schema = AAZObjectType() + properties.service_bus_queue_id = AAZStrType( + serialized_name="serviceBusQueueId", + ) + properties.source_addresses = AAZObjectType( + serialized_name="sourceAddresses", + ) + properties.status = AAZStrType() + properties.storage_account_id = AAZStrType( + serialized_name="storageAccountId", + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + properties.storage_container_name = AAZStrType( + serialized_name="storageContainerName", + ) + properties.storage_table_name = AAZStrType( + serialized_name="storageTableName", + ) + properties.stream_id = AAZStrType( + serialized_name="streamId", + ) + properties.stream_latency = AAZIntType( + serialized_name="streamLatency", + ) + properties.stream_protocol = AAZStrType( + serialized_name="streamProtocol", + ) + + api_flow_options = _schema_flow_read.properties.api_flow_options + api_flow_options.api_mode = AAZStrType( + serialized_name="apiMode", + ) + api_flow_options.audience_override = AAZStrType( + serialized_name="audienceOverride", + ) + api_flow_options.cname = AAZStrType() + api_flow_options.identity_translation = AAZStrType( + serialized_name="identityTranslation", + ) + api_flow_options.remote_calling_mode_client_id = AAZStrType( + serialized_name="remoteCallingModeClientId", + ) + api_flow_options.remote_endpoint = AAZStrType( + serialized_name="remoteEndpoint", + ) + api_flow_options.sender_client_id = AAZStrType( + serialized_name="senderClientId", + ) + + connection = _schema_flow_read.properties.connection + connection.id = AAZStrType( + flags={"required": True}, + ) + connection.location = AAZStrType() + connection.name = AAZStrType() + connection.subscription_name = AAZStrType( + serialized_name="subscriptionName", + ) + + destination_endpoint_ports = _schema_flow_read.properties.destination_endpoint_ports + destination_endpoint_ports.Element = AAZIntType() + + destination_endpoints = _schema_flow_read.properties.destination_endpoints + destination_endpoints.Element = AAZStrType() + + force_disabled_status = _schema_flow_read.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + messaging_options = _schema_flow_read.properties.messaging_options + messaging_options.billing_tier = AAZStrType( + serialized_name="billingTier", + ) + + policies = _schema_flow_read.properties.policies + policies.Element = AAZStrType() + + schema = _schema_flow_read.properties.schema + schema.connection_id = AAZStrType( + serialized_name="connectionId", + ) + schema.content = AAZStrType() + schema.direction = AAZStrType() + schema.id = AAZStrType() + schema.name = AAZStrType() + schema.schema_type = AAZStrType( + serialized_name="schemaType", + ) + schema.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + schema.status = AAZStrType() + + source_addresses = _schema_flow_read.properties.source_addresses + source_addresses.source_addresses = AAZListType( + serialized_name="sourceAddresses", + ) + + source_addresses = _schema_flow_read.properties.source_addresses.source_addresses + source_addresses.Element = AAZStrType() + + system_data = _schema_flow_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = _schema_flow_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_flow_read.id + _schema.identity = cls._schema_flow_read.identity + _schema.location = cls._schema_flow_read.location + _schema.name = cls._schema_flow_read.name + _schema.plan = cls._schema_flow_read.plan + _schema.properties = cls._schema_flow_read.properties + _schema.system_data = cls._schema_flow_read.system_data + _schema.tags = cls._schema_flow_read.tags + _schema.type = cls._schema_flow_read.type + + +__all__ = ["Update"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_wait.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_wait.py new file mode 100644 index 00000000000..cb37db38d36 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/connection/flow/_wait.py @@ -0,0 +1,425 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer connection flow wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/connections/{}/flows/{}", "2025-05-21"], + ] + } + + 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.connection_name = AAZStrArg( + options=["--connection-name"], + help="The name for the connection to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.flow_name = AAZStrArg( + options=["-n", "--name", "--flow-name"], + help="The name for the flow to perform the operation on.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FlowsGet(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=False) + return result + + class FlowsGet(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.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "connectionName", self.ctx.args.connection_name, + required=True, + ), + **self.serialize_url_param( + "flowName", self.ctx.args.flow_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", "2025-05-21", + 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 = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.api_flow_options = AAZObjectType( + serialized_name="apiFlowOptions", + ) + properties.connection = AAZObjectType() + properties.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + properties.customer_managed_key_vault_uri = AAZStrType( + serialized_name="customerManagedKeyVaultUri", + ) + properties.data_type = AAZStrType( + serialized_name="dataType", + ) + properties.destination_endpoint_ports = AAZListType( + serialized_name="destinationEndpointPorts", + ) + properties.destination_endpoints = AAZListType( + serialized_name="destinationEndpoints", + ) + properties.event_hub_id = AAZStrType( + serialized_name="eventHubId", + ) + properties.flow_id = AAZStrType( + serialized_name="flowId", + flags={"read_only": True}, + ) + properties.flow_type = AAZStrType( + serialized_name="flowType", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.key_vault_uri = AAZStrType( + serialized_name="keyVaultUri", + ) + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_flow_id = AAZStrType( + serialized_name="linkedFlowId", + flags={"read_only": True}, + ) + properties.messaging_options = AAZObjectType( + serialized_name="messagingOptions", + ) + properties.passphrase = AAZStrType() + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.schema = AAZObjectType() + properties.service_bus_queue_id = AAZStrType( + serialized_name="serviceBusQueueId", + ) + properties.source_addresses = AAZObjectType( + serialized_name="sourceAddresses", + ) + properties.status = AAZStrType() + properties.storage_account_id = AAZStrType( + serialized_name="storageAccountId", + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + properties.storage_container_name = AAZStrType( + serialized_name="storageContainerName", + ) + properties.storage_table_name = AAZStrType( + serialized_name="storageTableName", + ) + properties.stream_id = AAZStrType( + serialized_name="streamId", + ) + properties.stream_latency = AAZIntType( + serialized_name="streamLatency", + ) + properties.stream_protocol = AAZStrType( + serialized_name="streamProtocol", + ) + + api_flow_options = cls._schema_on_200.properties.api_flow_options + api_flow_options.api_mode = AAZStrType( + serialized_name="apiMode", + ) + api_flow_options.audience_override = AAZStrType( + serialized_name="audienceOverride", + ) + api_flow_options.cname = AAZStrType() + api_flow_options.identity_translation = AAZStrType( + serialized_name="identityTranslation", + ) + api_flow_options.remote_calling_mode_client_id = AAZStrType( + serialized_name="remoteCallingModeClientId", + ) + api_flow_options.remote_endpoint = AAZStrType( + serialized_name="remoteEndpoint", + ) + api_flow_options.sender_client_id = AAZStrType( + serialized_name="senderClientId", + ) + + connection = cls._schema_on_200.properties.connection + connection.id = AAZStrType( + flags={"required": True}, + ) + connection.location = AAZStrType() + connection.name = AAZStrType() + connection.subscription_name = AAZStrType( + serialized_name="subscriptionName", + ) + + destination_endpoint_ports = cls._schema_on_200.properties.destination_endpoint_ports + destination_endpoint_ports.Element = AAZIntType() + + destination_endpoints = cls._schema_on_200.properties.destination_endpoints + destination_endpoints.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + messaging_options = cls._schema_on_200.properties.messaging_options + messaging_options.billing_tier = AAZStrType( + serialized_name="billingTier", + ) + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema = cls._schema_on_200.properties.schema + schema.connection_id = AAZStrType( + serialized_name="connectionId", + ) + schema.content = AAZStrType() + schema.direction = AAZStrType() + schema.id = AAZStrType() + schema.name = AAZStrType() + schema.schema_type = AAZStrType( + serialized_name="schemaType", + ) + schema.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + schema.status = AAZStrType() + + source_addresses = cls._schema_on_200.properties.source_addresses + source_addresses.source_addresses = AAZListType( + serialized_name="sourceAddresses", + ) + + source_addresses = cls._schema_on_200.properties.source_addresses.source_addresses + source_addresses.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/__cmd_group.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/__cmd_group.py new file mode 100644 index 00000000000..d782861d671 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/__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( + "azure-data-transfer pipeline", +) +class __CMDGroup(AAZCommandGroup): + """Azure data transfer pipeline commands + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/__init__.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/__init__.py new file mode 100644 index 00000000000..66df68f46ce --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/__init__.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._approve_connection import * +from ._create import * +from ._delete import * +from ._list import * +from ._reject_connection import * +from ._show import * +from ._update import * diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_approve_connection.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_approve_connection.py new file mode 100644 index 00000000000..435485ae341 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_approve_connection.py @@ -0,0 +1,381 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer pipeline approve-connection", +) +class ApproveConnection(AAZCommand): + """Approves the specified connection request in a pipeline. + + :example: Approves the specified connection in a pipeline + az azure-data-transfer pipeline approve-connection --resource-group testRG --pipeline-name testPipeline --connection-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.AzureDataTransfer/connections/testConnection --status-reason Example reason + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/pipelines/{}/approveconnection", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.pipeline_name = AAZStrArg( + options=["-n", "--name", "--pipeline-name"], + help="The name for the pipeline to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Connection" + + _args_schema = cls._args_schema + _args_schema.connection_id = AAZStrArg( + options=["--id", "--connection-id"], + arg_group="Connection", + help="ID of the connection to be approved.", + required=True, + ) + _args_schema.status_reason = AAZStrArg( + options=["--status-reason"], + arg_group="Connection", + help="Reason for resource operation.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PipelinesApproveConnection(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 PipelinesApproveConnection(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "pipelineName", self.ctx.args.pipeline_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", "2025-05-21", + 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("id", AAZStrType, ".connection_id", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("statusReason", AAZStrType, ".status_reason") + + 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.identity = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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.approver = AAZStrType( + flags={"read_only": True}, + ) + properties.date_submitted = AAZStrType( + serialized_name="dateSubmitted", + flags={"read_only": True}, + ) + properties.direction = AAZStrType() + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.justification = AAZStrType() + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_connection_id = AAZStrType( + serialized_name="linkedConnectionId", + flags={"read_only": True}, + ) + properties.pin = AAZStrType() + properties.pipeline = AAZStrType( + flags={"required": True}, + ) + properties.policies = AAZListType() + properties.primary_contact = AAZStrType( + serialized_name="primaryContact", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_subscription_id = AAZStrType( + serialized_name="remoteSubscriptionId", + ) + properties.requirement_id = AAZStrType( + serialized_name="requirementId", + ) + properties.schema_uris = AAZListType( + serialized_name="schemaUris", + ) + properties.schemas = AAZListType() + properties.secondary_contacts = AAZListType( + serialized_name="secondaryContacts", + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.status_reason = AAZStrType( + serialized_name="statusReason", + flags={"read_only": True}, + ) + + flow_types = cls._schema_on_200.properties.flow_types + flow_types.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema_uris = cls._schema_on_200.properties.schema_uris + schema_uris.Element = AAZStrType() + + schemas = cls._schema_on_200.properties.schemas + schemas.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.schemas.Element + _element.connection_id = AAZStrType( + serialized_name="connectionId", + ) + _element.content = AAZStrType() + _element.direction = AAZStrType() + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.schema_type = AAZStrType( + serialized_name="schemaType", + ) + _element.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + _element.status = AAZStrType() + + secondary_contacts = cls._schema_on_200.properties.secondary_contacts + secondary_contacts.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ApproveConnectionHelper: + """Helper class for ApproveConnection""" + + +__all__ = ["ApproveConnection"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_create.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_create.py new file mode 100644 index 00000000000..515b4463e70 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_create.py @@ -0,0 +1,505 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Create(AAZCommand): + """Create the pipeline resource. + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/pipelines/{}", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.pipeline_name = AAZStrArg( + options=["-n", "--name", "--pipeline-name"], + help="The name for the pipeline to perform the operation on.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Identity" + + _args_schema = cls._args_schema + _args_schema.mi_system_assigned = AAZStrArg( + options=["--system-assigned", "--mi-system-assigned"], + arg_group="Identity", + help="Set the system managed identity.", + blank="True", + ) + _args_schema.mi_user_assigned = AAZListArg( + options=["--user-assigned", "--mi-user-assigned"], + arg_group="Identity", + help="Set the user managed identities.", + blank=[], + ) + + mi_user_assigned = cls._args_schema.mi_user_assigned + mi_user_assigned.Element = AAZStrArg() + + # define Arg Group "Pipeline" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Pipeline", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Pipeline", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.disabled_flow_types = AAZListArg( + options=["--disabled-flow-types"], + arg_group="Properties", + help="The flow types that are disabled for this pipeline", + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of this pipeline", + ) + _args_schema.flow_types = AAZListArg( + options=["--flow-types"], + arg_group="Properties", + help="The flow types allowed for this pipeline", + ) + _args_schema.policies = AAZListArg( + options=["--policies"], + arg_group="Properties", + help="The policies for this pipeline", + ) + _args_schema.quarantine_download_storage_account = AAZStrArg( + options=["--quarantine-download-storage-account"], + arg_group="Properties", + help="Quarantine Download Storage Account", + ) + _args_schema.quarantine_download_storage_container = AAZStrArg( + options=["--quarantine-download-storage-container"], + arg_group="Properties", + help="Quarantine Download Storage Container", + ) + _args_schema.remote_cloud = AAZStrArg( + options=["--remote-cloud"], + arg_group="Properties", + help="Remote cloud of the data to be transferred or received", + ) + _args_schema.status = AAZStrArg( + options=["--status"], + arg_group="Properties", + help="Status of the current pipeline", + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + _args_schema.subscribers = AAZListArg( + options=["--subscribers"], + arg_group="Properties", + help="Subscribers of this resource", + ) + + disabled_flow_types = cls._args_schema.disabled_flow_types + disabled_flow_types.Element = AAZStrArg( + enum={"API": "API", "BasicFiles": "BasicFiles", "Complex": "Complex", "Data": "Data", "DevSecOps": "DevSecOps", "DiskImages": "DiskImages", "Messaging": "Messaging", "MicrosoftInternal": "MicrosoftInternal", "Mission": "Mission", "MissionOpaqueXML": "MissionOpaqueXML", "Opaque": "Opaque", "Standard": "Standard", "StreamingVideo": "StreamingVideo", "Unknown": "Unknown"}, + ) + + flow_types = cls._args_schema.flow_types + flow_types.Element = AAZStrArg( + enum={"API": "API", "BasicFiles": "BasicFiles", "Complex": "Complex", "Data": "Data", "DevSecOps": "DevSecOps", "DiskImages": "DiskImages", "Messaging": "Messaging", "MicrosoftInternal": "MicrosoftInternal", "Mission": "Mission", "MissionOpaqueXML": "MissionOpaqueXML", "Opaque": "Opaque", "Standard": "Standard", "StreamingVideo": "StreamingVideo", "Unknown": "Unknown"}, + ) + + policies = cls._args_schema.policies + policies.Element = AAZStrArg() + + subscribers = cls._args_schema.subscribers + subscribers.Element = AAZObjectArg() + + _element = cls._args_schema.subscribers.Element + _element.email = AAZStrArg( + options=["email"], + help="Email of the subscriber", + ) + _element.notifications = AAZIntArg( + options=["notifications"], + help="Number specifying what notifications to receive", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PipelinesCreateOrUpdate(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 PipelinesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "pipelineName", self.ctx.args.pipeline_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", "2025-05-21", + 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", AAZIdentityObjectType) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={"flags": {"action": "create"}}) + identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={"flags": {"action": "create"}}) + + user_assigned = _builder.get(".identity.userAssigned") + if user_assigned is not None: + user_assigned.set_elements(AAZStrType, ".") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("disabledFlowTypes", AAZListType, ".disabled_flow_types") + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("flowTypes", AAZListType, ".flow_types") + properties.set_prop("policies", AAZListType, ".policies") + properties.set_prop("quarantineDownloadStorageAccount", AAZStrType, ".quarantine_download_storage_account") + properties.set_prop("quarantineDownloadStorageContainer", AAZStrType, ".quarantine_download_storage_container") + properties.set_prop("remoteCloud", AAZStrType, ".remote_cloud", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("status", AAZStrType, ".status") + properties.set_prop("subscribers", AAZListType, ".subscribers") + + disabled_flow_types = _builder.get(".properties.disabledFlowTypes") + if disabled_flow_types is not None: + disabled_flow_types.set_elements(AAZStrType, ".") + + flow_types = _builder.get(".properties.flowTypes") + if flow_types is not None: + flow_types.set_elements(AAZStrType, ".") + + policies = _builder.get(".properties.policies") + if policies is not None: + policies.set_elements(AAZStrType, ".") + + subscribers = _builder.get(".properties.subscribers") + if subscribers is not None: + subscribers.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.subscribers[]") + if _elements is not None: + _elements.set_prop("email", AAZStrType, ".email") + _elements.set_prop("notifications", AAZIntType, ".notifications") + + 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 = AAZIdentityObjectType() + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _CreateHelper._build_schema_system_data_read(_schema_on_200_201.system_data) + _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( + nullable=True, + ) + + _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.connections = AAZListType( + flags={"read_only": True}, + ) + properties.disabled_flow_types = AAZListType( + serialized_name="disabledFlowTypes", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.quarantine_download_storage_account = AAZStrType( + serialized_name="quarantineDownloadStorageAccount", + ) + properties.quarantine_download_storage_container = AAZStrType( + serialized_name="quarantineDownloadStorageContainer", + ) + properties.remote_cloud = AAZStrType( + serialized_name="remoteCloud", + flags={"required": True}, + ) + properties.status = AAZStrType() + properties.subscribers = AAZListType() + + connections = cls._schema_on_200_201.properties.connections + connections.Element = AAZFreeFormDictType() + + disabled_flow_types = cls._schema_on_200_201.properties.disabled_flow_types + disabled_flow_types.Element = AAZStrType() + + flow_types = cls._schema_on_200_201.properties.flow_types + flow_types.Element = AAZStrType() + + policies = cls._schema_on_200_201.properties.policies + policies.Element = AAZStrType() + + subscribers = cls._schema_on_200_201.properties.subscribers + subscribers.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.subscribers.Element + _element.email = AAZStrType() + _element.notifications = AAZIntType() + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + _schema_system_data_read = None + + @classmethod + def _build_schema_system_data_read(cls, _schema): + if cls._schema_system_data_read is not None: + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + return + + cls._schema_system_data_read = _schema_system_data_read = AAZObjectType( + flags={"read_only": True} + ) + + system_data_read = _schema_system_data_read + system_data_read.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data_read.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data_read.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data_read.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data_read.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data_read.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + + +__all__ = ["Create"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_delete.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_delete.py new file mode 100644 index 00000000000..3ac56cfb44a --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_delete.py @@ -0,0 +1,161 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Delete(AAZCommand): + """Delete the pipeline resource. + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/pipelines/{}", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, 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.pipeline_name = AAZStrArg( + options=["-n", "--name", "--pipeline-name"], + help="The name for the pipeline to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PipelinesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PipelinesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "pipelineName", self.ctx.args.pipeline_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", "2025-05-21", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_list.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_list.py new file mode 100644 index 00000000000..4d4aca62822 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_list.py @@ -0,0 +1,515 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer pipeline list", +) +class List(AAZCommand): + """List Pipeline resource by Subscription or Resource Group + + :example: Gets pipelines in a subscription + az azure-data-transfer pipeline list + + :example: Gets pipelines in a resource group + az azure-data-transfer pipeline list --resource-group testRG + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.azuredatatransfer/pipelines", "2025-05-21"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/pipelines", "2025-05-21"], + ] + } + + 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( + help="Specifies the name of the resource group to list the pipelines", + ) + 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.PipelinesListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.PipelinesListBySubscription(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 PipelinesListByResourceGroup(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.AzureDataTransfer/pipelines", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-05-21", + 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( + flags={"required": True}, + ) + + 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 = AAZIdentityObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _ListHelper._build_schema_system_data_read(_element.system_data) + _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( + nullable=True, + ) + + _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.connections = AAZListType( + flags={"read_only": True}, + ) + properties.disabled_flow_types = AAZListType( + serialized_name="disabledFlowTypes", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.quarantine_download_storage_account = AAZStrType( + serialized_name="quarantineDownloadStorageAccount", + ) + properties.quarantine_download_storage_container = AAZStrType( + serialized_name="quarantineDownloadStorageContainer", + ) + properties.remote_cloud = AAZStrType( + serialized_name="remoteCloud", + flags={"required": True}, + ) + properties.status = AAZStrType() + properties.subscribers = AAZListType() + + connections = cls._schema_on_200.value.Element.properties.connections + connections.Element = AAZFreeFormDictType() + + disabled_flow_types = cls._schema_on_200.value.Element.properties.disabled_flow_types + disabled_flow_types.Element = AAZStrType() + + flow_types = cls._schema_on_200.value.Element.properties.flow_types + flow_types.Element = AAZStrType() + + policies = cls._schema_on_200.value.Element.properties.policies + policies.Element = AAZStrType() + + subscribers = cls._schema_on_200.value.Element.properties.subscribers + subscribers.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.subscribers.Element + _element.email = AAZStrType() + _element.notifications = AAZIntType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class PipelinesListBySubscription(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.AzureDataTransfer/pipelines", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-05-21", + 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( + flags={"required": True}, + ) + + 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 = AAZIdentityObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _ListHelper._build_schema_system_data_read(_element.system_data) + _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( + nullable=True, + ) + + _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.connections = AAZListType( + flags={"read_only": True}, + ) + properties.disabled_flow_types = AAZListType( + serialized_name="disabledFlowTypes", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.quarantine_download_storage_account = AAZStrType( + serialized_name="quarantineDownloadStorageAccount", + ) + properties.quarantine_download_storage_container = AAZStrType( + serialized_name="quarantineDownloadStorageContainer", + ) + properties.remote_cloud = AAZStrType( + serialized_name="remoteCloud", + flags={"required": True}, + ) + properties.status = AAZStrType() + properties.subscribers = AAZListType() + + connections = cls._schema_on_200.value.Element.properties.connections + connections.Element = AAZFreeFormDictType() + + disabled_flow_types = cls._schema_on_200.value.Element.properties.disabled_flow_types + disabled_flow_types.Element = AAZStrType() + + flow_types = cls._schema_on_200.value.Element.properties.flow_types + flow_types.Element = AAZStrType() + + policies = cls._schema_on_200.value.Element.properties.policies + policies.Element = AAZStrType() + + subscribers = cls._schema_on_200.value.Element.properties.subscribers + subscribers.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.subscribers.Element + _element.email = AAZStrType() + _element.notifications = AAZIntType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_system_data_read = None + + @classmethod + def _build_schema_system_data_read(cls, _schema): + if cls._schema_system_data_read is not None: + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + return + + cls._schema_system_data_read = _schema_system_data_read = AAZObjectType( + flags={"read_only": True} + ) + + system_data_read = _schema_system_data_read + system_data_read.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data_read.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data_read.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data_read.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data_read.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data_read.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + + +__all__ = ["List"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_reject_connection.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_reject_connection.py new file mode 100644 index 00000000000..b6b6e49ccbc --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_reject_connection.py @@ -0,0 +1,381 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer pipeline reject-connection", +) +class RejectConnection(AAZCommand): + """Rejects the specified connection request in a pipeline. + + :example: Rejects the specified connection in a pipeline + az azure-data-transfer pipeline reject-connection --resource-group testRG --pipeline-name testPipeline --connection-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.AzureDataTransfer/connections/testConnection --status-reason Example reason + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/pipelines/{}/rejectconnection", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.pipeline_name = AAZStrArg( + options=["-n", "--name", "--pipeline-name"], + help="The name for the pipeline to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Connection" + + _args_schema = cls._args_schema + _args_schema.connection_id = AAZStrArg( + options=["--id", "--connection-id"], + arg_group="Connection", + help="ID of the connection to be rejected.", + required=True, + ) + _args_schema.status_reason = AAZStrArg( + options=["--status-reason"], + arg_group="Connection", + help="Reason for resource operation.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PipelinesRejectConnection(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 PipelinesRejectConnection(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "pipelineName", self.ctx.args.pipeline_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", "2025-05-21", + 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("id", AAZStrType, ".connection_id", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("statusReason", AAZStrType, ".status_reason") + + 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.identity = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": 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( + nullable=True, + ) + + _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.approver = AAZStrType( + flags={"read_only": True}, + ) + properties.date_submitted = AAZStrType( + serialized_name="dateSubmitted", + flags={"read_only": True}, + ) + properties.direction = AAZStrType() + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.force_disabled_status = AAZListType( + serialized_name="forceDisabledStatus", + flags={"read_only": True}, + ) + properties.justification = AAZStrType() + properties.link_status = AAZStrType( + serialized_name="linkStatus", + flags={"read_only": True}, + ) + properties.linked_connection_id = AAZStrType( + serialized_name="linkedConnectionId", + flags={"read_only": True}, + ) + properties.pin = AAZStrType() + properties.pipeline = AAZStrType( + flags={"required": True}, + ) + properties.policies = AAZListType() + properties.primary_contact = AAZStrType( + serialized_name="primaryContact", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_subscription_id = AAZStrType( + serialized_name="remoteSubscriptionId", + ) + properties.requirement_id = AAZStrType( + serialized_name="requirementId", + ) + properties.schema_uris = AAZListType( + serialized_name="schemaUris", + ) + properties.schemas = AAZListType() + properties.secondary_contacts = AAZListType( + serialized_name="secondaryContacts", + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.status_reason = AAZStrType( + serialized_name="statusReason", + flags={"read_only": True}, + ) + + flow_types = cls._schema_on_200.properties.flow_types + flow_types.Element = AAZStrType() + + force_disabled_status = cls._schema_on_200.properties.force_disabled_status + force_disabled_status.Element = AAZStrType() + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + schema_uris = cls._schema_on_200.properties.schema_uris + schema_uris.Element = AAZStrType() + + schemas = cls._schema_on_200.properties.schemas + schemas.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.schemas.Element + _element.connection_id = AAZStrType( + serialized_name="connectionId", + ) + _element.content = AAZStrType() + _element.direction = AAZStrType() + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.schema_type = AAZStrType( + serialized_name="schemaType", + ) + _element.schema_uri = AAZStrType( + serialized_name="schemaUri", + ) + _element.status = AAZStrType() + + secondary_contacts = cls._schema_on_200.properties.secondary_contacts + secondary_contacts.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _RejectConnectionHelper: + """Helper class for RejectConnection""" + + +__all__ = ["RejectConnection"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_show.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_show.py new file mode 100644 index 00000000000..67d0c37d1fa --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_show.py @@ -0,0 +1,317 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "azure-data-transfer pipeline show", +) +class Show(AAZCommand): + """Get pipeline resource. + + :example: Gets pipeline resource + az azure-data-transfer pipeline show --resource-group testRG --pipeline-name testPipeline + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/pipelines/{}", "2025-05-21"], + ] + } + + 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.pipeline_name = AAZStrArg( + options=["-n", "--name", "--pipeline-name"], + help="The name for the pipeline to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PipelinesGet(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 PipelinesGet(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.AzureDataTransfer/pipelines/{pipelineName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "pipelineName", self.ctx.args.pipeline_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", "2025-05-21", + 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 = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _ShowHelper._build_schema_system_data_read(_schema_on_200.system_data) + _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( + nullable=True, + ) + + _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.connections = AAZListType( + flags={"read_only": True}, + ) + properties.disabled_flow_types = AAZListType( + serialized_name="disabledFlowTypes", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.quarantine_download_storage_account = AAZStrType( + serialized_name="quarantineDownloadStorageAccount", + ) + properties.quarantine_download_storage_container = AAZStrType( + serialized_name="quarantineDownloadStorageContainer", + ) + properties.remote_cloud = AAZStrType( + serialized_name="remoteCloud", + flags={"required": True}, + ) + properties.status = AAZStrType() + properties.subscribers = AAZListType() + + connections = cls._schema_on_200.properties.connections + connections.Element = AAZFreeFormDictType() + + disabled_flow_types = cls._schema_on_200.properties.disabled_flow_types + disabled_flow_types.Element = AAZStrType() + + flow_types = cls._schema_on_200.properties.flow_types + flow_types.Element = AAZStrType() + + policies = cls._schema_on_200.properties.policies + policies.Element = AAZStrType() + + subscribers = cls._schema_on_200.properties.subscribers + subscribers.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.subscribers.Element + _element.email = AAZStrType() + _element.notifications = AAZIntType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_system_data_read = None + + @classmethod + def _build_schema_system_data_read(cls, _schema): + if cls._schema_system_data_read is not None: + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + return + + cls._schema_system_data_read = _schema_system_data_read = AAZObjectType( + flags={"read_only": True} + ) + + system_data_read = _schema_system_data_read + system_data_read.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data_read.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data_read.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data_read.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data_read.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data_read.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + + +__all__ = ["Show"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_update.py b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_update.py new file mode 100644 index 00000000000..96b510ddca5 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/aaz/latest/azure_data_transfer/pipeline/_update.py @@ -0,0 +1,636 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Update(AAZCommand): + """Update the pipeline resource. + """ + + _aaz_info = { + "version": "2025-05-21", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azuredatatransfer/pipelines/{}", "2025-05-21"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.pipeline_name = AAZStrArg( + options=["-n", "--name", "--pipeline-name"], + help="The name for the pipeline to perform the operation on.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,64}$", + max_length=64, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Identity" + + # define Arg Group "Pipeline" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Pipeline", + help="Resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.disabled_flow_types = AAZListArg( + options=["--disabled-flow-types"], + arg_group="Properties", + help="The flow types that are disabled for this pipeline", + nullable=True, + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of this pipeline", + nullable=True, + ) + _args_schema.flow_types = AAZListArg( + options=["--flow-types"], + arg_group="Properties", + help="The flow types allowed for this pipeline", + nullable=True, + ) + _args_schema.policies = AAZListArg( + options=["--policies"], + arg_group="Properties", + help="The policies for this pipeline", + nullable=True, + ) + _args_schema.quarantine_download_storage_account = AAZStrArg( + options=["--quarantine-download-storage-account"], + arg_group="Properties", + help="Quarantine Download Storage Account", + nullable=True, + ) + _args_schema.quarantine_download_storage_container = AAZStrArg( + options=["--quarantine-download-storage-container"], + arg_group="Properties", + help="Quarantine Download Storage Container", + nullable=True, + ) + _args_schema.remote_cloud = AAZStrArg( + options=["--remote-cloud"], + arg_group="Properties", + help="Remote cloud of the data to be transferred or received", + ) + _args_schema.status = AAZStrArg( + options=["--status"], + arg_group="Properties", + help="Status of the current pipeline", + nullable=True, + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + _args_schema.subscribers = AAZListArg( + options=["--subscribers"], + arg_group="Properties", + help="Subscribers of this resource", + nullable=True, + ) + + disabled_flow_types = cls._args_schema.disabled_flow_types + disabled_flow_types.Element = AAZStrArg( + nullable=True, + enum={"API": "API", "BasicFiles": "BasicFiles", "Complex": "Complex", "Data": "Data", "DevSecOps": "DevSecOps", "DiskImages": "DiskImages", "Messaging": "Messaging", "MicrosoftInternal": "MicrosoftInternal", "Mission": "Mission", "MissionOpaqueXML": "MissionOpaqueXML", "Opaque": "Opaque", "Standard": "Standard", "StreamingVideo": "StreamingVideo", "Unknown": "Unknown"}, + ) + + flow_types = cls._args_schema.flow_types + flow_types.Element = AAZStrArg( + nullable=True, + enum={"API": "API", "BasicFiles": "BasicFiles", "Complex": "Complex", "Data": "Data", "DevSecOps": "DevSecOps", "DiskImages": "DiskImages", "Messaging": "Messaging", "MicrosoftInternal": "MicrosoftInternal", "Mission": "Mission", "MissionOpaqueXML": "MissionOpaqueXML", "Opaque": "Opaque", "Standard": "Standard", "StreamingVideo": "StreamingVideo", "Unknown": "Unknown"}, + ) + + policies = cls._args_schema.policies + policies.Element = AAZStrArg( + nullable=True, + ) + + subscribers = cls._args_schema.subscribers + subscribers.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.subscribers.Element + _element.email = AAZStrArg( + options=["email"], + help="Email of the subscriber", + nullable=True, + ) + _element.notifications = AAZIntArg( + options=["notifications"], + help="Number specifying what notifications to receive", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PipelinesGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.PipelinesCreateOrUpdate(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 PipelinesGet(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.AzureDataTransfer/pipelines/{pipelineName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "pipelineName", self.ctx.args.pipeline_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", "2025-05-21", + 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_pipeline_read(cls._schema_on_200) + + return cls._schema_on_200 + + class PipelinesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "pipelineName", self.ctx.args.pipeline_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", "2025-05-21", + 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_pipeline_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", AAZIdentityObjectType) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("disabledFlowTypes", AAZListType, ".disabled_flow_types") + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("flowTypes", AAZListType, ".flow_types") + properties.set_prop("policies", AAZListType, ".policies") + properties.set_prop("quarantineDownloadStorageAccount", AAZStrType, ".quarantine_download_storage_account") + properties.set_prop("quarantineDownloadStorageContainer", AAZStrType, ".quarantine_download_storage_container") + properties.set_prop("remoteCloud", AAZStrType, ".remote_cloud", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("status", AAZStrType, ".status") + properties.set_prop("subscribers", AAZListType, ".subscribers") + + disabled_flow_types = _builder.get(".properties.disabledFlowTypes") + if disabled_flow_types is not None: + disabled_flow_types.set_elements(AAZStrType, ".") + + flow_types = _builder.get(".properties.flowTypes") + if flow_types is not None: + flow_types.set_elements(AAZStrType, ".") + + policies = _builder.get(".properties.policies") + if policies is not None: + policies.set_elements(AAZStrType, ".") + + subscribers = _builder.get(".properties.subscribers") + if subscribers is not None: + subscribers.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.subscribers[]") + if _elements is not None: + _elements.set_prop("email", AAZStrType, ".email") + _elements.set_prop("notifications", AAZIntType, ".notifications") + + 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_pipeline_read = None + + @classmethod + def _build_schema_pipeline_read(cls, _schema): + if cls._schema_pipeline_read is not None: + _schema.id = cls._schema_pipeline_read.id + _schema.identity = cls._schema_pipeline_read.identity + _schema.location = cls._schema_pipeline_read.location + _schema.name = cls._schema_pipeline_read.name + _schema.properties = cls._schema_pipeline_read.properties + _schema.system_data = cls._schema_pipeline_read.system_data + _schema.tags = cls._schema_pipeline_read.tags + _schema.type = cls._schema_pipeline_read.type + return + + cls._schema_pipeline_read = _schema_pipeline_read = AAZObjectType() + + pipeline_read = _schema_pipeline_read + pipeline_read.id = AAZStrType( + flags={"read_only": True}, + ) + pipeline_read.identity = AAZIdentityObjectType() + pipeline_read.location = AAZStrType( + flags={"required": True}, + ) + pipeline_read.name = AAZStrType( + flags={"read_only": True}, + ) + pipeline_read.properties = AAZObjectType() + pipeline_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + cls._build_schema_system_data_read(pipeline_read.system_data) + pipeline_read.tags = AAZDictType() + pipeline_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_pipeline_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_pipeline_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = _schema_pipeline_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_pipeline_read.properties + properties.connections = AAZListType( + flags={"read_only": True}, + ) + properties.disabled_flow_types = AAZListType( + serialized_name="disabledFlowTypes", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.flow_types = AAZListType( + serialized_name="flowTypes", + ) + properties.policies = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.quarantine_download_storage_account = AAZStrType( + serialized_name="quarantineDownloadStorageAccount", + ) + properties.quarantine_download_storage_container = AAZStrType( + serialized_name="quarantineDownloadStorageContainer", + ) + properties.remote_cloud = AAZStrType( + serialized_name="remoteCloud", + flags={"required": True}, + ) + properties.status = AAZStrType() + properties.subscribers = AAZListType() + + connections = _schema_pipeline_read.properties.connections + connections.Element = AAZFreeFormDictType() + + disabled_flow_types = _schema_pipeline_read.properties.disabled_flow_types + disabled_flow_types.Element = AAZStrType() + + flow_types = _schema_pipeline_read.properties.flow_types + flow_types.Element = AAZStrType() + + policies = _schema_pipeline_read.properties.policies + policies.Element = AAZStrType() + + subscribers = _schema_pipeline_read.properties.subscribers + subscribers.Element = AAZObjectType() + + _element = _schema_pipeline_read.properties.subscribers.Element + _element.email = AAZStrType() + _element.notifications = AAZIntType() + + tags = _schema_pipeline_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_pipeline_read.id + _schema.identity = cls._schema_pipeline_read.identity + _schema.location = cls._schema_pipeline_read.location + _schema.name = cls._schema_pipeline_read.name + _schema.properties = cls._schema_pipeline_read.properties + _schema.system_data = cls._schema_pipeline_read.system_data + _schema.tags = cls._schema_pipeline_read.tags + _schema.type = cls._schema_pipeline_read.type + + _schema_system_data_read = None + + @classmethod + def _build_schema_system_data_read(cls, _schema): + if cls._schema_system_data_read is not None: + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + return + + cls._schema_system_data_read = _schema_system_data_read = AAZObjectType( + flags={"read_only": True} + ) + + system_data_read = _schema_system_data_read + system_data_read.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data_read.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data_read.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data_read.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data_read.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data_read.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + + +__all__ = ["Update"] diff --git a/src/azure-data-transfer/azext_azure_data_transfer/azext_metadata.json b/src/azure-data-transfer/azext_azure_data_transfer/azext_metadata.json new file mode 100644 index 00000000000..e506328978c --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.70.0" +} \ No newline at end of file diff --git a/src/azure-data-transfer/azext_azure_data_transfer/commands.py b/src/azure-data-transfer/azext_azure_data_transfer/commands.py new file mode 100644 index 00000000000..b0d842e4993 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/commands.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# pylint: disable=too-many-statements + +# from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): # pylint: disable=unused-argument + pass diff --git a/src/azure-data-transfer/azext_azure_data_transfer/custom.py b/src/azure-data-transfer/azext_azure_data_transfer/custom.py new file mode 100644 index 00000000000..86df1e48ef5 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/custom.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# pylint: disable=too-many-statements + +from knack.log import get_logger + + +logger = get_logger(__name__) diff --git a/src/azure-data-transfer/azext_azure_data_transfer/tests/__init__.py b/src/azure-data-transfer/azext_azure_data_transfer/tests/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/tests/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/azure-data-transfer/azext_azure_data_transfer/tests/latest/__init__.py b/src/azure-data-transfer/azext_azure_data_transfer/tests/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/tests/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/azure-data-transfer/azext_azure_data_transfer/tests/latest/recordings/test_connection_flow_operations.yaml b/src/azure-data-transfer/azext_azure_data_transfer/tests/latest/recordings/test_connection_flow_operations.yaml new file mode 100644 index 00000000000..880a62c86e0 --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/tests/latest/recordings/test_connection_flow_operations.yaml @@ -0,0 +1,393 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - azure-data-transfer pipeline list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.70.0 azsdk-python-core/1.31.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://brazilus.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/pipelines?api-version=2025-05-21 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/Pipelines/corptest","name":"corptest","type":"microsoft.azuredatatransfer/pipelines","location":"eastus","systemData":{"createdBy":"6e135f4a-4afc-4899-b453-26151edd13fb","createdByType":"Application","createdAt":"2025-05-23T20:24:10.5018871Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T18:00:35.3214589Z"},"identity":{"type":"None"},"properties":{"remoteCloud":"corptest","connections":[{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"G8jG8pe","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-connection-to-approve-1","name":"faikh-connection-to-approve-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0800a352-0000-0100-0000-683837fc0000\"","systemData":{"lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T10:33:28.7605991Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-connection-to-approve-2","name":"faikh-connection-to-approve-2","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"080039b0-0000-0100-0000-683858d80000\"","systemData":{"lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T12:53:43.1056279Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"3VjKTT6","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-approved-connection-1","name":"faikh-test-approved-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"08001fb1-0000-0100-0000-6838591e0000\"","tags":{"creationTime":"2025-05-29T12:54:49.8002158Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-29T12:54:52.7394096Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T12:54:52.7394096Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-rejected-connection-1","name":"faikh-test-rejected-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"080031b2-0000-0100-0000-6838596b0000\"","tags":{"creationTime":"2025-05-29T12:56:06.6989177Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-29T12:56:09.6703889Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T12:56:09.6703889Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-rbjxy5bqz","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"RmdNzrN","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-m6pgux","name":"test-receive-connection-m6pgux","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"080001bc-0000-0100-0000-68385c7d0000\"","tags":{"creationTime":"2025-05-29T13:08:32.8732445Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-29T13:08:35.9450295Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-05-29T13:09:17.7085821Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"RmdNzrN","dateSubmitted":"2025-05-29T13:09:33.0561218Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-rbjxy5bqz","name":"test-send-connection-rbjxy5bqz","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"080014bc-0000-0100-0000-68385c850000\"","tags":{"creationTime":"2025-05-29T13:09:20.8772996Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-29T13:09:24.1432608Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T13:09:24.1432608Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-linked-send-connection-1","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"nNpiJ3D","primaryContact":"faikh@microsoft.com","provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-linked-connection-1","name":"faikh-test-linked-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0900b92a-0000-0100-0000-68386e4a0000\"","tags":{"creationTime":"2025-05-29T14:24:33.7342721Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-29T14:24:36.7777455Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-05-29T14:25:14.0606098Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"nNpiJ3D","dateSubmitted":"2025-05-29T14:26:39.3707396Z","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-linked-send-connection-1","name":"faikh-test-linked-send-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0900a02b-0000-0100-0000-68386e970000\"","tags":{"creationTime":"2025-05-29T14:26:26.9107953Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-29T14:26:29.6318427Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T14:26:29.6318427Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejected for testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-deny-bnkiOg","name":"test-connection-to-deny-bnkiOg","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d00822e-0000-0100-0000-683950d30000\"","tags":{"creationTime":"2025-05-30T06:31:43.2020794Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:31:45.8626462Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:31:45.8626462Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting as a background + job","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-deny-as-job-gKWLrG","name":"test-connection-to-deny-as-job-gKWLrG","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d00fd2e-0000-0100-0000-683950f80000\"","tags":{"creationTime":"2025-05-30T06:32:20.8369585Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:32:23.5900427Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:32:23.5900427Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-rejected-connection-2","name":"faikh-test-rejected-connection-2","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d00af31-0000-0100-0000-683951870000\"","tags":{"creationTime":"2025-05-30T06:34:43.3478034Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:34:46.168868Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:34:46.168868Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejected for testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-deny-RBlWVk","name":"test-connection-to-deny-RBlWVk","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d00f135-0000-0100-0000-683952620000\"","tags":{"creationTime":"2025-05-30T06:38:22.1552238Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:38:24.867443Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:38:24.867443Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting as a background + job","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-deny-as-job-hGJaBc","name":"test-connection-to-deny-as-job-hGJaBc","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d008b36-0000-0100-0000-683952870000\"","tags":{"creationTime":"2025-05-30T06:38:59.6842857Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:39:02.3413662Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:39:02.3413662Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"3VjKTT6","dateSubmitted":"2025-05-30T08:37:34.2727863Z","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-send-pending-connection-1","name":"faikh-test-send-pending-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d0050d7-0000-0100-0000-68396e470000\"","tags":{"creationTime":"2025-05-30T08:37:22.8688263Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T08:37:25.548653Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T08:37:25.548653Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-approve-1","name":"test-connection-to-approve-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e00de64-0000-0100-0000-683981c50000\"","tags":{"creationTime":"2025-05-30T10:00:33.2730304Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:00:35.9402174Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:00:35.9402174Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"sm^p^F8","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-approved-connection-1","name":"test-approved-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e003767-0000-0100-0000-683981fa0000\"","tags":{"creationTime":"2025-05-30T10:01:26.3195906Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:01:28.7526841Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:01:28.7526841Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-rejected-connection-1","name":"test-rejected-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e008f69-0000-0100-0000-683982480000\"","tags":{"creationTime":"2025-05-30T10:02:45.0079219Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:02:47.4682774Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:02:47.4682774Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-linked-send-connection-1","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"vb5h8$k","primaryContact":"test@microsoft.com","provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-linked-connection-1","name":"test-linked-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e00506c-0000-0100-0000-683982a10000\"","tags":{"creationTime":"2025-05-30T10:03:39.0878436Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:03:41.4922789Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-05-30T10:04:17.0275712Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"vb5h8$k","dateSubmitted":"2025-05-30T10:04:29.5681069Z","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-linked-send-connection-1","name":"test-linked-send-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e00936c-0000-0100-0000-683982a60000\"","tags":{"creationTime":"2025-05-30T10:04:19.1051893Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:04:21.5904457Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:04:21.5904457Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"sm^p^F8","dateSubmitted":"2025-05-30T10:06:03.143408Z","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-pending-connection-1","name":"test-send-pending-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e00b270-0000-0100-0000-683983040000\"","tags":{"creationTime":"2025-05-30T10:05:52.4569455Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:05:55.0777064Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:05:55.0777064Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-banhrq","name":"test-receive-connection-banhrq","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0f001236-0000-0100-0000-68399df00000\"","tags":{"creationTime":"2025-05-30T12:00:45.9266811Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-30T12:00:46.7624966Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T12:00:46.7624966Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-pemjce","name":"test-receive-connection-pemjce","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0f009251-0000-0100-0000-6839a0540000\"","tags":{"creationTime":"2025-05-30T12:10:57.9606036Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-30T12:10:58.8036358Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T12:10:58.8036358Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-4eh44k","name":"test-receive-connection-4eh44k","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"1f003e85-0000-0100-0000-683b3c760000\"","tags":{"creationTime":"2025-05-31T17:29:23.1117261Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-31T17:29:24.1151665Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-31T17:29:24.1151665Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-mnockv","name":"test-receive-connection-mnockv","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"30005844-0000-0100-0000-683c11a90000\"","tags":{"creationTime":"2025-06-01T08:39:02.1089639Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:39:02.8968436Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-01T08:39:02.8968436Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"Sd5$i%L","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-2zvdlt","name":"test-receive-connection-2zvdlt","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"3000f26c-0000-0100-0000-683c14bb0000\"","tags":{"creationTime":"2025-06-01T08:52:08.8202113Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:52:09.5958915Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-01T08:52:09.5958915Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"Sd5$i%L","dateSubmitted":"2025-06-01T08:53:04.8898789Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-7vpopzc7d","name":"test-send-connection-7vpopzc7d","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"3000816f-0000-0100-0000-683c14e90000\"","tags":{"creationTime":"2025-06-01T08:52:55.1555735Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:52:56.0417303Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-01T08:52:56.0417303Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-f5d45ha2s","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"sX^E%cj","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-r6rder","name":"test-receive-connection-r6rder","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"30000282-0000-0100-0000-683c16240000\"","tags":{"creationTime":"2025-06-01T08:57:30.454965Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:57:31.4011789Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-01T08:58:12.6655565Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"sX^E%cj","dateSubmitted":"2025-06-01T08:58:26.5483732Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-f5d45ha2s","name":"test-send-connection-f5d45ha2s","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"30006f82-0000-0100-0000-683c162b0000\"","tags":{"creationTime":"2025-06-01T08:58:16.9537189Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:58:17.9791308Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-01T08:58:17.9791308Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for demo","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-demo-send-1","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"JSf!ZEU","primaryContact":"test@microsoft.com","provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-demo-recv-1","name":"faikh-demo-recv-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"5400b258-0000-0100-0000-683dd5d00000\"","tags":{"creationTime":"2025-06-02T16:47:14.9496268Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-06-02T16:47:17.357993Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-02T16:48:16.4025719Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"JSf!ZEU","dateSubmitted":"2025-06-02T16:48:45.237204Z","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-demo-send-1","name":"faikh-demo-send-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"5400495b-0000-0100-0000-683dd5e50000\"","tags":{"creationTime":"2025-06-02T16:48:33.5547657Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-06-02T16:48:36.2104434Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-02T16:48:36.2104434Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"RP/Coupler + integration test","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kimsteven-test/providers/Microsoft.AzureDataTransfer/connections/steventestconnectionsend","flowTypes":["API"],"requirementId":"integration + test in PPE","remoteSubscriptionId":"c1407bc8-a493-47db-bbb1-722955b2fafb","pin":"DFwimci","provisioningState":"Succeeded","internalMetadata":{"tenantId":"33e01921-4d64-4f8c-a055-5bdaffd5e33d"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kimsteven-test/providers/Microsoft.AzureDataTransfer/connections/steventestconnectionrecv","name":"steventestconnectionrecv","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"5d000f1c-0000-0100-0000-683e19990000\"","tags":{},"systemData":{"createdBy":"KIMSTEVEN@ame.gbl","createdByType":"User","createdAt":"2025-06-02T21:32:39.964551Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-02T21:37:29.7544182Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["API"],"pin":"DFwimci","dateSubmitted":"2025-06-02T21:47:49.6771859Z","provisioningState":"Accepted","internalMetadata":{"tenantId":"33e01921-4d64-4f8c-a055-5bdaffd5e33d"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kimsteven-test/providers/Microsoft.AzureDataTransfer/connections/steventestconnectionsend","name":"steventestconnectionsend","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"5d00d363-0000-0100-0000-683e1bfd0000\"","tags":{},"systemData":{"createdBy":"KIMSTEVEN@ame.gbl","createdByType":"User","createdAt":"2025-06-02T21:47:39.9159908Z","lastModifiedBy":"KIMSTEVEN@ame.gbl","lastModifiedByType":"User","lastModifiedAt":"2025-06-02T21:47:39.9159908Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-zcrj6322c","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"u8LwsM9","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-i5e6ui","name":"test-receive-connection-i5e6ui","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a001c061-0000-0100-0000-683e87e10000\"","tags":{"creationTime":"2025-06-03T05:27:16.6535037Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T05:27:17.5513782Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T05:28:01.5105403Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"u8LwsM9","dateSubmitted":"2025-06-03T05:28:18.3760041Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-zcrj6322c","name":"test-send-connection-zcrj6322c","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a001ed61-0000-0100-0000-683e87eb0000\"","tags":{"creationTime":"2025-06-03T05:28:08.646548Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T05:28:09.4791737Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T05:28:09.4791737Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-wgfwfu7be","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"HENQZjE","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-x4jsaf","name":"test-receive-connection-x4jsaf","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a0014f77-0000-0100-0000-683e8d530000\"","tags":{"creationTime":"2025-06-03T05:50:35.5155106Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T05:50:36.372889Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T05:51:15.0469362Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"HENQZjE","dateSubmitted":"2025-06-03T05:51:27.7820785Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-wgfwfu7be","name":"test-send-connection-wgfwfu7be","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a0016777-0000-0100-0000-683e8d590000\"","tags":{"creationTime":"2025-06-03T05:51:19.2049347Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T05:51:19.9950311Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T05:51:19.9950311Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-vgnp635up","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"Uu6@BgJ","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-dom5gg","name":"test-receive-connection-dom5gg","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a001ef8a-0000-0100-0000-683e91f00000\"","tags":{"creationTime":"2025-06-03T06:10:14.1767962Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T06:10:14.971236Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T06:10:56.2701365Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"Uu6@BgJ","dateSubmitted":"2025-06-03T06:11:09.6331965Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-vgnp635up","name":"test-send-connection-vgnp635up","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a0010b8b-0000-0100-0000-683e91f60000\"","tags":{"creationTime":"2025-06-03T06:11:01.1194683Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T06:11:01.4616336Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T06:11:01.4616336Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-26meibrrv","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"%Dffp^6","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-4pio54","name":"test-receive-connection-4pio54","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"af01d121-0000-0100-0000-683ec13c0000\"","tags":{"creationTime":"2025-06-03T09:32:01.7472773Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T09:32:02.5945155Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T09:32:44.2355983Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"%Dffp^6","dateSubmitted":"2025-06-03T09:33:02.1150127Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-26meibrrv","name":"test-send-connection-26meibrrv","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"af016c23-0000-0100-0000-683ec1420000\"","tags":{"creationTime":"2025-06-03T09:32:47.693003Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T09:32:48.8098441Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T09:32:48.8098441Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-fzgya3425","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"tg%w9Ym","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-teo7rc","name":"test-receive-connection-teo7rc","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"b001d937-0000-0100-0000-683ec50b0000\"","tags":{"creationTime":"2025-06-03T09:48:17.8326397Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T09:48:18.4722483Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T09:48:59.1047555Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"tg%w9Ym","dateSubmitted":"2025-06-03T09:49:12.0109497Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-fzgya3425","name":"test-send-connection-fzgya3425","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"b001d439-0000-0100-0000-683ec5110000\"","tags":{"creationTime":"2025-06-03T09:49:02.987173Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T09:49:03.9415927Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T09:49:03.9415927Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-fueuuqive","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"mVtfXCv","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-lk34yj","name":"test-receive-connection-lk34yj","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c0018a7f-0000-0100-0000-683f00020000\"","tags":{"creationTime":"2025-06-03T13:59:50.35328Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T13:59:51.096478Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T14:00:34.3480635Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"mVtfXCv","dateSubmitted":"2025-06-03T14:00:50.2486368Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-fueuuqive","name":"test-send-connection-fueuuqive","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c0016d82-0000-0100-0000-683f000b0000\"","tags":{"creationTime":"2025-06-03T14:00:41.2846457Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:00:42.252396Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T14:00:42.252396Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-pllvutfqc","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"#DCW7eM","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-vbe5w4","name":"test-receive-connection-vbe5w4","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c0012fbf-0000-0100-0000-683f00e10000\"","tags":{"creationTime":"2025-06-03T14:03:32.9014436Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:03:34.8652856Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T14:04:17.5395412Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"#DCW7eM","dateSubmitted":"2025-06-03T14:04:45.7339872Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-pllvutfqc","name":"test-send-connection-pllvutfqc","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c001f3c4-0000-0100-0000-683f00f60000\"","tags":{"creationTime":"2025-06-03T14:04:26.3781744Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:04:36.9487567Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T14:04:36.9487567Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"N&2e!HQ","dateSubmitted":"2025-06-03T14:08:26.513979Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-gm4ec2jwg","name":"test-send-connection-gm4ec2jwg","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c1017a03-0000-0100-0000-683f01d40000\"","tags":{"creationTime":"2025-06-03T14:08:17.8061268Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:08:18.7614985Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T14:08:18.7614985Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"yyme!G&","dateSubmitted":"2025-06-03T14:19:17.9243338Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-kdt4z7imp","name":"test-send-connection-kdt4z7imp","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c101f9b9-0000-0100-0000-683f045e0000\"","tags":{"creationTime":"2025-06-03T14:19:08.3266828Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:19:09.0508925Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T14:19:09.0508925Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-z7lljg","name":"test-receive-connection-z7lljg","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"cf017df7-0000-0100-0000-683f37d00000\"","tags":{"creationTime":"2025-06-03T17:58:37.8867356Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T17:58:38.8711814Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T17:58:38.8711814Z"},"identity":{"type":"None"}}],"flowTypes":["Complex","Mission","Messaging","API"],"provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '54953' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 03 Jun 2025 18:06:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - be23e226-7b3d-47c1-b0c1-08fe6e0572fb + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 8285B9AEFDDD4094BC2A379652D61B52 Ref B: MAA201060514019 Ref C: 2025-06-03T18:06:24Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - azure-data-transfer pipeline show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.70.0 azsdk-python-core/1.31.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://brazilus.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/pipelines/corptest?api-version=2025-05-21 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/Pipelines/corptest","name":"corptest","type":"microsoft.azuredatatransfer/pipelines","location":"eastus","systemData":{"createdBy":"6e135f4a-4afc-4899-b453-26151edd13fb","createdByType":"Application","createdAt":"2025-05-23T20:24:10.5018871Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T18:00:35.3214589Z"},"identity":{"type":"None"},"properties":{"remoteCloud":"corptest","connections":[{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"G8jG8pe","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-connection-to-approve-1","name":"faikh-connection-to-approve-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0800a352-0000-0100-0000-683837fc0000\"","systemData":{"lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T10:33:28.7605991Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-connection-to-approve-2","name":"faikh-connection-to-approve-2","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"080039b0-0000-0100-0000-683858d80000\"","systemData":{"lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T12:53:43.1056279Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"3VjKTT6","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-approved-connection-1","name":"faikh-test-approved-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"08001fb1-0000-0100-0000-6838591e0000\"","tags":{"creationTime":"2025-05-29T12:54:49.8002158Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-29T12:54:52.7394096Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T12:54:52.7394096Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-rejected-connection-1","name":"faikh-test-rejected-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"080031b2-0000-0100-0000-6838596b0000\"","tags":{"creationTime":"2025-05-29T12:56:06.6989177Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-29T12:56:09.6703889Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T12:56:09.6703889Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-rbjxy5bqz","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"RmdNzrN","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-m6pgux","name":"test-receive-connection-m6pgux","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"080001bc-0000-0100-0000-68385c7d0000\"","tags":{"creationTime":"2025-05-29T13:08:32.8732445Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-29T13:08:35.9450295Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-05-29T13:09:17.7085821Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"RmdNzrN","dateSubmitted":"2025-05-29T13:09:33.0561218Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-rbjxy5bqz","name":"test-send-connection-rbjxy5bqz","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"080014bc-0000-0100-0000-68385c850000\"","tags":{"creationTime":"2025-05-29T13:09:20.8772996Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-29T13:09:24.1432608Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T13:09:24.1432608Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-linked-send-connection-1","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"nNpiJ3D","primaryContact":"faikh@microsoft.com","provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-linked-connection-1","name":"faikh-test-linked-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0900b92a-0000-0100-0000-68386e4a0000\"","tags":{"creationTime":"2025-05-29T14:24:33.7342721Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-29T14:24:36.7777455Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-05-29T14:25:14.0606098Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"nNpiJ3D","dateSubmitted":"2025-05-29T14:26:39.3707396Z","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-linked-send-connection-1","name":"faikh-test-linked-send-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0900a02b-0000-0100-0000-68386e970000\"","tags":{"creationTime":"2025-05-29T14:26:26.9107953Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-29T14:26:29.6318427Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-29T14:26:29.6318427Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejected for testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-deny-bnkiOg","name":"test-connection-to-deny-bnkiOg","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d00822e-0000-0100-0000-683950d30000\"","tags":{"creationTime":"2025-05-30T06:31:43.2020794Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:31:45.8626462Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:31:45.8626462Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting as a background + job","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-deny-as-job-gKWLrG","name":"test-connection-to-deny-as-job-gKWLrG","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d00fd2e-0000-0100-0000-683950f80000\"","tags":{"creationTime":"2025-05-30T06:32:20.8369585Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:32:23.5900427Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:32:23.5900427Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-rejected-connection-2","name":"faikh-test-rejected-connection-2","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d00af31-0000-0100-0000-683951870000\"","tags":{"creationTime":"2025-05-30T06:34:43.3478034Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:34:46.168868Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:34:46.168868Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejected for testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-deny-RBlWVk","name":"test-connection-to-deny-RBlWVk","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d00f135-0000-0100-0000-683952620000\"","tags":{"creationTime":"2025-05-30T06:38:22.1552238Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:38:24.867443Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:38:24.867443Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting as a background + job","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-deny-as-job-hGJaBc","name":"test-connection-to-deny-as-job-hGJaBc","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d008b36-0000-0100-0000-683952870000\"","tags":{"creationTime":"2025-05-30T06:38:59.6842857Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T06:39:02.3413662Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T06:39:02.3413662Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"3VjKTT6","dateSubmitted":"2025-05-30T08:37:34.2727863Z","primaryContact":"faikh@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-test-send-pending-connection-1","name":"faikh-test-send-pending-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0d0050d7-0000-0100-0000-68396e470000\"","tags":{"creationTime":"2025-05-30T08:37:22.8688263Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T08:37:25.548653Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T08:37:25.548653Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-connection-to-approve-1","name":"test-connection-to-approve-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e00de64-0000-0100-0000-683981c50000\"","tags":{"creationTime":"2025-05-30T10:00:33.2730304Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:00:35.9402174Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:00:35.9402174Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"sm^p^F8","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-approved-connection-1","name":"test-approved-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e003767-0000-0100-0000-683981fa0000\"","tags":{"creationTime":"2025-05-30T10:01:26.3195906Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:01:28.7526841Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:01:28.7526841Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Rejected","statusReason":"Rejecting for PS + testing","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-rejected-connection-1","name":"test-rejected-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e008f69-0000-0100-0000-683982480000\"","tags":{"creationTime":"2025-05-30T10:02:45.0079219Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:02:47.4682774Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:02:47.4682774Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for PS + testing","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-linked-send-connection-1","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"vb5h8$k","primaryContact":"test@microsoft.com","provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-linked-connection-1","name":"test-linked-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e00506c-0000-0100-0000-683982a10000\"","tags":{"creationTime":"2025-05-30T10:03:39.0878436Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:03:41.4922789Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-05-30T10:04:17.0275712Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"vb5h8$k","dateSubmitted":"2025-05-30T10:04:29.5681069Z","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-linked-send-connection-1","name":"test-linked-send-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e00936c-0000-0100-0000-683982a60000\"","tags":{"creationTime":"2025-05-30T10:04:19.1051893Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:04:21.5904457Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:04:21.5904457Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"sm^p^F8","dateSubmitted":"2025-05-30T10:06:03.143408Z","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-pending-connection-1","name":"test-send-pending-connection-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0e00b270-0000-0100-0000-683983040000\"","tags":{"creationTime":"2025-05-30T10:05:52.4569455Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-05-30T10:05:55.0777064Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T10:05:55.0777064Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-banhrq","name":"test-receive-connection-banhrq","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0f001236-0000-0100-0000-68399df00000\"","tags":{"creationTime":"2025-05-30T12:00:45.9266811Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-30T12:00:46.7624966Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T12:00:46.7624966Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-pemjce","name":"test-receive-connection-pemjce","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"0f009251-0000-0100-0000-6839a0540000\"","tags":{"creationTime":"2025-05-30T12:10:57.9606036Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-30T12:10:58.8036358Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-30T12:10:58.8036358Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-4eh44k","name":"test-receive-connection-4eh44k","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"1f003e85-0000-0100-0000-683b3c760000\"","tags":{"creationTime":"2025-05-31T17:29:23.1117261Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-05-31T17:29:24.1151665Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-31T17:29:24.1151665Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-mnockv","name":"test-receive-connection-mnockv","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"30005844-0000-0100-0000-683c11a90000\"","tags":{"creationTime":"2025-06-01T08:39:02.1089639Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:39:02.8968436Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-01T08:39:02.8968436Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"Sd5$i%L","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-2zvdlt","name":"test-receive-connection-2zvdlt","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"3000f26c-0000-0100-0000-683c14bb0000\"","tags":{"creationTime":"2025-06-01T08:52:08.8202113Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:52:09.5958915Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-01T08:52:09.5958915Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"Sd5$i%L","dateSubmitted":"2025-06-01T08:53:04.8898789Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-7vpopzc7d","name":"test-send-connection-7vpopzc7d","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"3000816f-0000-0100-0000-683c14e90000\"","tags":{"creationTime":"2025-06-01T08:52:55.1555735Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:52:56.0417303Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-01T08:52:56.0417303Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-f5d45ha2s","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"sX^E%cj","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-r6rder","name":"test-receive-connection-r6rder","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"30000282-0000-0100-0000-683c16240000\"","tags":{"creationTime":"2025-06-01T08:57:30.454965Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:57:31.4011789Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-01T08:58:12.6655565Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"sX^E%cj","dateSubmitted":"2025-06-01T08:58:26.5483732Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-f5d45ha2s","name":"test-send-connection-f5d45ha2s","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"30006f82-0000-0100-0000-683c162b0000\"","tags":{"creationTime":"2025-06-01T08:58:16.9537189Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-01T08:58:17.9791308Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-01T08:58:17.9791308Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"Receive + side for PS testing","status":"Approved","statusReason":"Approving for demo","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-demo-send-1","flowTypes":["Mission"],"requirementId":"0","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"JSf!ZEU","primaryContact":"test@microsoft.com","provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-demo-recv-1","name":"faikh-demo-recv-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"5400b258-0000-0100-0000-683dd5d00000\"","tags":{"creationTime":"2025-06-02T16:47:14.9496268Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-06-02T16:47:17.357993Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-02T16:48:16.4025719Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","justification":"Send + side for PS testing","status":"Approved","flowTypes":["Mission"],"pin":"JSf!ZEU","dateSubmitted":"2025-06-02T16:48:45.237204Z","primaryContact":"test@microsoft.com","provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/faikh-demo-send-1","name":"faikh-demo-send-1","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"5400495b-0000-0100-0000-683dd5e50000\"","tags":{"creationTime":"2025-06-02T16:48:33.5547657Z","vteam":"Experience"},"systemData":{"createdBy":"faikh@microsoft.com","createdByType":"User","createdAt":"2025-06-02T16:48:36.2104434Z","lastModifiedBy":"faikh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-02T16:48:36.2104434Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"RP/Coupler + integration test","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kimsteven-test/providers/Microsoft.AzureDataTransfer/connections/steventestconnectionsend","flowTypes":["API"],"requirementId":"integration + test in PPE","remoteSubscriptionId":"c1407bc8-a493-47db-bbb1-722955b2fafb","pin":"DFwimci","provisioningState":"Succeeded","internalMetadata":{"tenantId":"33e01921-4d64-4f8c-a055-5bdaffd5e33d"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kimsteven-test/providers/Microsoft.AzureDataTransfer/connections/steventestconnectionrecv","name":"steventestconnectionrecv","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"5d000f1c-0000-0100-0000-683e19990000\"","tags":{},"systemData":{"createdBy":"KIMSTEVEN@ame.gbl","createdByType":"User","createdAt":"2025-06-02T21:32:39.964551Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-02T21:37:29.7544182Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["API"],"pin":"DFwimci","dateSubmitted":"2025-06-02T21:47:49.6771859Z","provisioningState":"Accepted","internalMetadata":{"tenantId":"33e01921-4d64-4f8c-a055-5bdaffd5e33d"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kimsteven-test/providers/Microsoft.AzureDataTransfer/connections/steventestconnectionsend","name":"steventestconnectionsend","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"5d00d363-0000-0100-0000-683e1bfd0000\"","tags":{},"systemData":{"createdBy":"KIMSTEVEN@ame.gbl","createdByType":"User","createdAt":"2025-06-02T21:47:39.9159908Z","lastModifiedBy":"KIMSTEVEN@ame.gbl","lastModifiedByType":"User","lastModifiedAt":"2025-06-02T21:47:39.9159908Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-zcrj6322c","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"u8LwsM9","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-i5e6ui","name":"test-receive-connection-i5e6ui","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a001c061-0000-0100-0000-683e87e10000\"","tags":{"creationTime":"2025-06-03T05:27:16.6535037Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T05:27:17.5513782Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T05:28:01.5105403Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"u8LwsM9","dateSubmitted":"2025-06-03T05:28:18.3760041Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-zcrj6322c","name":"test-send-connection-zcrj6322c","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a001ed61-0000-0100-0000-683e87eb0000\"","tags":{"creationTime":"2025-06-03T05:28:08.646548Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T05:28:09.4791737Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T05:28:09.4791737Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-wgfwfu7be","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"HENQZjE","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-x4jsaf","name":"test-receive-connection-x4jsaf","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a0014f77-0000-0100-0000-683e8d530000\"","tags":{"creationTime":"2025-06-03T05:50:35.5155106Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T05:50:36.372889Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T05:51:15.0469362Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"HENQZjE","dateSubmitted":"2025-06-03T05:51:27.7820785Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-wgfwfu7be","name":"test-send-connection-wgfwfu7be","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a0016777-0000-0100-0000-683e8d590000\"","tags":{"creationTime":"2025-06-03T05:51:19.2049347Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T05:51:19.9950311Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T05:51:19.9950311Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-vgnp635up","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"Uu6@BgJ","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-dom5gg","name":"test-receive-connection-dom5gg","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a001ef8a-0000-0100-0000-683e91f00000\"","tags":{"creationTime":"2025-06-03T06:10:14.1767962Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T06:10:14.971236Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T06:10:56.2701365Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"Uu6@BgJ","dateSubmitted":"2025-06-03T06:11:09.6331965Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-vgnp635up","name":"test-send-connection-vgnp635up","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"a0010b8b-0000-0100-0000-683e91f60000\"","tags":{"creationTime":"2025-06-03T06:11:01.1194683Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T06:11:01.4616336Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T06:11:01.4616336Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-26meibrrv","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"%Dffp^6","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-4pio54","name":"test-receive-connection-4pio54","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"af01d121-0000-0100-0000-683ec13c0000\"","tags":{"creationTime":"2025-06-03T09:32:01.7472773Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T09:32:02.5945155Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T09:32:44.2355983Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"%Dffp^6","dateSubmitted":"2025-06-03T09:33:02.1150127Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-26meibrrv","name":"test-send-connection-26meibrrv","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"af016c23-0000-0100-0000-683ec1420000\"","tags":{"creationTime":"2025-06-03T09:32:47.693003Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T09:32:48.8098441Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T09:32:48.8098441Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-fzgya3425","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"tg%w9Ym","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-teo7rc","name":"test-receive-connection-teo7rc","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"b001d937-0000-0100-0000-683ec50b0000\"","tags":{"creationTime":"2025-06-03T09:48:17.8326397Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T09:48:18.4722483Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T09:48:59.1047555Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"tg%w9Ym","dateSubmitted":"2025-06-03T09:49:12.0109497Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-fzgya3425","name":"test-send-connection-fzgya3425","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"b001d439-0000-0100-0000-683ec5110000\"","tags":{"creationTime":"2025-06-03T09:49:02.987173Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T09:49:03.9415927Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T09:49:03.9415927Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-fueuuqive","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"mVtfXCv","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-lk34yj","name":"test-receive-connection-lk34yj","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c0018a7f-0000-0100-0000-683f00020000\"","tags":{"creationTime":"2025-06-03T13:59:50.35328Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T13:59:51.096478Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T14:00:34.3480635Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"mVtfXCv","dateSubmitted":"2025-06-03T14:00:50.2486368Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-fueuuqive","name":"test-send-connection-fueuuqive","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c0016d82-0000-0100-0000-683f000b0000\"","tags":{"creationTime":"2025-06-03T14:00:41.2846457Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:00:42.252396Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T14:00:42.252396Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"Approved","linkStatus":"Linked","linkedConnectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-pllvutfqc","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","pin":"#DCW7eM","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-vbe5w4","name":"test-receive-connection-vbe5w4","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c0012fbf-0000-0100-0000-683f00e10000\"","tags":{"creationTime":"2025-06-03T14:03:32.9014436Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:03:34.8652856Z","lastModifiedBy":"6e135f4a-4afc-4899-b453-26151edd13fb","lastModifiedByType":"Application","lastModifiedAt":"2025-06-03T14:04:17.5395412Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"#DCW7eM","dateSubmitted":"2025-06-03T14:04:45.7339872Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-pllvutfqc","name":"test-send-connection-pllvutfqc","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c001f3c4-0000-0100-0000-683f00f60000\"","tags":{"creationTime":"2025-06-03T14:04:26.3781744Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:04:36.9487567Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T14:04:36.9487567Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"N&2e!HQ","dateSubmitted":"2025-06-03T14:08:26.513979Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-gm4ec2jwg","name":"test-send-connection-gm4ec2jwg","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c1017a03-0000-0100-0000-683f01d40000\"","tags":{"creationTime":"2025-06-03T14:08:17.8061268Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:08:18.7614985Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T14:08:18.7614985Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Send","status":"Approved","flowTypes":["Mission"],"pin":"yyme!G&","dateSubmitted":"2025-06-03T14:19:17.9243338Z","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-send-connection-kdt4z7imp","name":"test-send-connection-kdt4z7imp","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"c101f9b9-0000-0100-0000-683f045e0000\"","tags":{"creationTime":"2025-06-03T14:19:08.3266828Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T14:19:09.0508925Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T14:19:09.0508925Z"},"identity":{"type":"None"}},{"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted","internalMetadata":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-z7lljg","name":"test-receive-connection-z7lljg","type":"microsoft.azuredatatransfer/connections","location":"eastus","etag":"\"cf017df7-0000-0100-0000-683f37d00000\"","tags":{"creationTime":"2025-06-03T17:58:37.8867356Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T17:58:38.8711814Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T17:58:38.8711814Z"},"identity":{"type":"None"}}],"flowTypes":["Complex","Mission","Messaging","API"],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '54941' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 03 Jun 2025 18:06:27 GMT + etag: + - '"04015fe3-0000-0100-0000-683f38430000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: D2DE4AEA041B4EC1A17CE9DC3A89015D Ref B: MAA201060514051 Ref C: 2025-06-03T18:06:26Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"direction": "Receive", "flowTypes": + ["Mission"], "justification": "required", "pipeline": "corptest", "primaryContact": + "lasuredd@microsoft.com", "remoteSubscriptionId": "389ff96a-b137-405b-a3c8-4d22514708b5", + "requirementId": "1234", "secondaryContacts": ["lasuredd@microsoft.com"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - azure-data-transfer connection create + Connection: + - keep-alive + Content-Length: + - '323' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --connection-name --direction --location --flow-types --pipeline + --justification --remote-subscription-id --requirement-id --primary-contact + --secondary-contacts + User-Agent: + - AZURECLI/2.70.0 azsdk-python-core/1.31.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://brazilus.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-000002?api-version=2025-05-21 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-000002","name":"test-receive-connection-000002","type":"microsoft.azuredatatransfer/connections","location":"eastus","tags":{"creationTime":"2025-06-03T18:06:30.3132915Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T18:06:31.0507015Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T18:06:31.0507015Z"},"properties":{"direction":"Receive","flowTypes":["Mission"],"justification":"required","pipeline":"corptest","primaryContact":"lasuredd@microsoft.com","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","requirementId":"1234","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Accepted"}}' + headers: + azure-asyncoperation: + - https://brazilus.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzureDataTransfer/locations/EASTUS/operationStatuses/062f7171-0287-4515-b42c-eb1b8ff4a5ab*F9012A9B24C7C3B625F78E8680F1E16256A77F26CAFC266169FF067BC854E044?api-version=2025-05-21&t=638845707929256923&c=MIIHpTCCBo2gAwIBAgITOgWeMn5lGzFWFOIH_QAEBZ4yfjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDIxMTgxODEzWhcNMjUxMDE4MTgxODEzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3M5cqUFrE-N9ofWv1xYoBwuQmgRY1thdb7P4Ll_QOuQYidglbVh9gucJ1H1Nc1ak7tmTqgMwmM6BPiYj_77yZ2nt3lvFToqmsFom6Xo1gON3S_AYry8sNFvW0-hbW9AQU2BmRv31BctxeciFyuF1B5mO1dLxppVl3KgX-DoImrH4Y7tfffsIFp-iHx5muEJwOoIvTw9AaEcNBiQIeYeDfdwHG8H9sJNsCsrcJACmswu6on_y56MNqcZmMCioP0PReJULZLQjtp_iGxRpiPPXqAfQxgjXuz4xAIlKyjQ1PS59F4uh9baenp4C-w1CEntBeqmtNM5XZ6zdX0Wv6YRckCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRXDhoqe7tNygbVkxFZ9WXteaLgmDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBALtICJMFo2ghB0pAmgFiQTDnAlivqv97DzZp_k6NDAzoQTnGA5AS700Ssg0uFJOyBwsyLMBNlWAf1rMVMDp6mt1k2NvZLnOPYIfLD0Y673-C0Eg5GLYF-wZ_9lPJgiiP4MsjxTl43wFFoR21F3alM86o79663Y2Ar8XN-Ja8yTFiheTfKk3Pnax9v1uEe34n9fzK6Z2VIJlRo1TJQVESgKWainiCq59-dY92H-UAoraL_pCZa8XsLFtkwymvb7VgRoXQISuBllRZBdBGP6iW3VbmlvL0U7CPk8t3OZQZwNMELDDbsBU0zDc6JCfcyJiBTMBXxeqv67ievhrVlCogL6s&s=ciznAEy-Z55gFYxOz7MRyWxq657IoEEdPidXL9hiY5ffpHIfSRKkK48UGxjh1CxpdliMUS1jri1epj486syiWEAtGuHWn_ok4Jg90qcJao720j7GnMEeMJ_AloQMvWSdhGheL_HFWCy2rQiI-HvqwiJakfUGMYLD88oe3OiUb6TTufNMaSLsvyImjS0UgbibYZPHWIRkZ4-zkDoQ_L65JBrY3R-8BV5ATqNzCogZNVZ0R7xMzrr6iQlTJoHRukvJXyR54jlKbv4Oz_VjC3KXgz8W_mRF6xVgAyoH7tgInZ6m5uLkZarIQ2R0MhhS61isb_DbSbkyEYcmC8SWqTI5Jg&h=qjr94mbPJ55WZ7b3ZEOH1hlX2Pu_DiWiLj7Tvl0F9TE + cache-control: + - no-cache + content-length: + - '901' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 03 Jun 2025 18:06:32 GMT + etag: + - '"d001b288-0000-0100-0000-683f39a80000"' + expires: + - '-1' + mise-correlation-id: + - 88397da1-5107-4c09-a9da-15b7c90b9334 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=26d30924-449a-4fa5-b3d6-cb56428e522b/brazilus/52df21b6-ac24-4815-902f-8023f6bbd3ac + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 1447B0FDB6CE452AB7850EE801B05591 Ref B: MAA201060515009 Ref C: 2025-06-03T18:06:29Z' + x-powered-by: + - ASP.NET + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - azure-data-transfer connection create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --connection-name --direction --location --flow-types --pipeline + --justification --remote-subscription-id --requirement-id --primary-contact + --secondary-contacts + User-Agent: + - AZURECLI/2.70.0 azsdk-python-core/1.31.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://brazilus.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzureDataTransfer/locations/EASTUS/operationStatuses/062f7171-0287-4515-b42c-eb1b8ff4a5ab*F9012A9B24C7C3B625F78E8680F1E16256A77F26CAFC266169FF067BC854E044?api-version=2025-05-21&t=638845707929256923&c=MIIHpTCCBo2gAwIBAgITOgWeMn5lGzFWFOIH_QAEBZ4yfjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDIxMTgxODEzWhcNMjUxMDE4MTgxODEzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3M5cqUFrE-N9ofWv1xYoBwuQmgRY1thdb7P4Ll_QOuQYidglbVh9gucJ1H1Nc1ak7tmTqgMwmM6BPiYj_77yZ2nt3lvFToqmsFom6Xo1gON3S_AYry8sNFvW0-hbW9AQU2BmRv31BctxeciFyuF1B5mO1dLxppVl3KgX-DoImrH4Y7tfffsIFp-iHx5muEJwOoIvTw9AaEcNBiQIeYeDfdwHG8H9sJNsCsrcJACmswu6on_y56MNqcZmMCioP0PReJULZLQjtp_iGxRpiPPXqAfQxgjXuz4xAIlKyjQ1PS59F4uh9baenp4C-w1CEntBeqmtNM5XZ6zdX0Wv6YRckCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRXDhoqe7tNygbVkxFZ9WXteaLgmDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBALtICJMFo2ghB0pAmgFiQTDnAlivqv97DzZp_k6NDAzoQTnGA5AS700Ssg0uFJOyBwsyLMBNlWAf1rMVMDp6mt1k2NvZLnOPYIfLD0Y673-C0Eg5GLYF-wZ_9lPJgiiP4MsjxTl43wFFoR21F3alM86o79663Y2Ar8XN-Ja8yTFiheTfKk3Pnax9v1uEe34n9fzK6Z2VIJlRo1TJQVESgKWainiCq59-dY92H-UAoraL_pCZa8XsLFtkwymvb7VgRoXQISuBllRZBdBGP6iW3VbmlvL0U7CPk8t3OZQZwNMELDDbsBU0zDc6JCfcyJiBTMBXxeqv67ievhrVlCogL6s&s=ciznAEy-Z55gFYxOz7MRyWxq657IoEEdPidXL9hiY5ffpHIfSRKkK48UGxjh1CxpdliMUS1jri1epj486syiWEAtGuHWn_ok4Jg90qcJao720j7GnMEeMJ_AloQMvWSdhGheL_HFWCy2rQiI-HvqwiJakfUGMYLD88oe3OiUb6TTufNMaSLsvyImjS0UgbibYZPHWIRkZ4-zkDoQ_L65JBrY3R-8BV5ATqNzCogZNVZ0R7xMzrr6iQlTJoHRukvJXyR54jlKbv4Oz_VjC3KXgz8W_mRF6xVgAyoH7tgInZ6m5uLkZarIQ2R0MhhS61isb_DbSbkyEYcmC8SWqTI5Jg&h=qjr94mbPJ55WZ7b3ZEOH1hlX2Pu_DiWiLj7Tvl0F9TE + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzureDataTransfer/locations/EASTUS/operationStatuses/062f7171-0287-4515-b42c-eb1b8ff4a5ab*F9012A9B24C7C3B625F78E8680F1E16256A77F26CAFC266169FF067BC854E044","name":"062f7171-0287-4515-b42c-eb1b8ff4a5ab*F9012A9B24C7C3B625F78E8680F1E16256A77F26CAFC266169FF067BC854E044","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-000002","status":"Accepted","startTime":"2025-06-03T18:06:32.1636781Z"}' + headers: + cache-control: + - no-cache + content-length: + - '581' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 03 Jun 2025 18:06:33 GMT + etag: + - '"63000904-0000-0100-0000-683f39a80000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=26d30924-449a-4fa5-b3d6-cb56428e522b/brazilus/7e721cb1-5d15-48f0-b596-0fe0fb1e29c3 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 377EF6D928B247FA8120FB69927C198B Ref B: MAA201060515009 Ref C: 2025-06-03T18:06:33Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - azure-data-transfer connection create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --connection-name --direction --location --flow-types --pipeline + --justification --remote-subscription-id --requirement-id --primary-contact + --secondary-contacts + User-Agent: + - AZURECLI/2.70.0 azsdk-python-core/1.31.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://brazilus.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzureDataTransfer/locations/EASTUS/operationStatuses/062f7171-0287-4515-b42c-eb1b8ff4a5ab*F9012A9B24C7C3B625F78E8680F1E16256A77F26CAFC266169FF067BC854E044?api-version=2025-05-21&t=638845707929256923&c=MIIHpTCCBo2gAwIBAgITOgWeMn5lGzFWFOIH_QAEBZ4yfjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDIxMTgxODEzWhcNMjUxMDE4MTgxODEzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3M5cqUFrE-N9ofWv1xYoBwuQmgRY1thdb7P4Ll_QOuQYidglbVh9gucJ1H1Nc1ak7tmTqgMwmM6BPiYj_77yZ2nt3lvFToqmsFom6Xo1gON3S_AYry8sNFvW0-hbW9AQU2BmRv31BctxeciFyuF1B5mO1dLxppVl3KgX-DoImrH4Y7tfffsIFp-iHx5muEJwOoIvTw9AaEcNBiQIeYeDfdwHG8H9sJNsCsrcJACmswu6on_y56MNqcZmMCioP0PReJULZLQjtp_iGxRpiPPXqAfQxgjXuz4xAIlKyjQ1PS59F4uh9baenp4C-w1CEntBeqmtNM5XZ6zdX0Wv6YRckCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRXDhoqe7tNygbVkxFZ9WXteaLgmDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBALtICJMFo2ghB0pAmgFiQTDnAlivqv97DzZp_k6NDAzoQTnGA5AS700Ssg0uFJOyBwsyLMBNlWAf1rMVMDp6mt1k2NvZLnOPYIfLD0Y673-C0Eg5GLYF-wZ_9lPJgiiP4MsjxTl43wFFoR21F3alM86o79663Y2Ar8XN-Ja8yTFiheTfKk3Pnax9v1uEe34n9fzK6Z2VIJlRo1TJQVESgKWainiCq59-dY92H-UAoraL_pCZa8XsLFtkwymvb7VgRoXQISuBllRZBdBGP6iW3VbmlvL0U7CPk8t3OZQZwNMELDDbsBU0zDc6JCfcyJiBTMBXxeqv67ievhrVlCogL6s&s=ciznAEy-Z55gFYxOz7MRyWxq657IoEEdPidXL9hiY5ffpHIfSRKkK48UGxjh1CxpdliMUS1jri1epj486syiWEAtGuHWn_ok4Jg90qcJao720j7GnMEeMJ_AloQMvWSdhGheL_HFWCy2rQiI-HvqwiJakfUGMYLD88oe3OiUb6TTufNMaSLsvyImjS0UgbibYZPHWIRkZ4-zkDoQ_L65JBrY3R-8BV5ATqNzCogZNVZ0R7xMzrr6iQlTJoHRukvJXyR54jlKbv4Oz_VjC3KXgz8W_mRF6xVgAyoH7tgInZ6m5uLkZarIQ2R0MhhS61isb_DbSbkyEYcmC8SWqTI5Jg&h=qjr94mbPJ55WZ7b3ZEOH1hlX2Pu_DiWiLj7Tvl0F9TE + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzureDataTransfer/locations/EASTUS/operationStatuses/062f7171-0287-4515-b42c-eb1b8ff4a5ab*F9012A9B24C7C3B625F78E8680F1E16256A77F26CAFC266169FF067BC854E044","name":"062f7171-0287-4515-b42c-eb1b8ff4a5ab*F9012A9B24C7C3B625F78E8680F1E16256A77F26CAFC266169FF067BC854E044","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-000002","status":"Succeeded","startTime":"2025-06-03T18:06:32.1636781Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '600' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 03 Jun 2025 18:07:04 GMT + etag: + - '"b80203aa-0000-0800-0000-683f39af0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=26d30924-449a-4fa5-b3d6-cb56428e522b/brazilus/bf4c5be5-fa90-4e82-8786-de0c69d73a93 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 6DCA2FF3ADF94BFEB6681584C5EDFB5F Ref B: MAA201060515009 Ref C: 2025-06-03T18:07:04Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - azure-data-transfer connection create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --connection-name --direction --location --flow-types --pipeline + --justification --remote-subscription-id --requirement-id --primary-contact + --secondary-contacts + User-Agent: + - AZURECLI/2.70.0 azsdk-python-core/1.31.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://brazilus.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-000002?api-version=2025-05-21 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rpaas-rg/providers/Microsoft.AzureDataTransfer/connections/test-receive-connection-000002","name":"test-receive-connection-000002","type":"microsoft.azuredatatransfer/connections","location":"eastus","tags":{"creationTime":"2025-06-03T18:06:30.3132915Z","vteam":"Experience"},"systemData":{"createdBy":"lasuredd@microsoft.com","createdByType":"User","createdAt":"2025-06-03T18:06:31.0507015Z","lastModifiedBy":"lasuredd@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-06-03T18:06:31.0507015Z"},"identity":{"type":"None"},"properties":{"pipeline":"corptest","direction":"Receive","justification":"required","status":"InReview","linkStatus":"Unlinked","flowTypes":["Mission"],"requirementId":"1234","remoteSubscriptionId":"389ff96a-b137-405b-a3c8-4d22514708b5","primaryContact":"lasuredd@microsoft.com","secondaryContacts":["lasuredd@microsoft.com"],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '973' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 03 Jun 2025 18:07:05 GMT + etag: + - '"1c00ff8b-0000-0800-0000-683f39af0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16498' + x-msedge-ref: + - 'Ref A: 13536E08BCF640A4AB91757B09399313 Ref B: MAA201060515009 Ref C: 2025-06-03T18:07:05Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-data-transfer/azext_azure_data_transfer/tests/latest/test_azure_data_transfer.py b/src/azure-data-transfer/azext_azure_data_transfer/tests/latest/test_azure_data_transfer.py new file mode 100644 index 00000000000..43ea50e060c --- /dev/null +++ b/src/azure-data-transfer/azext_azure_data_transfer/tests/latest/test_azure_data_transfer.py @@ -0,0 +1,34 @@ +from azure.cli.testsdk import ( + ScenarioTest, record_only) +from azure.cli.testsdk.preparers import get_dummy_cli + +class ConnectionAndFlowOperations(ScenarioTest): + ''' + @ResourceGroupPreparer(name_prefix='testRg', location='westcentralus') + @StorageAccountPreparer(name_prefix='shsengarcoupler', location='westcentralus') + @StorageContainerPreparer(name_prefix='shsengarcouplercontainer') + ''' + def test_connection_flow_operations(self): + self.cli_ctx = get_dummy_cli() + self.kwargs.update({ + 'rg': 'rpaas-rg', + 'subscriptionId': '389ff96a-b137-405b-a3c8-4d22514708b5', + 'sendConnection': self.create_random_name(prefix='test-send-connection-', length=30), + 'receiveConnection': self.create_random_name(prefix='test-receive-connection-', length=30), + 'sendFlow': self.create_random_name(prefix='test-send-flow-', length=30), + 'receiveFlow': self.create_random_name(prefix='test-receive-flow-', length=30), + 'location': 'eastus', + 'pipeline': 'corptest', + 'storageAccountId': '/subscriptions/389ff96a-b137-405b-a3c8-4d22514708b5/resourceGroups/rpaas-rg-faikh/providers/Microsoft.Storage/storageAccounts/armstrongtest', + 'storageAccount': '/subscriptions/389ff96a-b137-405b-a3c8-4d22514708b5/resourceGroups/rpaas-rg-faikh/providers/Microsoft.Storage/storageAccounts/armstrongtest', + 'storageContainer': 'armstrong-test-containers', + }) + + count = len(self.cmd('az azure-data-transfer pipeline list --resource-group {rg}').get_output_in_json()) + self.assertGreaterEqual(count, 1, 'pipeline count expected to be more than or equal to 1') + + self.cmd('az azure-data-transfer pipeline show --resource-group {rg} --name {pipeline}', checks=[ + self.check('name', '{pipeline}'), + ]) + + id = self.cmd('az azure-data-transfer connection create --resource-group {rg} --connection-name {receiveConnection} --direction Receive --location {location} --flow-types ["Mission"] --pipeline {pipeline} --justification required --remote-subscription-id {subscriptionId} --requirement-id 1234 --primary-contact lasuredd@microsoft.com --secondary-contacts lasuredd@microsoft.com').get_output_in_json().get('id') \ No newline at end of file diff --git a/src/azure-data-transfer/setup.cfg b/src/azure-data-transfer/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/azure-data-transfer/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/azure-data-transfer/setup.py b/src/azure-data-transfer/setup.py new file mode 100644 index 00000000000..c59a8e4b6af --- /dev/null +++ b/src/azure-data-transfer/setup.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 + + +# HISTORY.rst entry. +VERSION = '1.0.0b1' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='azure-data-transfer', + version=VERSION, + description='Microsoft Azure Command-Line Tools AzureDataTransfer 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/azure-data-transfer', + classifiers=CLASSIFIERS, + packages=find_packages(exclude=["tests"]), + package_data={'azext_azure_data_transfer': ['azext_metadata.json']}, + install_requires=DEPENDENCIES +)