Skip to content

describe_connection_alias_permissions async

describe_connection_alias_permissions(
    alias_id: ConnectionAliasId,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[Limit] = None,
) -> DescribeConnectionAliasPermissionsResult

Describes the permissions that the owner of a connection alias has granted to another Amazon Web Services account for the specified connection alias. For more information, see Cross-Region Redirection for Amazon WorkSpaces.

Parameters:

  • alias_id (ConnectionAliasId) –

    The identifier of the connection alias.

  • next_token (Optional[PaginationToken], default: None ) –

    If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.

  • max_results (Optional[Limit], default: None ) –

    The maximum number of results to return.

Raises:

Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def describe_connection_alias_permissions(
    self,
    alias_id: "capo_workspaces.types.connection_alias_id.ConnectionAliasId",
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    next_token: Optional[
        "capo_workspaces.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_workspaces.types.limit.Limit"] = None,
) -> "capo_workspaces.types.describe_connection_alias_permissions_result.DescribeConnectionAliasPermissionsResult":
    """<p>Describes the permissions that the owner of a connection alias has granted to another Amazon Web Services account for 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>

    Args:
        alias_id: <p>The identifier of the connection alias.</p>
        next_token: <p>If you received a <code>NextToken</code> from a previous call that was paginated, provide this token to receive the next set of results. </p>
        max_results: <p>The maximum number of results to return.</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.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</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.describe_connection_alias_permissions_request.DescribeConnectionAliasPermissionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.describe_connection_alias_permissions_result.DescribeConnectionAliasPermissionsResult"
    ]:
        import capo_workspaces._operations.workspaces_service.describe_connection_alias_permissions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeConnectionAliasPermissions")
    )
    input_: capo_workspaces.types.describe_connection_alias_permissions_request.DescribeConnectionAliasPermissionsRequest = {
        "alias_id": alias_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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