Skip to content

select_resource_config

select_resource_config(
    expression: Expression,
    *,
    config_overrides: Optional[ConfigServiceClientConfig] = None,
    limit: Optional[Limit] = None,
    next_token: Optional[NextToken] = None,
) -> SelectResourceConfigResponse

Accepts a structured query language (SQL) SELECT command, performs the corresponding search, and returns resource configurations matching the properties.

For more information about query components, see the Query Components section in the Config Developer Guide.

Parameters:

  • expression (Expression) –

    The SQL query SELECT command.

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

    The maximum number of query results returned on each page.

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

    The nextToken string returned in a previous request that you use to request the next page of results in a paginated response.

Raises:

Source code in docs_src/capo_config_service/_services/config_service.py
def select_resource_config(
    self,
    expression: "capo_config_service.types.expression.Expression",
    *,
    config_overrides: Optional[ConfigServiceClientConfig] = None,
    limit: Optional["capo_config_service.types.limit.Limit"] = None,
    next_token: Optional["capo_config_service.types.next_token.NextToken"] = None,
) -> "capo_config_service.types.select_resource_config_response.SelectResourceConfigResponse":
    """<p>Accepts a structured query language (SQL) <code>SELECT</code> command, performs the corresponding search, and returns resource configurations matching the properties.</p> <p>For more information about query components, see the <a href="https://docs.aws.amazon.com/config/latest/developerguide/query-components.html"> <b>Query Components</b> </a> section in the <i>Config Developer Guide</i>.</p>

    Args:
        expression: <p>The SQL query <code>SELECT</code> command.</p>
        limit: <p>The maximum number of query results returned on each page. </p>
        next_token: <p>The <code>nextToken</code> string returned in a previous request that you use to request the next page of results in a paginated response. </p>

    Raises:
        capo_config_service.errors.invalid_expression_exception.InvalidExpressionException: <p>The syntax of the query is incorrect.</p>
        capo_config_service.errors.invalid_limit_exception.InvalidLimitException: <p>The specified limit is outside the allowable range.</p>
        capo_config_service.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The specified next token is not valid. Specify the <code>nextToken</code> string that was returned in the previous response to get the next page of results.</p>
        capo_config_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_config_service.types.select_resource_config_request.SelectResourceConfigRequest]",
    ) -> OperationResponse[
        "capo_config_service.types.select_resource_config_response.SelectResourceConfigResponse"
    ]:
        import capo_config_service._operations.starling_dove_service.select_resource_config

        output, http_response = (
            capo_config_service._operations.starling_dove_service.select_resource_config.select_resource_config(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SelectResourceConfig")
    )
    input_: capo_config_service.types.select_resource_config_request.SelectResourceConfigRequest = {
        "expression": expression
    }
    if limit is not None:
        input_["limit"] = limit
    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