Reference documentation and code samples for the Storage Transfer Service V1 API class Google::Cloud::StorageTransfer::V1::NotificationConfig.
Specification to configure notifications published to Pub/Sub.
Notifications are published to the customer-provided topic using the
following PubsubMessage.attributes:
(::String) — 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 error.
#pubsub_topic=
defpubsub_topic=(value)->::String
Parameter
value (::String) — 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 error.
Returns
(::String) — 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 error.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[],[],null,["# Storage Transfer Service V1 API - Class Google::Cloud::StorageTransfer::V1::NotificationConfig (v1.6.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.0 (latest)](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [1.5.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.5.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [1.4.1](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.4.1/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [1.3.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.3.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [1.2.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.2.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [1.1.1](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.1.1/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [1.0.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.0.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.10.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.10.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.9.2](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.9.2/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.8.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.8.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.7.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.7.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.6.1](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.6.1/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.5.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.5.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.4.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.4.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.3.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.3.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.2.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.2.0/Google-Cloud-StorageTransfer-V1-NotificationConfig)\n- [0.1.2](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.1.2/Google-Cloud-StorageTransfer-V1-NotificationConfig) \nReference documentation and code samples for the Storage Transfer Service V1 API class Google::Cloud::StorageTransfer::V1::NotificationConfig.\n\nSpecification to configure notifications published to Pub/Sub.\nNotifications are published to the customer-provided topic using the\nfollowing `PubsubMessage.attributes`:\n\n\n- `\"eventType\"`: one of the [EventType](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-EventType \"Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType (module)\") values\n- `\"payloadFormat\"`: one of the [PayloadFormat](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-PayloadFormat \"Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat (module)\") values\n- `\"projectId\"`: the [project_id](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferOperation#Google__Cloud__StorageTransfer__V1__TransferOperation_project_id_instance_ \"Google::Cloud::StorageTransfer::V1::TransferOperation#project_id (method)\") of the `TransferOperation`\n- `\"transferJobName\"`: the [transfer_job_name](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferOperation#Google__Cloud__StorageTransfer__V1__TransferOperation_transfer_job_name_instance_ \"Google::Cloud::StorageTransfer::V1::TransferOperation#transfer_job_name (method)\") of the `TransferOperation`\n- `\"transferOperationName\"`: the [name](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferOperation#Google__Cloud__StorageTransfer__V1__TransferOperation_name_instance_ \"Google::Cloud::StorageTransfer::V1::TransferOperation#name (method)\") of the `TransferOperation`\n\n\u003cbr /\u003e\n\nThe `PubsubMessage.data` contains a\n[TransferOperation](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferOperation \"Google::Cloud::StorageTransfer::V1::TransferOperation (class)\") resource\nformatted according to the specified `PayloadFormat`. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #event_types\n\n def event_types() -\u003e ::Array\u003c::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType](./Google-Cloud-StorageTransfer-V1-NotificationConfig-EventType)\\\u003e) --- Event types for which a notification is desired. If empty, send notifications for all event types.\n\n### #event_types=\n\n def event_types=(value) -\u003e ::Array\u003c::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType](./Google-Cloud-StorageTransfer-V1-NotificationConfig-EventType)\\\u003e) --- Event types for which a notification is desired. If empty, send notifications for all event types. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType](./Google-Cloud-StorageTransfer-V1-NotificationConfig-EventType)\\\u003e) --- Event types for which a notification is desired. If empty, send notifications for all event types.\n\n### #payload_format\n\n def payload_format() -\u003e ::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat\n\n**Returns**\n\n- ([::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat](./Google-Cloud-StorageTransfer-V1-NotificationConfig-PayloadFormat)) --- Required. The desired format of the notification message payloads.\n\n### #payload_format=\n\n def payload_format=(value) -\u003e ::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat\n\n**Parameter**\n\n- **value** ([::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat](./Google-Cloud-StorageTransfer-V1-NotificationConfig-PayloadFormat)) --- Required. The desired format of the notification message payloads. \n**Returns**\n\n- ([::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat](./Google-Cloud-StorageTransfer-V1-NotificationConfig-PayloadFormat)) --- Required. The desired format of the notification message payloads.\n\n### #pubsub_topic\n\n def pubsub_topic() -\u003e ::String\n\n**Returns**\n\n- (::String) --- 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](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__INVALID_ARGUMENT \"Google::Rpc::Code::INVALID_ARGUMENT (constant)\") error.\n\n### #pubsub_topic=\n\n def pubsub_topic=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- 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](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__INVALID_ARGUMENT \"Google::Rpc::Code::INVALID_ARGUMENT (constant)\") error. \n**Returns**\n\n- (::String) --- 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](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__INVALID_ARGUMENT \"Google::Rpc::Code::INVALID_ARGUMENT (constant)\") error."]]