---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_xray_sampling_rule Resource - terraform-provider-awscc"
subcategory: ""
description: |-
This schema provides construct and validation rules for AWS-XRay SamplingRule resource parameters.
---
# awscc_xray_sampling_rule (Resource)
This schema provides construct and validation rules for AWS-XRay SamplingRule resource parameters.
## Schema
### Optional
- `rule_name` (String) The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
- `sampling_rule` (Attributes) (see [below for nested schema](#nestedatt--sampling_rule))
- `sampling_rule_record` (Attributes) (see [below for nested schema](#nestedatt--sampling_rule_record))
- `sampling_rule_update` (Attributes) (see [below for nested schema](#nestedatt--sampling_rule_update))
- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags))
### Read-Only
- `id` (String) Uniquely identifies the resource.
- `rule_arn` (String) The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
### Nested Schema for `sampling_rule`
Optional:
- `attributes` (Map of String) Matches attributes derived from the request.
- `fixed_rate` (Number) The percentage of matching requests to instrument, after the reservoir is exhausted.
- `host` (String) Matches the hostname from a request URL.
- `http_method` (String) Matches the HTTP method from a request URL.
- `priority` (Number) The priority of the sampling rule.
- `reservoir_size` (Number) 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.
- `resource_arn` (String) Matches the ARN of the AWS resource on which the service runs.
- `rule_arn` (String) The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
- `rule_name` (String) The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
- `service_name` (String) Matches the name that the service uses to identify itself in segments.
- `service_type` (String) Matches the origin that the service uses to identify its type in segments.
- `url_path` (String) Matches the path from a request URL.
- `version` (Number) The version of the sampling rule format (1)
### Nested Schema for `sampling_rule_record`
Optional:
- `created_at` (String) When the rule was created, in Unix time seconds.
- `modified_at` (String) When the rule was modified, in Unix time seconds.
- `sampling_rule` (Attributes) (see [below for nested schema](#nestedatt--sampling_rule_record--sampling_rule))
### Nested Schema for `sampling_rule_record.sampling_rule`
Optional:
- `attributes` (Map of String) Matches attributes derived from the request.
- `fixed_rate` (Number) The percentage of matching requests to instrument, after the reservoir is exhausted.
- `host` (String) Matches the hostname from a request URL.
- `http_method` (String) Matches the HTTP method from a request URL.
- `priority` (Number) The priority of the sampling rule.
- `reservoir_size` (Number) 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.
- `resource_arn` (String) Matches the ARN of the AWS resource on which the service runs.
- `rule_arn` (String) The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
- `rule_name` (String) The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
- `service_name` (String) Matches the name that the service uses to identify itself in segments.
- `service_type` (String) Matches the origin that the service uses to identify its type in segments.
- `url_path` (String) Matches the path from a request URL.
- `version` (Number) The version of the sampling rule format (1)
### Nested Schema for `sampling_rule_update`
Optional:
- `attributes` (Map of String) Matches attributes derived from the request.
- `fixed_rate` (Number) The percentage of matching requests to instrument, after the reservoir is exhausted.
- `host` (String) Matches the hostname from a request URL.
- `http_method` (String) Matches the HTTP method from a request URL.
- `priority` (Number) The priority of the sampling rule.
- `reservoir_size` (Number) 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.
- `resource_arn` (String) Matches the ARN of the AWS resource on which the service runs.
- `rule_arn` (String) The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
- `rule_name` (String) The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
- `service_name` (String) Matches the name that the service uses to identify itself in segments.
- `service_type` (String) Matches the origin that the service uses to identify its type in segments.
- `url_path` (String) Matches the path from a request URL.
### Nested Schema for `tags`
Optional:
- `key` (String)
- `value` (String)
## Import
Import is supported using the following syntax:
```shell
$ terraform import awscc_xray_sampling_rule.example
```