Skip to content

modify_vpc_endpoint_connection_notification

modify_vpc_endpoint_connection_notification(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    connection_notification_id: Optional[ConnectionNotificationId] = None,
    connection_notification_arn: Optional[String] = None,
    connection_events: Optional[ValueStringList] = None,
) -> ModifyVpcEndpointConnectionNotificationResult

Modifies a connection notification for VPC endpoint or VPC endpoint service. You can change the SNS topic for the notification, or the events for which to be notified.

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.

  • connection_notification_id (Optional[ConnectionNotificationId], default: None ) –

    The ID of the notification.

  • connection_notification_arn (Optional[String], default: None ) –

    The ARN for the SNS topic for the notification.

  • connection_events (Optional[ValueStringList], default: None ) –

    The events for the endpoint. Valid values are Accept, Connect, Delete, and Reject.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def modify_vpc_endpoint_connection_notification(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    connection_notification_id: Optional[
        "capo_ec2.types.connection_notification_id.ConnectionNotificationId"
    ] = None,
    connection_notification_arn: Optional["capo_ec2.types.string.String"] = None,
    connection_events: Optional[
        "capo_ec2.types.value_string_list.ValueStringList"
    ] = None,
) -> "capo_ec2.types.modify_vpc_endpoint_connection_notification_result.ModifyVpcEndpointConnectionNotificationResult":
    """<p>Modifies a connection notification for VPC endpoint or VPC endpoint service. You can change the SNS topic for the notification, or the events for which to be notified. </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>
        connection_notification_id: <p>The ID of the notification.</p>
        connection_notification_arn: <p>The ARN for the SNS topic for the notification.</p>
        connection_events: <p>The events for the endpoint. Valid values are <code>Accept</code>, <code>Connect</code>, <code>Delete</code>, and <code>Reject</code>.</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_connection_notification_request.ModifyVpcEndpointConnectionNotificationRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.modify_vpc_endpoint_connection_notification_result.ModifyVpcEndpointConnectionNotificationResult"
    ]:
        import capo_ec2._operations.amazon_ec2.modify_vpc_endpoint_connection_notification

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ModifyVpcEndpointConnectionNotification"),
    )
    input_: capo_ec2.types.modify_vpc_endpoint_connection_notification_request.ModifyVpcEndpointConnectionNotificationRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if connection_notification_id is not None:
        input_["connection_notification_id"] = connection_notification_id
    if connection_notification_arn is not None:
        input_["connection_notification_arn"] = connection_notification_arn
    if connection_events is not None:
        input_["connection_events"] = connection_events

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