Class: Google::Apis::DataplexV1::GoogleCloudDataplexV1TaskTriggerSpec

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

Overview

Task scheduling and trigger settings.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDataplexV1TaskTriggerSpec

Returns a new instance of GoogleCloudDataplexV1TaskTriggerSpec.



3011
3012
3013
# File 'lib/google/apis/dataplex_v1/classes.rb', line 3011

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

Instance Attribute Details

#disabledBoolean Also known as: disabled?

Optional. Prevent the task from executing. This does not cancel already running tasks. It is intended to temporarily disable RECURRING tasks. Corresponds to the JSON property disabled

Returns:

  • (Boolean)


2980
2981
2982
# File 'lib/google/apis/dataplex_v1/classes.rb', line 2980

def disabled
  @disabled
end

#max_retriesFixnum

Optional. Number of retry attempts before aborting. Set to zero to never attempt to retry a failed task. Corresponds to the JSON property maxRetries

Returns:

  • (Fixnum)


2987
2988
2989
# File 'lib/google/apis/dataplex_v1/classes.rb', line 2987

def max_retries
  @max_retries
end

#scheduleString

Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running tasks periodically. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: "CRON_TZ=$IANA_TIME_ZONE" or "TZ=$IANA_TIME_ZONE". The $ IANA_TIME_ZONE may only be a valid string from IANA time zone database. For example, "CRON_TZ=America/New_York 1 * * * *", or "TZ=America/New_York 1 * * * *". This field is required for RECURRING tasks. Corresponds to the JSON property schedule

Returns:

  • (String)


2997
2998
2999
# File 'lib/google/apis/dataplex_v1/classes.rb', line 2997

def schedule
  @schedule
end

#start_timeString

Optional. The first run of the task will be after this time. If not specified, the task will run shortly after being submitted if ON_DEMAND and based on the schedule if RECURRING. Corresponds to the JSON property startTime

Returns:

  • (String)


3004
3005
3006
# File 'lib/google/apis/dataplex_v1/classes.rb', line 3004

def start_time
  @start_time
end

#typeString

Required. Immutable. Trigger type of the user-specified Task. Corresponds to the JSON property type

Returns:

  • (String)


3009
3010
3011
# File 'lib/google/apis/dataplex_v1/classes.rb', line 3009

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3016
3017
3018
3019
3020
3021
3022
# File 'lib/google/apis/dataplex_v1/classes.rb', line 3016

def update!(**args)
  @disabled = args[:disabled] if args.key?(:disabled)
  @max_retries = args[:max_retries] if args.key?(:max_retries)
  @schedule = args[:schedule] if args.key?(:schedule)
  @start_time = args[:start_time] if args.key?(:start_time)
  @type = args[:type] if args.key?(:type)
end