deleteScalingPolicy method
Deletes a fleet scaling policy. Once deleted, the policy is no longer in force and GameLift removes all record of it. To delete a scaling policy, specify both the scaling policy name and the fleet ID it is associated with.
To temporarily suspend scaling policies, call StopFleetActions. This operation suspends all policies for the fleet.
- DescribeFleetCapacity
- UpdateFleetCapacity
- DescribeEC2InstanceLimits
-
Manage scaling policies:
- PutScalingPolicy (auto-scaling)
- DescribeScalingPolicies (auto-scaling)
- DeleteScalingPolicy (auto-scaling)
- Manage fleet actions:
May throw InternalServiceException. May throw InvalidRequestException. May throw UnauthorizedException. May throw NotFoundException.
Parameter fleetId
:
A unique identifier for a fleet to be deleted. You can use either the
fleet ID or ARN value.
Parameter name
:
A descriptive label that is associated with a scaling policy. Policy names
do not need to be unique.
Implementation
Future<void> deleteScalingPolicy({
required String fleetId,
required String name,
}) async {
ArgumentError.checkNotNull(fleetId, 'fleetId');
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
1024,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.DeleteScalingPolicy'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FleetId': fleetId,
'Name': name,
},
);
}