This API works with the following fleet types: Anywhere
Removes a compute resource from an Anywhere fleet. Deregistered computes can no longer host game sessions through Amazon GameLift Servers. Use this operation with an Anywhere fleet that doesn't use the Amazon GameLift Servers Agent. For Anywhere fleets with the Agent, the Agent handles all compute registry tasks for you.
To deregister a compute, call this operation from the compute that's being deregistered and specify the compute name and the fleet ID.
Parameters:
-
fleet_id
(Optional[FleetIdOrArn], default:
None
)
–
A unique identifier for the fleet the compute resource is currently registered to.
-
compute_name
(Optional[ComputeNameOrArn], default:
None
)
–
The unique identifier of the compute resource to deregister. For an Anywhere fleet compute, use the registered compute name.
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/async_game_lift.py
| async def deregister_compute(
self,
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = None,
fleet_id: Optional["capo_gamelift.types.fleet_id_or_arn.FleetIdOrArn"] = None,
compute_name: Optional[
"capo_gamelift.types.compute_name_or_arn.ComputeNameOrArn"
] = None,
) -> "capo_gamelift.types.deregister_compute_output.DeregisterComputeOutput":
"""<p> <b>This API works with the following fleet types:</b> Anywhere</p> <p>Removes a compute resource from an Anywhere fleet. Deregistered computes can no longer host game sessions through Amazon GameLift Servers. Use this operation with an Anywhere fleet that doesn't use the Amazon GameLift Servers Agent. For Anywhere fleets with the Agent, the Agent handles all compute registry tasks for you. </p> <p>To deregister a compute, call this operation from the compute that's being deregistered and specify the compute name and the fleet ID. </p>
Args:
fleet_id: <p>A unique identifier for the fleet the compute resource is currently registered to.</p>
compute_name: <p>The unique identifier of the compute resource to deregister. For an Anywhere fleet compute, use the registered compute name.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_gamelift.types.deregister_compute_input.DeregisterComputeInput]",
) -> AsyncOperationResponse[
"capo_gamelift.types.deregister_compute_output.DeregisterComputeOutput"
]:
import capo_gamelift._operations.game_lift.deregister_compute
(
output,
http_response,
) = await capo_gamelift._operations.game_lift.deregister_compute.async_deregister_compute(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeregisterCompute")
)
input_: capo_gamelift.types.deregister_compute_input.DeregisterComputeInput = {}
if fleet_id is not None:
input_["fleet_id"] = fleet_id
if compute_name is not None:
input_["compute_name"] = compute_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|