Skip to content

modify_vpc_endpoint_service_payer_responsibility async

modify_vpc_endpoint_service_payer_responsibility(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    service_id: Optional[VpcEndpointServiceId] = None,
    payer_responsibility: Optional[PayerResponsibility] = None,
) -> ModifyVpcEndpointServicePayerResponsibilityResult

Modifies the payer responsibility for your VPC endpoint service.

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 service.

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

    The entity that is responsible for the endpoint costs. The default is the endpoint owner. If you set the payer responsibility to the service owner, you cannot set it back to the endpoint owner.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def modify_vpc_endpoint_service_payer_responsibility(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    service_id: Optional[
        "capo_ec2.types.vpc_endpoint_service_id.VpcEndpointServiceId"
    ] = None,
    payer_responsibility: Optional[
        "capo_ec2.types.payer_responsibility.PayerResponsibility"
    ] = None,
) -> "capo_ec2.types.modify_vpc_endpoint_service_payer_responsibility_result.ModifyVpcEndpointServicePayerResponsibilityResult":
    """<p>Modifies the payer responsibility for your VPC endpoint service.</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 service.</p>
        payer_responsibility: <p>The entity that is responsible for the endpoint costs. The default is the endpoint owner. If you set the payer responsibility to the service owner, you cannot set it back to the endpoint owner.</p>

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

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.modify_vpc_endpoint_service_payer_responsibility_request.ModifyVpcEndpointServicePayerResponsibilityRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.modify_vpc_endpoint_service_payer_responsibility_result.ModifyVpcEndpointServicePayerResponsibilityResult"
    ]:
        import capo_ec2._operations.amazon_ec2.modify_vpc_endpoint_service_payer_responsibility

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.modify_vpc_endpoint_service_payer_responsibility.async_modify_vpc_endpoint_service_payer_responsibility(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ModifyVpcEndpointServicePayerResponsibility"),
    )
    input_: capo_ec2.types.modify_vpc_endpoint_service_payer_responsibility_request.ModifyVpcEndpointServicePayerResponsibilityRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if service_id is not None:
        input_["service_id"] = service_id
    if payer_responsibility is not None:
        input_["payer_responsibility"] = payer_responsibility

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output