{
  "typeName" : "AWS::ApplicationAutoScaling::ScalingPolicy",
  "description" : "Resource Type definition for AWS::ApplicationAutoScaling::ScalingPolicy",
  "additionalProperties" : false,
  "properties" : {
    "Id" : {
      "type" : "string"
    },
    "PolicyName" : {
      "type" : "string"
    },
    "PolicyType" : {
      "type" : "string"
    },
    "ResourceId" : {
      "type" : "string"
    },
    "ScalableDimension" : {
      "type" : "string"
    },
    "ScalingTargetId" : {
      "type" : "string"
    },
    "ServiceNamespace" : {
      "type" : "string"
    },
    "StepScalingPolicyConfiguration" : {
      "$ref" : "#/definitions/StepScalingPolicyConfiguration"
    },
    "TargetTrackingScalingPolicyConfiguration" : {
      "$ref" : "#/definitions/TargetTrackingScalingPolicyConfiguration"
    }
  },
  "definitions" : {
    "StepScalingPolicyConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "AdjustmentType" : {
          "type" : "string"
        },
        "Cooldown" : {
          "type" : "integer"
        },
        "MetricAggregationType" : {
          "type" : "string"
        },
        "MinAdjustmentMagnitude" : {
          "type" : "integer"
        },
        "StepAdjustments" : {
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "$ref" : "#/definitions/StepAdjustment"
          }
        }
      }
    },
    "TargetTrackingScalingPolicyConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "CustomizedMetricSpecification" : {
          "$ref" : "#/definitions/CustomizedMetricSpecification"
        },
        "DisableScaleIn" : {
          "type" : "boolean"
        },
        "PredefinedMetricSpecification" : {
          "$ref" : "#/definitions/PredefinedMetricSpecification"
        },
        "ScaleInCooldown" : {
          "type" : "integer"
        },
        "ScaleOutCooldown" : {
          "type" : "integer"
        },
        "TargetValue" : {
          "type" : "number"
        }
      },
      "required" : [ "TargetValue" ]
    },
    "PredefinedMetricSpecification" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "PredefinedMetricType" : {
          "type" : "string"
        },
        "ResourceLabel" : {
          "type" : "string"
        }
      },
      "required" : [ "PredefinedMetricType" ]
    },
    "CustomizedMetricSpecification" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Dimensions" : {
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "$ref" : "#/definitions/MetricDimension"
          }
        },
        "MetricName" : {
          "type" : "string"
        },
        "Namespace" : {
          "type" : "string"
        },
        "Statistic" : {
          "type" : "string"
        },
        "Unit" : {
          "type" : "string"
        }
      },
      "required" : [ "MetricName", "Statistic", "Namespace" ]
    },
    "StepAdjustment" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "MetricIntervalLowerBound" : {
          "type" : "number"
        },
        "MetricIntervalUpperBound" : {
          "type" : "number"
        },
        "ScalingAdjustment" : {
          "type" : "integer"
        }
      },
      "required" : [ "ScalingAdjustment" ]
    },
    "MetricDimension" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Name" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "required" : [ "Value", "Name" ]
    }
  },
  "required" : [ "PolicyType", "PolicyName" ],
  "createOnlyProperties" : [ "/properties/PolicyName", "/properties/ServiceNamespace", "/properties/ResourceId", "/properties/ScalingTargetId", "/properties/ScalableDimension" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "readOnlyProperties" : [ "/properties/Id" ]
}