{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-autoscaling-scalingpolicy.json",
  "title": "AWSAutoScalingScalingPolicyProperties",
  "description": "The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-autoscaling.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-autoscaling-scalingpolicy.json",
    "sourceSha256": "762bf0ab024b4247cfc5e689c6e7b9b5c0f6177426cd48b887755d56a1f692ad"
  },
  "type": "object",
  "properties": {
    "MetricAggregationType": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling."
    },
    "PolicyType": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling"
    },
    "PredictiveScalingConfiguration": {
      "description": "A predictive scaling policy. Includes support for predefined metrics only.",
      "$ref": "#/$defs/PredictiveScalingConfiguration"
    },
    "ScalingAdjustment": {
      "description": "The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)",
      "type": "integer"
    },
    "Cooldown": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group."
    },
    "StepAdjustments": {
      "description": "A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/StepAdjustment"
      }
    },
    "AutoScalingGroupName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the Auto Scaling group."
    },
    "MinAdjustmentMagnitude": {
      "description": "The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.",
      "type": "integer"
    },
    "TargetTrackingConfiguration": {
      "description": "A target tracking scaling policy. Includes support for predefined or customized metrics.",
      "$ref": "#/$defs/TargetTrackingConfiguration"
    },
    "EstimatedInstanceWarmup": {
      "description": "The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.",
      "type": "integer"
    },
    "AdjustmentType": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity."
    }
  },
  "typeName": "AWS::AutoScaling::ScalingPolicy",
  "tagging": {
    "taggable": false,
    "tagOnCreate": false,
    "tagUpdatable": false,
    "cloudFormationSystemTags": false
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-autoscaling.git",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/AutoScalingGroupName"
  ],
  "$defs": {
    "PredictiveScalingMetricSpecification": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyPredictiveScalingMetricSpecificationDefinition",
      "properties": {
        "CustomizedCapacityMetricSpecification": {
          "$ref": "#/$defs/PredictiveScalingCustomizedCapacityMetric"
        },
        "CustomizedLoadMetricSpecification": {
          "$ref": "#/$defs/PredictiveScalingCustomizedLoadMetric"
        },
        "CustomizedScalingMetricSpecification": {
          "$ref": "#/$defs/PredictiveScalingCustomizedScalingMetric"
        },
        "PredefinedLoadMetricSpecification": {
          "$ref": "#/$defs/PredictiveScalingPredefinedLoadMetric"
        },
        "TargetValue": {
          "type": "number"
        },
        "PredefinedScalingMetricSpecification": {
          "$ref": "#/$defs/PredictiveScalingPredefinedScalingMetric"
        },
        "PredefinedMetricPairSpecification": {
          "$ref": "#/$defs/PredictiveScalingPredefinedMetricPair"
        }
      },
      "required": [
        "TargetValue"
      ],
      "additionalProperties": false
    },
    "PredictiveScalingConfiguration": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyPredictiveScalingConfigurationDefinition",
      "properties": {
        "MetricSpecifications": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/PredictiveScalingMetricSpecification"
          }
        },
        "MaxCapacityBreachBehavior": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "MaxCapacityBuffer": {
          "type": "integer"
        },
        "SchedulingBufferTime": {
          "type": "integer"
        },
        "Mode": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "MetricSpecifications"
      ],
      "additionalProperties": false
    },
    "CustomizedMetricSpecification": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyCustomizedMetricSpecificationDefinition",
      "properties": {
        "MetricName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Dimensions": {
          "type": "array",
          "insertionOrder": false,
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/MetricDimension"
          }
        },
        "Statistic": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Unit": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Namespace": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "MetricName",
        "Statistic",
        "Namespace"
      ],
      "additionalProperties": false
    },
    "TargetTrackingConfiguration": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyTargetTrackingConfigurationDefinition",
      "properties": {
        "CustomizedMetricSpecification": {
          "$ref": "#/$defs/CustomizedMetricSpecification"
        },
        "TargetValue": {
          "type": "number"
        },
        "DisableScaleIn": {
          "type": "boolean"
        },
        "PredefinedMetricSpecification": {
          "$ref": "#/$defs/PredefinedMetricSpecification"
        }
      },
      "required": [
        "TargetValue"
      ],
      "additionalProperties": false
    },
    "PredictiveScalingPredefinedLoadMetric": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyPredictiveScalingPredefinedLoadMetricDefinition",
      "properties": {
        "ResourceLabel": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "PredefinedMetricType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "PredefinedMetricType"
      ],
      "additionalProperties": false
    },
    "StepAdjustment": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyStepAdjustmentDefinition",
      "insertionOrder": false,
      "properties": {
        "MetricIntervalUpperBound": {
          "type": "number"
        },
        "MetricIntervalLowerBound": {
          "type": "number"
        },
        "ScalingAdjustment": {
          "type": "integer"
        }
      },
      "required": [
        "ScalingAdjustment"
      ],
      "additionalProperties": false
    },
    "PredictiveScalingPredefinedMetricPair": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyPredictiveScalingPredefinedMetricPairDefinition",
      "properties": {
        "ResourceLabel": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "PredefinedMetricType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "PredefinedMetricType"
      ],
      "additionalProperties": false
    },
    "PredefinedMetricSpecification": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyPredefinedMetricSpecificationDefinition",
      "properties": {
        "ResourceLabel": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "PredefinedMetricType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "PredefinedMetricType"
      ],
      "additionalProperties": false
    },
    "MetricDimension": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyMetricDimensionDefinition",
      "properties": {
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Value",
        "Name"
      ],
      "additionalProperties": false
    },
    "PredictiveScalingPredefinedScalingMetric": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyPredictiveScalingPredefinedScalingMetricDefinition",
      "properties": {
        "ResourceLabel": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "PredefinedMetricType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "PredefinedMetricType"
      ],
      "additionalProperties": false
    },
    "PredictiveScalingCustomizedLoadMetric": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyPredictiveScalingCustomizedLoadMetricDefinition",
      "properties": {
        "MetricDataQueries": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/MetricDataQuery"
          }
        }
      },
      "required": [
        "MetricDataQueries"
      ],
      "additionalProperties": false
    },
    "PredictiveScalingCustomizedCapacityMetric": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyPredictiveScalingCustomizedCapacityMetricDefinition",
      "properties": {
        "MetricDataQueries": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/MetricDataQuery"
          }
        }
      },
      "required": [
        "MetricDataQueries"
      ],
      "additionalProperties": false
    },
    "PredictiveScalingCustomizedScalingMetric": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyPredictiveScalingCustomizedScalingMetricDefinition",
      "properties": {
        "MetricDataQueries": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/MetricDataQuery"
          }
        }
      },
      "required": [
        "MetricDataQueries"
      ],
      "additionalProperties": false
    },
    "Metric": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyMetricDefinition",
      "properties": {
        "MetricName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Dimensions": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/MetricDimension"
          }
        },
        "Namespace": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "MetricName",
        "Namespace"
      ],
      "additionalProperties": false
    },
    "MetricStat": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyMetricStatDefinition",
      "properties": {
        "Metric": {
          "$ref": "#/$defs/Metric"
        },
        "Stat": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Unit": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Stat",
        "Metric"
      ],
      "additionalProperties": false
    },
    "MetricDataQuery": {
      "type": "object",
      "title": "AWSAutoScalingScalingPolicyMetricDataQueryDefinition",
      "properties": {
        "Label": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "MetricStat": {
          "$ref": "#/$defs/MetricStat"
        },
        "Id": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ReturnData": {
          "type": "boolean"
        },
        "Expression": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Id"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "AutoScalingGroupName"
  ],
  "primaryIdentifier": [
    "/properties/Arn"
  ],
  "readOnlyProperties": [
    "/properties/PolicyName",
    "/properties/Arn"
  ]
}
