This API works with the following fleet types: EC2, Anywhere, Container
Removes locations from a multi-location fleet. When deleting a location, all game server processes and all instances that are still active in the location are shut down.
To delete fleet locations, identify the fleet ID and provide a list of the locations to be deleted.
If successful, GameLift sets the location status to DELETING, and begins to shut down existing server processes and terminate instances in each location being deleted. When completed, the location status changes to TERMINATED.
Learn more
Setting up Amazon GameLift Servers fleets
Parameters:
-
fleet_id
(Optional[FleetIdOrArn], default:
None
)
–
A unique identifier for the fleet to delete locations for. You can use either the fleet ID or ARN value.
-
locations
(Optional[LocationList], default:
None
)
–
The list of fleet locations to delete. Specify locations in the form of an Amazon Web Services Region code, such as us-west-2.
Raises:
-
InternalServiceException
–
The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
-
InvalidRequestException
–
One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.
-
NotFoundException
–
The requested resource was not found. The resource was either not created yet or deleted.
-
UnauthorizedException
–
The client failed authentication. Clients should not retry such requests.
-
UnsupportedRegionException
–
The requested operation is not supported in the Region specified.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_gamelift/_services/game_lift.py
| def delete_fleet_locations(
self,
*,
config_overrides: Optional[GameLiftClientConfig] = None,
fleet_id: Optional["capo_gamelift.types.fleet_id_or_arn.FleetIdOrArn"] = None,
locations: Optional["capo_gamelift.types.location_list.LocationList"] = None,
) -> "capo_gamelift.types.delete_fleet_locations_output.DeleteFleetLocationsOutput":
"""<p> <b>This API works with the following fleet types:</b> EC2, Anywhere, Container</p> <p>Removes locations from a multi-location fleet. When deleting a location, all game server processes and all instances that are still active in the location are shut down. </p> <p>To delete fleet locations, identify the fleet ID and provide a list of the locations to be deleted. </p> <p>If successful, GameLift sets the location status to <code>DELETING</code>, and begins to shut down existing server processes and terminate instances in each location being deleted. When completed, the location status changes to <code>TERMINATED</code>.</p> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html">Setting up Amazon GameLift Servers fleets</a> </p>
Args:
fleet_id: <p>A unique identifier for the fleet to delete locations for. You can use either the fleet ID or ARN value.</p>
locations: <p>The list of fleet locations to delete. Specify locations in the form of an Amazon Web Services Region code, such as <code>us-west-2</code>.</p>
Raises:
capo_gamelift.errors.internal_service_exception.InternalServiceException: <p>The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.</p>
capo_gamelift.errors.invalid_request_exception.InvalidRequestException: <p>One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.</p>
capo_gamelift.errors.not_found_exception.NotFoundException: <p>The requested resource was not found. The resource was either not created yet or deleted.</p>
capo_gamelift.errors.unauthorized_exception.UnauthorizedException: <p>The client failed authentication. Clients should not retry such requests.</p>
capo_gamelift.errors.unsupported_region_exception.UnsupportedRegionException: <p>The requested operation is not supported in the Region specified.</p>
capo_gamelift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_gamelift.types.delete_fleet_locations_input.DeleteFleetLocationsInput]",
) -> OperationResponse[
"capo_gamelift.types.delete_fleet_locations_output.DeleteFleetLocationsOutput"
]:
import capo_gamelift._operations.game_lift.delete_fleet_locations
output, http_response = (
capo_gamelift._operations.game_lift.delete_fleet_locations.delete_fleet_locations(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteFleetLocations")
)
input_: capo_gamelift.types.delete_fleet_locations_input.DeleteFleetLocationsInput = {}
if fleet_id is not None:
input_["fleet_id"] = fleet_id
if locations is not None:
input_["locations"] = locations
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|