Skip to content

disassociate_email_address_alias async

disassociate_email_address_alias(
    email_address_id: EmailAddressId,
    instance_id: InstanceId,
    alias_configuration: AliasConfiguration,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> DisassociateEmailAddressAliasResponse

Removes the alias association between two email addresses in an Connect Customer instance. After disassociation, emails sent to the former alias email address are no longer forwarded to the primary email address. Both email addresses continue to exist independently and can receive emails directly.

Use cases

Following are common uses cases for this API:

  • Department separation: Remove alias relationships when splitting a consolidated support queue back into separate department-specific queues.

  • Email address retirement: Cleanly remove forwarding relationships before decommissioning old email addresses.

  • Organizational restructuring: Reconfigure email routing when business processes change and aliases are no longer needed.

Important things to know

  • Concurrent operations: This API uses distributed locking, so concurrent operations on the same email addresses may be temporarily blocked.

  • Emails sent to the former alias address are still delivered directly to that address if it exists.

  • You do not need to delete the email addresses after disassociation. Both addresses remain active independently.

  • After a successful disassociation, you can immediately create a new alias relationship with the same addresses.

  • 200 status means alias was successfully disassociated.

DisassociateEmailAddressAlias does not return the following information:

  • Details in the response about the email that was disassociated. The response returns an empty body.

  • The timestamp of when the disassociation occurred.

Endpoints: See Connect Customer endpoints and quotas.

Related operations

Parameters:

  • email_address_id (EmailAddressId) –

    The identifier of the email address.

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • alias_configuration (AliasConfiguration) –

    Configuration object that specifies which alias relationship to remove. The alias association must currently exist between the primary email address and the specified alias email address.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def disassociate_email_address_alias(
    self,
    email_address_id: "capo_connect.types.email_address_id.EmailAddressId",
    instance_id: "capo_connect.types.instance_id.InstanceId",
    alias_configuration: "capo_connect.types.alias_configuration.AliasConfiguration",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    client_token: Optional["capo_connect.types.client_token.ClientToken"] = None,
) -> "capo_connect.types.disassociate_email_address_alias_response.DisassociateEmailAddressAliasResponse":
    """<p>Removes the alias association between two email addresses in an Connect Customer instance. After disassociation, emails sent to the former alias email address are no longer forwarded to the primary email address. Both email addresses continue to exist independently and can receive emails directly.</p> <p> <b>Use cases</b> </p> <p>Following are common uses cases for this API:</p> <ul> <li> <p> <b>Department separation</b>: Remove alias relationships when splitting a consolidated support queue back into separate department-specific queues.</p> </li> <li> <p> <b>Email address retirement</b>: Cleanly remove forwarding relationships before decommissioning old email addresses.</p> </li> <li> <p> <b>Organizational restructuring</b>: Reconfigure email routing when business processes change and aliases are no longer needed.</p> </li> </ul> <p> <b>Important things to know</b> </p> <ul> <li> <p>Concurrent operations: This API uses distributed locking, so concurrent operations on the same email addresses may be temporarily blocked.</p> </li> <li> <p>Emails sent to the former alias address are still delivered directly to that address if it exists.</p> </li> <li> <p>You do not need to delete the email addresses after disassociation. Both addresses remain active independently.</p> </li> <li> <p>After a successful disassociation, you can immediately create a new alias relationship with the same addresses.</p> </li> <li> <p>200 status means alias was successfully disassociated.</p> </li> </ul> <p> <code>DisassociateEmailAddressAlias</code> does not return the following information:</p> <ul> <li> <p>Details in the response about the email that was disassociated. The response returns an empty body.</p> </li> <li> <p>The timestamp of when the disassociation occurred.</p> </li> </ul> <p> <b>Endpoints</b>: See <a href="https://docs.aws.amazon.com/general/latest/gr/connect_region.html">Connect Customer endpoints and quotas</a>.</p> <p> <b>Related operations</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_AssociateEmailAddressAlias.html">AssociateEmailAddressAlias</a>: Associates an email address alias with an existing email address in an Connect Customer instance.</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeEmailAddress.html">DescribeEmailAddress</a>: View current alias configurations for an email address.</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchEmailAddresses.html">SearchEmailAddresses</a>: Find email addresses and their alias relationships across an instance.</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_CreateEmailAddress.html">CreateEmailAddress</a>: Create new email addresses that can participate in alias relationships.</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteEmailAddress.html">DeleteEmailAddress</a>: Remove email addresses (automatically removes any alias relationships).</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdateEmailAddressMetadata.html">UpdateEmailAddressMetadata</a>: Modify email address properties (does not affect alias relationships).</p> </li> </ul>

    Args:
        email_address_id: <p>The identifier of the email address.</p>
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        alias_configuration: <p>Configuration object that specifies which alias relationship to remove. The alias association must currently exist between the primary email address and the specified alias email address.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_conflict_exception.ResourceConflictException: <p>A resource already has that name.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.disassociate_email_address_alias_request.DisassociateEmailAddressAliasRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.disassociate_email_address_alias_response.DisassociateEmailAddressAliasResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.disassociate_email_address_alias

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.disassociate_email_address_alias.async_disassociate_email_address_alias(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateEmailAddressAlias")
    )
    input_: capo_connect.types.disassociate_email_address_alias_request.DisassociateEmailAddressAliasRequest = {
        "email_address_id": email_address_id,
        "instance_id": instance_id,
        "alias_configuration": alias_configuration,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output