deleteScalingPolicy method

Future<void> deleteScalingPolicy({
  1. required String fleetId,
  2. required String name,
})

This API works with the following fleet types: EC2

Deletes a fleet scaling policy. Once deleted, the policy is no longer in force and Amazon GameLift Servers 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, use StopFleetActions. This operation suspends all policies for the fleet.

May throw InternalServiceException. May throw InvalidRequestException. May throw NotFoundException. May throw UnauthorizedException. May throw UnsupportedRegionException.

Parameter fleetId : A unique identifier for the fleet to be deleted. You can use either the fleet ID or ARN value.

Parameter name : A descriptive label that is associated with a fleet's scaling policy. Policy names do not need to be unique.

Implementation

Future<void> deleteScalingPolicy({
  required String fleetId,
  required String name,
}) async {
  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,
    },
  );
}