Skip to content

delete_connection_alias async

delete_connection_alias(
    alias_id: ConnectionAliasId,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> DeleteConnectionAliasResult

Deletes the specified connection alias. For more information, see Cross-Region Redirection for Amazon WorkSpaces.

If you will no longer be using a fully qualified domain name (FQDN) as the registration code for your WorkSpaces users, you must take certain precautions to prevent potential security issues. For more information, see Security Considerations if You Stop Using Cross-Region Redirection.

To delete a connection alias that has been shared, the shared account must first disassociate the connection alias from any directories it has been associated with. Then you must unshare the connection alias from the account it has been shared with. You can delete a connection alias only after it is no longer shared with any accounts or associated with any directories.

Parameters:

Raises:

Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def delete_connection_alias(
    self,
    alias_id: "capo_workspaces.types.connection_alias_id.ConnectionAliasId",
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.delete_connection_alias_result.DeleteConnectionAliasResult":
    """<p>Deletes the specified connection alias. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html"> Cross-Region Redirection for Amazon WorkSpaces</a>.</p> <important> <p> <b>If you will no longer be using a fully qualified domain name (FQDN) as the registration code for your WorkSpaces users, you must take certain precautions to prevent potential security issues.</b> For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html#cross-region-redirection-security-considerations"> Security Considerations if You Stop Using Cross-Region Redirection</a>.</p> </important> <note> <p>To delete a connection alias that has been shared, the shared account must first disassociate the connection alias from any directories it has been associated with. Then you must unshare the connection alias from the account it has been shared with. You can delete a connection alias only after it is no longer shared with any accounts or associated with any directories.</p> </note>

    Args:
        alias_id: <p>The identifier of the connection alias to delete.</p>

    Raises:
        capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
        capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
        capo_workspaces.errors.invalid_resource_state_exception.InvalidResourceStateException: <p>The state of the resource is not valid for this operation.</p>
        capo_workspaces.errors.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</p>
        capo_workspaces.errors.resource_associated_exception.ResourceAssociatedException: <p>The resource is associated with a directory.</p>
        capo_workspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces.types.delete_connection_alias_request.DeleteConnectionAliasRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.delete_connection_alias_result.DeleteConnectionAliasResult"
    ]:
        import capo_workspaces._operations.workspaces_service.delete_connection_alias

        (
            output,
            http_response,
        ) = await capo_workspaces._operations.workspaces_service.delete_connection_alias.async_delete_connection_alias(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteConnectionAlias")
    )
    input_: capo_workspaces.types.delete_connection_alias_request.DeleteConnectionAliasRequest = {
        "alias_id": alias_id
    }

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