Skip to content

delete_vpc_peering_authorization

delete_vpc_peering_authorization(
    *,
    config_overrides: Optional[GameLiftClientConfig] = None,
    game_lift_aws_account_id: Optional[NonZeroAndMaxString] = None,
    peer_vpc_id: Optional[NonZeroAndMaxString] = None,
) -> DeleteVpcPeeringAuthorizationOutput

This API works with the following fleet types: EC2

Cancels a pending VPC peering authorization for the specified VPC. If you need to delete an existing VPC peering connection, use DeleteVpcPeeringConnection.

Related actions

All APIs by task

Parameters:

  • game_lift_aws_account_id (Optional[NonZeroAndMaxString], default: None ) –

    A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift Servers fleet. You can find your Account ID in the Amazon Web Services Management Console under account settings.

  • peer_vpc_id (Optional[NonZeroAndMaxString], default: None ) –

    A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Servers Fleets.

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/game_lift.py
def delete_vpc_peering_authorization(
    self,
    *,
    config_overrides: Optional[GameLiftClientConfig] = None,
    game_lift_aws_account_id: Optional[
        "capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
    ] = None,
    peer_vpc_id: Optional[
        "capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
    ] = None,
) -> "capo_gamelift.types.delete_vpc_peering_authorization_output.DeleteVpcPeeringAuthorizationOutput":
    """<p> <b>This API works with the following fleet types:</b> EC2</p> <p>Cancels a pending VPC peering authorization for the specified VPC. If you need to delete an existing VPC peering connection, use <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_DeleteVpcPeeringConnection.html">DeleteVpcPeeringConnection</a>.</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:
        game_lift_aws_account_id: <p>A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift Servers fleet. You can find your Account ID in the Amazon Web Services Management Console under account settings.</p>
        peer_vpc_id: <p>A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the <a href="https://console.aws.amazon.com/vpc/">VPC Dashboard</a> in the Amazon Web Services Management Console. Learn more about VPC peering in <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html">VPC Peering with Amazon GameLift Servers Fleets</a>.</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.
    """

    def _handler(
        req: "OperationRequest[capo_gamelift.types.delete_vpc_peering_authorization_input.DeleteVpcPeeringAuthorizationInput]",
    ) -> OperationResponse[
        "capo_gamelift.types.delete_vpc_peering_authorization_output.DeleteVpcPeeringAuthorizationOutput"
    ]:
        import capo_gamelift._operations.game_lift.delete_vpc_peering_authorization

        output, http_response = (
            capo_gamelift._operations.game_lift.delete_vpc_peering_authorization.delete_vpc_peering_authorization(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteVpcPeeringAuthorization")
    )
    input_: capo_gamelift.types.delete_vpc_peering_authorization_input.DeleteVpcPeeringAuthorizationInput = {}
    if game_lift_aws_account_id is not None:
        input_["game_lift_aws_account_id"] = game_lift_aws_account_id
    if peer_vpc_id is not None:
        input_["peer_vpc_id"] = peer_vpc_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output