# AWS::XRay::SamplingRule SamplingRule ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{ "Attributes" : Attributes, "FixedRate" : Double, "Host" : String, "HTTPMethod" : String, "Priority" : Integer, "ReservoirSize" : Integer, "ResourceARN" : String, "RuleARN" : String, "RuleName" : String, "ServiceName" : String, "ServiceType" : String, "URLPath" : String, "Version" : Integer }### YAML
Attributes: Attributes FixedRate: Double Host: String HTTPMethod: String Priority: Integer ReservoirSize: Integer ResourceARN: String RuleARN: String RuleName: String ServiceName: String ServiceType: String URLPath: String Version: Integer## Properties #### Attributes Matches attributes derived from the request. _Required_: No _Type_: Attributes _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### FixedRate The percentage of matching requests to instrument, after the reservoir is exhausted. _Required_: No _Type_: Double _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### Host Matches the hostname from a request URL. _Required_: No _Type_: String _Maximum_:
64
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### HTTPMethod
Matches the HTTP method from a request URL.
_Required_: No
_Type_: String
_Maximum_: 10
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### Priority
The priority of the sampling rule.
_Required_: No
_Type_: Integer
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### ReservoirSize
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.
_Required_: No
_Type_: Integer
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### ResourceARN
Matches the ARN of the AWS resource on which the service runs.
_Required_: No
_Type_: String
_Maximum_: 500
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### RuleARN
The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
_Required_: No
_Type_: String
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### RuleName
The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
_Required_: No
_Type_: String
_Minimum_: 1
_Maximum_: 32
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### ServiceName
Matches the name that the service uses to identify itself in segments.
_Required_: No
_Type_: String
_Maximum_: 64
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### ServiceType
Matches the origin that the service uses to identify its type in segments.
_Required_: No
_Type_: String
_Maximum_: 64
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### URLPath
Matches the path from a request URL.
_Required_: No
_Type_: String
_Maximum_: 128
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### Version
The version of the sampling rule format (1)
_Required_: No
_Type_: Integer
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)