Skip to content

describe_instance

describe_instance(
    instance_arn: InstanceArn,
    *,
    config_overrides: Optional[SSOAdminClientConfig] = None,
) -> DescribeInstanceResponse

Returns the details of an instance of IAM Identity Center. The status can be one of the following:

  • CREATE_IN_PROGRESS - The instance is in the process of being created. When the instance is ready for use, DescribeInstance returns the status of ACTIVE. While the instance is in the CREATE_IN_PROGRESS state, you can call only DescribeInstance and DeleteInstance operations.

  • DELETE_IN_PROGRESS - The instance is being deleted. Returns AccessDeniedException after the delete operation completes.

  • ACTIVE - The instance is active.

Parameters:

  • instance_arn (InstanceArn) –

    The ARN of the instance of IAM Identity Center under which the operation will run.

Raises:

Source code in docs_src/capo_sso_admin/_services/sso_admin.py
def describe_instance(
    self,
    instance_arn: "capo_sso_admin.types.instance_arn.InstanceArn",
    *,
    config_overrides: Optional[SSOAdminClientConfig] = None,
) -> "capo_sso_admin.types.describe_instance_response.DescribeInstanceResponse":
    """<p>Returns the details of an instance of IAM Identity Center. The status can be one of the following:</p> <ul> <li> <p> <code>CREATE_IN_PROGRESS</code> - The instance is in the process of being created. When the instance is ready for use, DescribeInstance returns the status of <code>ACTIVE</code>. While the instance is in the <code>CREATE_IN_PROGRESS</code> state, you can call only DescribeInstance and DeleteInstance operations.</p> </li> <li> <p> <code>DELETE_IN_PROGRESS</code> - The instance is being deleted. Returns <code>AccessDeniedException</code> after the delete operation completes. </p> </li> <li> <p> <code>ACTIVE</code> - The instance is active.</p> </li> </ul>

    Args:
        instance_arn: <p>The ARN of the instance of IAM Identity Center under which the operation will run.</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.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.
    """

    def _handler(
        req: "OperationRequest[capo_sso_admin.types.describe_instance_request.DescribeInstanceRequest]",
    ) -> OperationResponse[
        "capo_sso_admin.types.describe_instance_response.DescribeInstanceResponse"
    ]:
        import capo_sso_admin._operations.swb_external_service.describe_instance

        output, http_response = (
            capo_sso_admin._operations.swb_external_service.describe_instance.describe_instance(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeInstance")
    )
    input_: capo_sso_admin.types.describe_instance_request.DescribeInstanceRequest = {
        "instance_arn": instance_arn
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output