{ "$schema": "https://json-structure.org/meta/core/v0/#", "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-gamelift/refs/heads/main/json-structure/gamelift-put-scaling-policy-input-structure.json", "name": "PutScalingPolicyInput", "description": "PutScalingPolicyInput schema from Amazon GameLift API", "type": "object", "properties": { "Name": { "allOf": [ { "$ref": "#/components/schemas/NonZeroAndMaxString" }, { "description": "A descriptive label that is associated with a fleet's scaling policy. Policy names do not need to be unique. A fleet can have only one scaling policy with the same name." } ] }, "FleetId": { "allOf": [ { "$ref": "#/components/schemas/FleetIdOrArn" }, { "description": "A unique identifier for the fleet to apply this policy to. You can use either the fleet ID or ARN value. The fleet cannot be in any of the following statuses: ERROR or DELETING." } ] }, "ScalingAdjustment": { "allOf": [ { "$ref": "#/components/schemas/Integer" }, { "description": "Amount of adjustment to make, based on the scaling adjustment type." } ] }, "ScalingAdjustmentType": { "allOf": [ { "$ref": "#/components/schemas/ScalingAdjustmentType" }, { "description": "

The type of adjustment to make to a fleet's instance count:

" } ] }, "Threshold": { "allOf": [ { "$ref": "#/components/schemas/Double" }, { "description": "Metric value used to trigger a scaling event." } ] }, "ComparisonOperator": { "allOf": [ { "$ref": "#/components/schemas/ComparisonOperatorType" }, { "description": "Comparison operator to use when measuring the metric against the threshold value." } ] }, "EvaluationPeriods": { "allOf": [ { "$ref": "#/components/schemas/PositiveInteger" }, { "description": "Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered." } ] }, "MetricName": { "allOf": [ { "$ref": "#/components/schemas/MetricName" }, { "description": "

Name of the Amazon GameLift-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon GameLift with Amazon CloudWatch.

" } ] }, "PolicyType": { "allOf": [ { "$ref": "#/components/schemas/PolicyType" }, { "description": "The type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. For a rule-based policy set the following parameters: MetricName, ComparisonOperator, Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment." } ] }, "TargetConfiguration": { "allOf": [ { "$ref": "#/components/schemas/TargetConfiguration" }, { "description": "An object that contains settings for a target-based scaling policy." } ] } }, "required": [ "Name", "FleetId", "MetricName" ] }