Skip to content

modify_vpc_endpoint_payer_responsibility

modify_vpc_endpoint_payer_responsibility(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    service_id: Optional[VpcEndpointServiceId] = None,
    vpc_endpoint_id: Optional[VpcEndpointId] = None,
    payer_responsibility: Optional[PayerResponsibilityType] = None,
    scope: Optional[PayerResponsibilityScope] = None,
) -> ModifyVpcEndpointPayerResponsibilityResult

Modifies the billing account for VPC endpoint usage/charges.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • service_id (Optional[VpcEndpointServiceId], default: None ) –

    The ID of the VPC endpoint service.

  • vpc_endpoint_id (Optional[VpcEndpointId], default: None ) –

    The ID of the VPC endpoint.

  • payer_responsibility (Optional[PayerResponsibilityType], default: None ) –

    The Amazon Web Services account to which the usage of VPC endpoint is charged.

  • scope (Optional[PayerResponsibilityScope], default: None ) –

    The scope of usage/charges for which the billing account is being modified.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def modify_vpc_endpoint_payer_responsibility(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    service_id: Optional[
        "capo_ec2.types.vpc_endpoint_service_id.VpcEndpointServiceId"
    ] = None,
    vpc_endpoint_id: Optional[
        "capo_ec2.types.vpc_endpoint_id.VpcEndpointId"
    ] = None,
    payer_responsibility: Optional[
        "capo_ec2.types.payer_responsibility_type.PayerResponsibilityType"
    ] = None,
    scope: Optional[
        "capo_ec2.types.payer_responsibility_scope.PayerResponsibilityScope"
    ] = None,
) -> "capo_ec2.types.modify_vpc_endpoint_payer_responsibility_result.ModifyVpcEndpointPayerResponsibilityResult":
    """<p>Modifies the billing account for VPC endpoint usage/charges.</p>

    Args:
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        service_id: <p>The ID of the VPC endpoint service.</p>
        vpc_endpoint_id: <p>The ID of the VPC endpoint.</p>
        payer_responsibility: <p>The Amazon Web Services account to which the usage of VPC endpoint is charged.</p>
        scope: <p>The scope of usage/charges for which the billing account is being modified.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.modify_vpc_endpoint_payer_responsibility_request.ModifyVpcEndpointPayerResponsibilityRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.modify_vpc_endpoint_payer_responsibility_result.ModifyVpcEndpointPayerResponsibilityResult"
    ]:
        import capo_ec2._operations.amazon_ec2.modify_vpc_endpoint_payer_responsibility

        output, http_response = (
            capo_ec2._operations.amazon_ec2.modify_vpc_endpoint_payer_responsibility.modify_vpc_endpoint_payer_responsibility(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyVpcEndpointPayerResponsibility")
    )
    input_: capo_ec2.types.modify_vpc_endpoint_payer_responsibility_request.ModifyVpcEndpointPayerResponsibilityRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if service_id is not None:
        input_["service_id"] = service_id
    if vpc_endpoint_id is not None:
        input_["vpc_endpoint_id"] = vpc_endpoint_id
    if payer_responsibility is not None:
        input_["payer_responsibility"] = payer_responsibility
    if scope is not None:
        input_["scope"] = scope

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