{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-billingconductor-pricingrule.json",
  "title": "AWSBillingConductorPricingRuleProperties",
  "description": "A markup/discount that is defined for a specific set of services that can later be associated with a pricing plan.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-billing-conductor.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-billingconductor-pricingrule.json",
    "sourceSha256": "3274646768673ae47d8feff33db2706f59596716be7fa3afee495315bd8bc0ec"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "[a-zA-Z0-9_\\+=\\.\\-@]+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Pricing rule name"
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 1024
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Pricing rule description"
    },
    "Scope": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "GLOBAL",
            "SERVICE",
            "BILLING_ENTITY",
            "SKU"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A term used to categorize the granularity of a Pricing Rule."
    },
    "Type": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "MARKUP",
            "DISCOUNT",
            "TIERING"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "One of MARKUP, DISCOUNT or TIERING that describes the behaviour of the pricing rule."
    },
    "ModifierPercentage": {
      "description": "Pricing rule modifier percentage",
      "type": "number",
      "minimum": 0
    },
    "Service": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "[a-zA-Z0-9\\.\\-]+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The service which a pricing rule is applied on"
    },
    "BillingEntity": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "AWS",
            "AWS Marketplace",
            "AISPL"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The seller of services provided by AWS, their affiliates, or third-party providers selling services via AWS Marketplaces. Supported billing entities are AWS, AWS Marketplace, and AISPL."
    },
    "Tiering": {
      "description": "The set of tiering configurations for the pricing rule.",
      "type": "object",
      "properties": {
        "FreeTier": {
          "$ref": "#/$defs/FreeTier"
        }
      },
      "additionalProperties": false
    },
    "UsageType": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "pattern": "^\\S+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The UsageType which a SKU pricing rule is modifying"
    },
    "Operation": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "pattern": "^\\S+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Operation which a SKU pricing rule is modifying"
    },
    "Tags": {
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::BillingConductor::PricingRule",
  "primaryIdentifier": [
    "/properties/Arn"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-billing-conductor.git",
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/AssociatedPricingPlanCount",
    "/properties/CreationTime",
    "/properties/LastModifiedTime"
  ],
  "$defs": {
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSBillingConductorPricingRuleTagDefinition",
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    },
    "FreeTier": {
      "description": "The possible customizable free tier configurations.",
      "type": "object",
      "title": "AWSBillingConductorPricingRuleFreeTierDefinition",
      "properties": {
        "Activated": {
          "type": "boolean"
        }
      },
      "required": [
        "Activated"
      ],
      "additionalProperties": false
    }
  },
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "required": [
    "Name",
    "Scope",
    "Type"
  ],
  "createOnlyProperties": [
    "/properties/Scope",
    "/properties/Service",
    "/properties/BillingEntity",
    "/properties/UsageType",
    "/properties/Operation"
  ]
}
