import * as core from "@terrascript/core"; export interface XraySamplingRuleArgs extends core.ResourceArgs { /** * (Optional) Matches attributes derived from the request. */ attributes?: core.Map | core.MapOut; /** * (Required) The percentage of matching requests to instrument, after the reservoir is exhausted. */ fixedRate: number | core.NumberOut; /** * (Required) Matches the hostname from a request URL. */ host: string | core.StringOut; /** * (Required) Matches the HTTP method of a request. */ httpMethod: string | core.StringOut; /** * (Required) The priority of the sampling rule. */ priority: number | core.NumberOut; /** * (Required) 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 co * llectively. */ reservoirSize: number | core.NumberOut; /** * (Required) Matches the ARN of the AWS resource on which the service runs. */ resourceArn: string | core.StringOut; /** * (Required) The name of the sampling rule. */ ruleName?: string | core.StringOut; /** * (Required) Matches the `name` that the service uses to identify itself in segments. */ serviceName: string | core.StringOut; /** * (Required) Matches the `origin` that the service uses to identify its type in segments. */ serviceType: string | core.StringOut; /** * (Optional) Key-value mapping of resource tags. If configured with a provider [`default_tags` configu * ration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configu * ration-block) present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Required) Matches the path from a request URL. */ urlPath: string | core.StringOut; /** * (Required) The version of the sampling rule format (`1` ) */ version: number | core.NumberOut; } export class XraySamplingRule extends core.Resource { /** * The ARN of the sampling rule. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) Matches attributes derived from the request. */ @core.attr(String, { kind: "map" }) public attributes?: core.Map | core.MapOut; /** * (Required) The percentage of matching requests to instrument, after the reservoir is exhausted. */ @core.attr(Number) public fixedRate!: number | core.NumberOut; /** * (Required) Matches the hostname from a request URL. */ @core.attr(String) public host!: string | core.StringOut; /** * (Required) Matches the HTTP method of a request. */ @core.attr(String) public httpMethod!: string | core.StringOut; /** * The name of the sampling rule. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required) The priority of the sampling rule. */ @core.attr(Number) public priority!: number | core.NumberOut; /** * (Required) 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 co * llectively. */ @core.attr(Number) public reservoirSize!: number | core.NumberOut; /** * (Required) Matches the ARN of the AWS resource on which the service runs. */ @core.attr(String) public resourceArn!: string | core.StringOut; /** * (Required) The name of the sampling rule. */ @core.attr(String) public ruleName?: string | core.StringOut; /** * (Required) Matches the `name` that the service uses to identify itself in segments. */ @core.attr(String) public serviceName!: string | core.StringOut; /** * (Required) Matches the `origin` that the service uses to identify its type in segments. */ @core.attr(String) public serviceType!: string | core.StringOut; /** * (Optional) Key-value mapping of resource tags. If configured with a provider [`default_tags` configu * ration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configu * ration-block) present, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Required) Matches the path from a request URL. */ @core.attr(String) public urlPath!: string | core.StringOut; /** * (Required) The version of the sampling rule format (`1` ) */ @core.attr(Number) public version!: number | core.NumberOut; constructor(name: string, args?: XraySamplingRuleArgs) { super(name, "aws_xray_sampling_rule", args); } public override getNamespace(): string { return "aws_x_ray"; } }