Class: Google::Apis::BatchV1::JobNotification

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb

Overview

Notification configurations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ JobNotification

Returns a new instance of JobNotification.



1352
1353
1354
# File 'lib/google/apis/batch_v1/classes.rb', line 1352

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#messageGoogle::Apis::BatchV1::Message

Message details. Describe the conditions under which messages will be sent. If no attribute is defined, no message will be sent by default. One message should specify either the job or the task level attributes, but not both. For example, job level: JOB_STATE_CHANGED and/or a specified new_job_state; task level: TASK_STATE_CHANGED and/or a specified new_task_state. Corresponds to the JSON property message



1338
1339
1340
# File 'lib/google/apis/batch_v1/classes.rb', line 1338

def message
  @message
end

#pubsub_topicString

The Pub/Sub topic where notifications for the job, like state changes, will be published. If undefined, no Pub/Sub notifications are sent for this job. Specify the topic using the following format: projects/project/topics/ topic`. Notably, if you want to specify a Pub/Sub topic that is in a different project than the job, your administrator must grant your project's Batch service agent permission to publish to that topic. For more information about configuring Pub/Sub notifications for a job, see https://cloud.google. com/batch/docs/enable-notifications. Corresponds to the JSON propertypubsubTopic`

Returns:

  • (String)


1350
1351
1352
# File 'lib/google/apis/batch_v1/classes.rb', line 1350

def pubsub_topic
  @pubsub_topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1357
1358
1359
1360
# File 'lib/google/apis/batch_v1/classes.rb', line 1357

def update!(**args)
  @message = args[:message] if args.key?(:message)
  @pubsub_topic = args[:pubsub_topic] if args.key?(:pubsub_topic)
end