Class: Google::Apis::StoragetransferV1::NotificationConfig
- Inherits:
-
Object
- Object
- Google::Apis::StoragetransferV1::NotificationConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/storagetransfer_v1/classes.rb,
generated/google/apis/storagetransfer_v1/representations.rb,
generated/google/apis/storagetransfer_v1/representations.rb
Overview
Specification to configure notifications published to Cloud Pub/Sub.
Notifications will be published to the customer-provided topic using the
following PubsubMessage.attributes
: * "eventType"
: one of the EventType
values * "payloadFormat"
: one of the PayloadFormat values * "projectId"
:
the project_id of the TransferOperation
* "transferJobName"
: the
transfer_job_name of the TransferOperation
* "transferOperationName"
: the
name of the TransferOperation
The PubsubMessage.data
will contain a
TransferOperation resource formatted according to the specified PayloadFormat
.
Instance Attribute Summary collapse
-
#event_types ⇒ Array<String>
Event types for which a notification is desired.
-
#payload_format ⇒ String
Required.
-
#pubsub_topic ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NotificationConfig
constructor
A new instance of NotificationConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ NotificationConfig
Returns a new instance of NotificationConfig.
461 462 463 |
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 461 def initialize(**args) update!(**args) end |
Instance Attribute Details
#event_types ⇒ Array<String>
Event types for which a notification is desired. If empty, send notifications
for all event types.
Corresponds to the JSON property eventTypes
447 448 449 |
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 447 def event_types @event_types end |
#payload_format ⇒ String
Required. The desired format of the notification message payloads.
Corresponds to the JSON property payloadFormat
452 453 454 |
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 452 def payload_format @payload_format end |
#pubsub_topic ⇒ String
Required. The Topic.name
of the Cloud Pub/Sub topic to which to publish
notifications. Must be of the format: projects/
project/topics/
topic`. Not
matching this format will result in an INVALID_ARGUMENT error.
Corresponds to the JSON property
pubsubTopic`
459 460 461 |
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 459 def pubsub_topic @pubsub_topic end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
466 467 468 469 470 |
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 466 def update!(**args) @event_types = args[:event_types] if args.key?(:event_types) @payload_format = args[:payload_format] if args.key?(:payload_format) @pubsub_topic = args[:pubsub_topic] if args.key?(:pubsub_topic) end |