Skip to content

describe_application_assignment async

describe_application_assignment(
    application_arn: ApplicationArn,
    principal_id: PrincipalId,
    principal_type: PrincipalType,
    *,
    config_overrides: Optional[AsyncSSOAdminClientConfig] = None,
) -> DescribeApplicationAssignmentResponse

Retrieves a direct assignment of a user or group to an application. If the user doesn’t have a direct assignment to the application, the user may still have access to the application through a group. Therefore, don’t use this API to test access to an application for a user. Instead use ListApplicationAssignmentsForPrincipal.

Parameters:

Raises:

Source code in docs_src/capo_sso_admin/_services/async_sso_admin.py
async def describe_application_assignment(
    self,
    application_arn: "capo_sso_admin.types.application_arn.ApplicationArn",
    principal_id: "capo_sso_admin.types.principal_id.PrincipalId",
    principal_type: "capo_sso_admin.types.principal_type.PrincipalType",
    *,
    config_overrides: Optional[AsyncSSOAdminClientConfig] = None,
) -> "capo_sso_admin.types.describe_application_assignment_response.DescribeApplicationAssignmentResponse":
    """<p>Retrieves a direct assignment of a user or group to an application. If the user doesn’t have a direct assignment to the application, the user may still have access to the application through a group. Therefore, don’t use this API to test access to an application for a user. Instead use <a>ListApplicationAssignmentsForPrincipal</a>.</p>

    Args:
        application_arn: <p>Specifies the ARN of the application. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
        principal_id: <p>An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/welcome.html">IAM Identity Center Identity Store API Reference</a>.</p>
        principal_type: <p>The entity type for which the assignment will be created.</p>

    Raises:
        capo_sso_admin.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_sso_admin.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure with an internal server.</p>
        capo_sso_admin.errors.resource_not_found_exception.ResourceNotFoundException: <p>Indicates that a requested resource is not found.</p>
        capo_sso_admin.errors.throttling_exception.ThrottlingException: <p>Indicates that the principal has crossed the throttling limits of the API operations.</p>
        capo_sso_admin.errors.validation_exception.ValidationException: <p>The request failed because it contains a syntax error.</p>
        capo_sso_admin.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sso_admin.types.describe_application_assignment_request.DescribeApplicationAssignmentRequest]",
    ) -> AsyncOperationResponse[
        "capo_sso_admin.types.describe_application_assignment_response.DescribeApplicationAssignmentResponse"
    ]:
        import capo_sso_admin._operations.swb_external_service.describe_application_assignment

        (
            output,
            http_response,
        ) = await capo_sso_admin._operations.swb_external_service.describe_application_assignment.async_describe_application_assignment(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeApplicationAssignment")
    )
    input_: capo_sso_admin.types.describe_application_assignment_request.DescribeApplicationAssignmentRequest = {
        "application_arn": application_arn,
        "principal_id": principal_id,
        "principal_type": principal_type,
    }

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