XRay / Client / update_sampling_rule

update_sampling_rule#

XRay.Client.update_sampling_rule(**kwargs)#

Modifies a sampling rule’s configuration.

See also: AWS API Documentation

Request Syntax

response = client.update_sampling_rule(
    SamplingRuleUpdate={
        'RuleName': 'string',
        'RuleARN': 'string',
        'ResourceARN': 'string',
        'Priority': 123,
        'FixedRate': 123.0,
        'ReservoirSize': 123,
        'Host': 'string',
        'ServiceName': 'string',
        'ServiceType': 'string',
        'HTTPMethod': 'string',
        'URLPath': 'string',
        'Attributes': {
            'string': 'string'
        }
    }
)
Parameters:

SamplingRuleUpdate (dict) –

[REQUIRED]

The rule and fields to change.

  • RuleName (string) –

    The name of the sampling rule. Specify a rule by either name or ARN, but not both.

  • RuleARN (string) –

    The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

  • ResourceARN (string) –

    Matches the ARN of the Amazon Web Services resource on which the service runs.

  • Priority (integer) –

    The priority of the sampling rule.

  • FixedRate (float) –

    The percentage of matching requests to instrument, after the reservoir is exhausted.

  • ReservoirSize (integer) –

    A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

  • Host (string) –

    Matches the hostname from a request URL.

  • ServiceName (string) –

    Matches the name that the service uses to identify itself in segments.

  • ServiceType (string) –

    Matches the origin that the service uses to identify its type in segments.

  • HTTPMethod (string) –

    Matches the HTTP method of a request.

  • URLPath (string) –

    Matches the path from a request URL.

  • Attributes (dict) –

    Matches attributes derived from the request.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'SamplingRuleRecord': {
        'SamplingRule': {
            'RuleName': 'string',
            'RuleARN': 'string',
            'ResourceARN': 'string',
            'Priority': 123,
            'FixedRate': 123.0,
            'ReservoirSize': 123,
            'ServiceName': 'string',
            'ServiceType': 'string',
            'Host': 'string',
            'HTTPMethod': 'string',
            'URLPath': 'string',
            'Version': 123,
            'Attributes': {
                'string': 'string'
            }
        },
        'CreatedAt': datetime(2015, 1, 1),
        'ModifiedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • SamplingRuleRecord (dict) –

      The updated rule definition and metadata.

      • SamplingRule (dict) –

        The sampling rule.

        • RuleName (string) –

          The name of the sampling rule. Specify a rule by either name or ARN, but not both.

        • RuleARN (string) –

          The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

        • ResourceARN (string) –

          Matches the ARN of the Amazon Web Services resource on which the service runs.

        • Priority (integer) –

          The priority of the sampling rule.

        • FixedRate (float) –

          The percentage of matching requests to instrument, after the reservoir is exhausted.

        • ReservoirSize (integer) –

          A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

        • ServiceName (string) –

          Matches the name that the service uses to identify itself in segments.

        • ServiceType (string) –

          Matches the origin that the service uses to identify its type in segments.

        • Host (string) –

          Matches the hostname from a request URL.

        • HTTPMethod (string) –

          Matches the HTTP method of a request.

        • URLPath (string) –

          Matches the path from a request URL.

        • Version (integer) –

          The version of the sampling rule format ( 1).

        • Attributes (dict) –

          Matches attributes derived from the request.

          • (string) –

            • (string) –

      • CreatedAt (datetime) –

        When the rule was created.

      • ModifiedAt (datetime) –

        When the rule was last modified.

Exceptions