Skip to content

describe_home_region_controls

describe_home_region_controls(
    *,
    config_overrides: Optional[MigrationHubConfigClientConfig] = None,
    control_id: Optional[ControlId] = None,
    home_region: Optional[HomeRegion] = None,
    target: Optional[Target] = None,
    max_results: Optional[DescribeHomeRegionControlsMaxResults] = None,
    next_token: Optional[Token] = None,
) -> DescribeHomeRegionControlsResult

This API permits filtering on the ControlId and HomeRegion fields.

Parameters:

  • control_id (Optional[ControlId], default: None ) –

    The ControlID is a unique identifier string of your HomeRegionControl object.

  • home_region (Optional[HomeRegion], default: None ) –

    The name of the home region you'd like to view.

  • target (Optional[Target], default: None ) –

    The target parameter specifies the identifier to which the home region is applied, which is always of type ACCOUNT. It applies the home region to the current ACCOUNT.

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

    The maximum number of filtering results to display per page.

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

    If a NextToken was returned by a previous call, more results are available. To retrieve the next page of results, make the call again using the returned token in NextToken.

Raises:

Source code in docs_src/capo_migrationhub_config/_services/migration_hub_config.py
def describe_home_region_controls(
    self,
    *,
    config_overrides: Optional[MigrationHubConfigClientConfig] = None,
    control_id: Optional[
        "capo_migrationhub_config.types.control_id.ControlId"
    ] = None,
    home_region: Optional[
        "capo_migrationhub_config.types.home_region.HomeRegion"
    ] = None,
    target: Optional["capo_migrationhub_config.types.target.Target"] = None,
    max_results: Optional[
        "capo_migrationhub_config.types.describe_home_region_controls_max_results.DescribeHomeRegionControlsMaxResults"
    ] = None,
    next_token: Optional["capo_migrationhub_config.types.token.Token"] = None,
) -> "capo_migrationhub_config.types.describe_home_region_controls_result.DescribeHomeRegionControlsResult":
    """<p>This API permits filtering on the <code>ControlId</code> and <code>HomeRegion</code> fields.</p>

    Args:
        control_id: <p>The <code>ControlID</code> is a unique identifier string of your <code>HomeRegionControl</code> object.</p>
        home_region: <p>The name of the home region you'd like to view.</p>
        target: <p>The target parameter specifies the identifier to which the home region is applied, which is always of type <code>ACCOUNT</code>. It applies the home region to the current <code>ACCOUNT</code>.</p>
        max_results: <p>The maximum number of filtering results to display per page. </p>
        next_token: <p>If a <code>NextToken</code> was returned by a previous call, more results are available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>

    Raises:
        capo_migrationhub_config.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_migrationhub_config.errors.internal_server_error.InternalServerError: <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
        capo_migrationhub_config.errors.invalid_input_exception.InvalidInputException: <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
        capo_migrationhub_config.errors.service_unavailable_exception.ServiceUnavailableException: <p>Exception raised when a request fails due to temporary unavailability of the service.</p>
        capo_migrationhub_config.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_migrationhub_config.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_migrationhub_config.types.describe_home_region_controls_request.DescribeHomeRegionControlsRequest]",
    ) -> OperationResponse[
        "capo_migrationhub_config.types.describe_home_region_controls_result.DescribeHomeRegionControlsResult"
    ]:
        import capo_migrationhub_config._operations.aws_migration_hub_multi_account_service.describe_home_region_controls

        output, http_response = (
            capo_migrationhub_config._operations.aws_migration_hub_multi_account_service.describe_home_region_controls.describe_home_region_controls(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeHomeRegionControls")
    )
    input_: capo_migrationhub_config.types.describe_home_region_controls_request.DescribeHomeRegionControlsRequest = {}
    if control_id is not None:
        input_["control_id"] = control_id
    if home_region is not None:
        input_["home_region"] = home_region
    if target is not None:
        input_["target"] = target
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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