Class: Google::Cloud::Batch::V1::JobNotification

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/batch/v1/job.rb

Overview

Notification configurations.

Defined Under Namespace

Modules: Type Classes: Message

Instance Attribute Summary collapse

Instance Attribute Details

#message::Google::Cloud::Batch::V1::JobNotification::Message

Returns The attribute requirements of messages to be sent to this Pub/Sub topic. Without this field, no message will be sent.

Returns:



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'proto_docs/google/cloud/batch/v1/job.rb', line 260

class JobNotification
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Batch::V1::JobNotification::Type]
  #     The message type.
  # @!attribute [rw] new_job_state
  #   @return [::Google::Cloud::Batch::V1::JobStatus::State]
  #     The new job state.
  # @!attribute [rw] new_task_state
  #   @return [::Google::Cloud::Batch::V1::TaskStatus::State]
  #     The new task state.
  class Message
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The message type.
  module Type
    # Unspecified.
    TYPE_UNSPECIFIED = 0

    # Notify users that the job state has changed.
    JOB_STATE_CHANGED = 1

    # Notify users that the task state has changed.
    TASK_STATE_CHANGED = 2
  end
end

#pubsub_topic::String

Returns 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.

Returns:

  • (::String)

    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.



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'proto_docs/google/cloud/batch/v1/job.rb', line 260

class JobNotification
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Batch::V1::JobNotification::Type]
  #     The message type.
  # @!attribute [rw] new_job_state
  #   @return [::Google::Cloud::Batch::V1::JobStatus::State]
  #     The new job state.
  # @!attribute [rw] new_task_state
  #   @return [::Google::Cloud::Batch::V1::TaskStatus::State]
  #     The new task state.
  class Message
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The message type.
  module Type
    # Unspecified.
    TYPE_UNSPECIFIED = 0

    # Notify users that the job state has changed.
    JOB_STATE_CHANGED = 1

    # Notify users that the task state has changed.
    TASK_STATE_CHANGED = 2
  end
end