Class NotificationConfig (1.11.2)

NotificationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specification to configure notifications published to Pub/Sub. Notifications are published to the customer-provided topic using the following PubsubMessage.attributes:

  • "eventType": one of the EventType][google.storagetransfer.v1.NotificationConfig.EventType] values
  • "payloadFormat": one of the PayloadFormat][google.storagetransfer.v1.NotificationConfig.PayloadFormat] values
  • "projectId": the project_id][google.storagetransfer.v1.TransferOperation.project_id] of the TransferOperation
  • "transferJobName": the transfer_job_name][google.storagetransfer.v1.TransferOperation.transfer_job_name] of the TransferOperation
  • "transferOperationName": the name][google.storagetransfer.v1.TransferOperation.name] of the TransferOperation

The PubsubMessage.data contains a TransferOperation][google.storagetransfer.v1.TransferOperation] resource formatted according to the specified PayloadFormat.

Attributes

NameDescription
pubsub_topic str
Required. The Topic.name of the Pub/Sub topic to which to publish notifications. Must be of the format: projects/{project}/topics/{topic}. Not matching this format results in an INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
event_types MutableSequence[google.cloud.storage_transfer_v1.types.NotificationConfig.EventType]
Event types for which a notification is desired. If empty, send notifications for all event types.
payload_format google.cloud.storage_transfer_v1.types.NotificationConfig.PayloadFormat
Required. The desired format of the notification message payloads.

Classes

EventType

EventType(value)

Enum for specifying event types for which notifications are to be published.

Additional event types may be added in the future. Clients should either safely ignore unrecognized event types or explicitly specify which event types they are prepared to accept.

Values: EVENT_TYPE_UNSPECIFIED (0): Illegal value, to avoid allowing a default. TRANSFER_OPERATION_SUCCESS (1): TransferOperation completed with status SUCCESS][google.storagetransfer.v1.TransferOperation.Status.SUCCESS]. TRANSFER_OPERATION_FAILED (2): TransferOperation completed with status FAILED][google.storagetransfer.v1.TransferOperation.Status.FAILED]. TRANSFER_OPERATION_ABORTED (3): TransferOperation completed with status ABORTED][google.storagetransfer.v1.TransferOperation.Status.ABORTED].

PayloadFormat

PayloadFormat(value)

Enum for specifying the format of a notification message's payload.

Values: PAYLOAD_FORMAT_UNSPECIFIED (0): Illegal value, to avoid allowing a default. NONE (1): No payload is included with the notification. JSON (2): TransferOperation is formatted as a JSON response <https://developers.google.com/protocol-buffers/docs/proto3#json>__, in application/json.