Skip to content

describe_region async

describe_region(
    instance_arn: InstanceArn,
    region_name: RegionName,
    *,
    config_overrides: Optional[AsyncSSOAdminClientConfig] = None,
) -> DescribeRegionResponse

Retrieves details about a specific Region enabled in an IAM Identity Center instance. Details include the Region name, current status (ACTIVE, ADDING, or REMOVING), the date when the Region was added, and whether it is the primary Region. The request must be made from one of the enabled Regions of the IAM Identity Center instance.

The following actions are related to DescribeRegion:

Parameters:

  • instance_arn (InstanceArn) –

    The Amazon Resource Name (ARN) of the IAM Identity Center instance.

  • region_name (RegionName) –

    The name of the Amazon Web Services Region to retrieve information about. The Region name must be 1-32 characters long and follow the pattern of Amazon Web Services Region names (for example, us-east-1).

Raises:

Source code in docs_src/capo_sso_admin/_services/async_sso_admin.py
async def describe_region(
    self,
    instance_arn: "capo_sso_admin.types.instance_arn.InstanceArn",
    region_name: "capo_sso_admin.types.region_name.RegionName",
    *,
    config_overrides: Optional[AsyncSSOAdminClientConfig] = None,
) -> "capo_sso_admin.types.describe_region_response.DescribeRegionResponse":
    """<p>Retrieves details about a specific Region enabled in an IAM Identity Center instance. Details include the Region name, current status (ACTIVE, ADDING, or REMOVING), the date when the Region was added, and whether it is the primary Region. The request must be made from one of the enabled Regions of the IAM Identity Center instance.</p> <p>The following actions are related to <code>DescribeRegion</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_AddRegion.html"> AddRegion</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_RemoveRegion.html">RemoveRegion</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ListRegions.html">ListRegions</a> </p> </li> </ul>

    Args:
        instance_arn: <p>The Amazon Resource Name (ARN) of the IAM Identity Center instance.</p>
        region_name: <p>The name of the Amazon Web Services Region to retrieve information about. The Region name must be 1-32 characters long and follow the pattern of Amazon Web Services Region names (for example, us-east-1).</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_region_request.DescribeRegionRequest]",
    ) -> AsyncOperationResponse[
        "capo_sso_admin.types.describe_region_response.DescribeRegionResponse"
    ]:
        import capo_sso_admin._operations.swb_external_service.describe_region

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeRegion")
    )
    input_: capo_sso_admin.types.describe_region_request.DescribeRegionRequest = {
        "instance_arn": instance_arn,
        "region_name": region_name,
    }

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