This API works with the following fleet types: EC2
Removes a VPC peering connection. To delete the connection, you must have a valid authorization for the VPC peering connection that you want to delete.
Once a valid authorization exists, call this operation from the Amazon Web Services account that is used to manage the Amazon GameLift Servers fleets. Identify the connection to delete by the connection ID and fleet ID. If successful, the connection is removed.
Related actions
All APIs by task
Parameters:
-
fleet_id
(Optional[FleetId], default:
None
)
–
A unique identifier for the fleet. This fleet specified must match the fleet referenced in the VPC peering connection record. You can use either the fleet ID or ARN value.
-
vpc_peering_connection_id
(Optional[NonZeroAndMaxString], default:
None
)
–
A unique identifier for a VPC peering connection.
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.
-
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 delete_vpc_peering_connection(
self,
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = None,
fleet_id: Optional["capo_gamelift.types.fleet_id.FleetId"] = None,
vpc_peering_connection_id: Optional[
"capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
] = None,
) -> "capo_gamelift.types.delete_vpc_peering_connection_output.DeleteVpcPeeringConnectionOutput":
"""<p> <b>This API works with the following fleet types:</b> EC2</p> <p>Removes a VPC peering connection. To delete the connection, you must have a valid authorization for the VPC peering connection that you want to delete. </p> <p>Once a valid authorization exists, call this operation from the Amazon Web Services account that is used to manage the Amazon GameLift Servers fleets. Identify the connection to delete by the connection ID and fleet ID. If successful, the connection is removed. </p> <p> <b>Related actions</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets">All APIs by task</a> </p>
Args:
fleet_id: <p>A unique identifier for the fleet. This fleet specified must match the fleet referenced in the VPC peering connection record. You can use either the fleet ID or ARN value.</p>
vpc_peering_connection_id: <p>A unique identifier for a VPC peering connection.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_gamelift.types.delete_vpc_peering_connection_input.DeleteVpcPeeringConnectionInput]",
) -> AsyncOperationResponse[
"capo_gamelift.types.delete_vpc_peering_connection_output.DeleteVpcPeeringConnectionOutput"
]:
import capo_gamelift._operations.game_lift.delete_vpc_peering_connection
(
output,
http_response,
) = await capo_gamelift._operations.game_lift.delete_vpc_peering_connection.async_delete_vpc_peering_connection(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteVpcPeeringConnection")
)
input_: capo_gamelift.types.delete_vpc_peering_connection_input.DeleteVpcPeeringConnectionInput = {}
if fleet_id is not None:
input_["fleet_id"] = fleet_id
if vpc_peering_connection_id is not None:
input_["vpc_peering_connection_id"] = vpc_peering_connection_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|