Skip to content

update_indexing_rule

update_indexing_rule(
    name: String,
    rule: IndexingRuleValueUpdate,
    *,
    config_overrides: Optional[XRayClientConfig] = None,
) -> UpdateIndexingRuleResult

Modifies an indexing rule’s configuration.

Indexing rules are used for determining the sampling rate for spans indexed from CloudWatch Logs. For more information, see Transaction Search.

Parameters:

Raises:

Source code in docs_src/capo_xray/_services/x_ray.py
def update_indexing_rule(
    self,
    name: "capo_xray.types.string.String",
    rule: "capo_xray.types.indexing_rule_value_update.IndexingRuleValueUpdate",
    *,
    config_overrides: Optional[XRayClientConfig] = None,
) -> "capo_xray.types.update_indexing_rule_result.UpdateIndexingRuleResult":
    """<p> Modifies an indexing rule’s configuration. </p> <p>Indexing rules are used for determining the sampling rate for spans indexed from CloudWatch Logs. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html">Transaction Search</a>.</p>

    Args:
        name: <p> Name of the indexing rule to be updated. </p>
        rule: <p> Rule configuration to be updated. </p>

    Raises:
        capo_xray.errors.invalid_request_exception.InvalidRequestException: <p>The request is missing required parameters or has invalid parameters.</p>
        capo_xray.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is correct.</p>
        capo_xray.errors.throttled_exception.ThrottledException: <p>The request exceeds the maximum number of requests per second.</p>
        capo_xray.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_xray.types.update_indexing_rule_request.UpdateIndexingRuleRequest]",
    ) -> OperationResponse[
        "capo_xray.types.update_indexing_rule_result.UpdateIndexingRuleResult"
    ]:
        import capo_xray._operations.awsx_ray.update_indexing_rule

        output, http_response = (
            capo_xray._operations.awsx_ray.update_indexing_rule.update_indexing_rule(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateIndexingRule")
    )
    input_: capo_xray.types.update_indexing_rule_request.UpdateIndexingRuleRequest = {
        "name": name,
        "rule": rule,
    }

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