Skip to content

delete_vpc_endpoint_service_configurations

delete_vpc_endpoint_service_configurations(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    service_ids: Optional[VpcEndpointServiceIdList] = None,
) -> DeleteVpcEndpointServiceConfigurationsResult

Deletes the specified VPC endpoint service configurations. Before you can delete an endpoint service configuration, you must reject any Available or PendingAcceptance interface endpoint connections that are attached to the 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_ids (Optional[VpcEndpointServiceIdList], default: None ) –

    The IDs of the services.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def delete_vpc_endpoint_service_configurations(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    service_ids: Optional[
        "capo_ec2.types.vpc_endpoint_service_id_list.VpcEndpointServiceIdList"
    ] = None,
) -> "capo_ec2.types.delete_vpc_endpoint_service_configurations_result.DeleteVpcEndpointServiceConfigurationsResult":
    """<p>Deletes the specified VPC endpoint service configurations. Before you can delete an endpoint service configuration, you must reject any <code>Available</code> or <code>PendingAcceptance</code> interface endpoint connections that are attached to the 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_ids: <p>The IDs of the services.</p>

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

    def _handler(
        req: "OperationRequest[capo_ec2.types.delete_vpc_endpoint_service_configurations_request.DeleteVpcEndpointServiceConfigurationsRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.delete_vpc_endpoint_service_configurations_result.DeleteVpcEndpointServiceConfigurationsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.delete_vpc_endpoint_service_configurations

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteVpcEndpointServiceConfigurations")
    )
    input_: capo_ec2.types.delete_vpc_endpoint_service_configurations_request.DeleteVpcEndpointServiceConfigurationsRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if service_ids is not None:
        input_["service_ids"] = service_ids

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