{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-xray-samplingrule.json",
  "title": "AWSXRaySamplingRuleProperties",
  "description": "This schema provides construct and validation rules for AWS-XRay SamplingRule resource parameters.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-xray-samplingrule.json",
    "sourceSha256": "25c5ab8a2c3da073aa5ed31d57ea8e2c622f8a5cc4d9d141e9dcdec8c54e0cfb"
  },
  "type": "object",
  "properties": {
    "SamplingRule": {
      "$ref": "#/$defs/SamplingRule"
    },
    "SamplingRuleRecord": {
      "$ref": "#/$defs/SamplingRuleRecord"
    },
    "SamplingRuleUpdate": {
      "$ref": "#/$defs/SamplingRuleUpdate"
    },
    "RuleName": {
      "$ref": "#/$defs/RuleName"
    },
    "Tags": {
      "$ref": "#/$defs/Tags"
    }
  },
  "typeName": "AWS::XRay::SamplingRule",
  "deprecatedProperties": [
    "/properties/RuleName",
    "/properties/SamplingRuleRecord",
    "/properties/SamplingRuleUpdate"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "readOnlyProperties": [
    "/properties/RuleARN"
  ],
  "additionalProperties": false,
  "$defs": {
    "SamplingRule": {
      "type": "object",
      "title": "AWSXRaySamplingRuleSamplingRuleDefinition",
      "properties": {
        "Attributes": {
          "$comment": "String to string map",
          "description": "Matches attributes derived from the request.",
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            ".{1,}": {
              "type": "string"
            }
          }
        },
        "FixedRate": {
          "description": "The percentage of matching requests to instrument, after the reservoir is exhausted.",
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "Host": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the hostname from a request URL."
        },
        "HTTPMethod": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 10
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the HTTP method from a request URL."
        },
        "Priority": {
          "description": "The priority of the sampling rule.",
          "type": "integer",
          "minimum": 1,
          "maximum": 9999
        },
        "ReservoirSize": {
          "description": "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.",
          "type": "integer",
          "minimum": 0
        },
        "ResourceARN": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 500
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the ARN of the AWS resource on which the service runs."
        },
        "RuleARN": {
          "$ref": "#/$defs/RuleARN"
        },
        "RuleName": {
          "$ref": "#/$defs/RuleName"
        },
        "ServiceName": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the name that the service uses to identify itself in segments."
        },
        "ServiceType": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the origin that the service uses to identify its type in segments."
        },
        "URLPath": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the path from a request URL."
        },
        "Version": {
          "description": "The version of the sampling rule format (1)",
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "FixedRate",
        "Host",
        "HTTPMethod",
        "Priority",
        "ReservoirSize",
        "ResourceARN",
        "ServiceName",
        "ServiceType",
        "URLPath"
      ],
      "additionalProperties": false
    },
    "SamplingRuleRecord": {
      "type": "object",
      "title": "AWSXRaySamplingRuleSamplingRuleRecordDefinition",
      "properties": {
        "CreatedAt": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "When the rule was created, in Unix time seconds."
        },
        "ModifiedAt": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "When the rule was modified, in Unix time seconds."
        },
        "SamplingRule": {
          "$ref": "#/$defs/SamplingRule"
        }
      },
      "additionalProperties": false
    },
    "SamplingRuleUpdate": {
      "type": "object",
      "title": "AWSXRaySamplingRuleSamplingRuleUpdateDefinition",
      "properties": {
        "Attributes": {
          "$comment": "String to string map",
          "description": "Matches attributes derived from the request.",
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            ".{1,}": {
              "type": "string"
            }
          }
        },
        "FixedRate": {
          "description": "The percentage of matching requests to instrument, after the reservoir is exhausted.",
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "Host": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the hostname from a request URL."
        },
        "HTTPMethod": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 10
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the HTTP method from a request URL."
        },
        "Priority": {
          "description": "The priority of the sampling rule.",
          "type": "integer",
          "minimum": 1,
          "maximum": 9999
        },
        "ReservoirSize": {
          "description": "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.",
          "type": "integer",
          "minimum": 0
        },
        "ResourceARN": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 500
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the ARN of the AWS resource on which the service runs."
        },
        "RuleARN": {
          "$ref": "#/$defs/RuleARN"
        },
        "RuleName": {
          "$ref": "#/$defs/RuleName"
        },
        "ServiceName": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the name that the service uses to identify itself in segments."
        },
        "ServiceType": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the origin that the service uses to identify its type in segments."
        },
        "URLPath": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Matches the path from a request URL."
        }
      },
      "additionalProperties": false
    },
    "RuleName": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 32
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.",
      "title": "AWSXRaySamplingRuleRuleNameDefinition"
    },
    "RuleARN": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.",
      "title": "AWSXRaySamplingRuleRuleARNDefinition"
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The key name of the tag."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for the tag."
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSXRaySamplingRuleTagDefinition",
      "additionalProperties": false
    },
    "Tags": {
      "type": "array",
      "insertionOrder": false,
      "description": "An array of key-value pairs to apply to this resource.",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "title": "AWSXRaySamplingRuleTagsDefinition"
    }
  },
  "primaryIdentifier": [
    "/properties/RuleARN"
  ],
  "createOnlyProperties": [
    "/properties/SamplingRule/Version"
  ]
}
