Class: Google::Apis::ClouddeployV1::RepairRolloutRule

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

Overview

The RepairRolloutRule automation rule will automatically repair a failed Rollout.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RepairRolloutRule

Returns a new instance of RepairRolloutRule.



3855
3856
3857
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3855

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

Instance Attribute Details

#conditionGoogle::Apis::ClouddeployV1::AutomationRuleCondition

AutomationRuleCondition contains conditions relevant to an Automation rule. Corresponds to the JSON property condition



3822
3823
3824
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3822

def condition
  @condition
end

#idString

Required. ID of the rule. This id must be unique in the Automation resource to which this rule belongs. The format is a-z0,62`. Corresponds to the JSON propertyid`

Returns:

  • (String)


3828
3829
3830
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3828

def id
  @id
end

#jobsArray<String>

Optional. Jobs to repair. Proceeds only after job name matched any one in the list, or for all jobs if unspecified or empty. The phase that includes the job must match the phase ID specified in source_phase. This value must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: ^[a-z]([a-z0-9-]0,61[a-z0-9])?$. Corresponds to the JSON property jobs

Returns:

  • (Array<String>)


3838
3839
3840
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3838

def jobs
  @jobs
end

#repair_modesArray<Google::Apis::ClouddeployV1::RepairMode>

Required. Defines the types of automatic repair actions for failed jobs. Corresponds to the JSON property repairModes



3843
3844
3845
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3843

def repair_modes
  @repair_modes
end

#source_phasesArray<String>

Optional. Phases within which jobs are subject to automatic repair actions on failure. Proceeds only after phase name matched any one in the list, or for all phases if unspecified. This value must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: ^[a-z]([a-z0-9-]0,61[a-z0-9])?$. Corresponds to the JSON property sourcePhases

Returns:

  • (Array<String>)


3853
3854
3855
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3853

def source_phases
  @source_phases
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3860
3861
3862
3863
3864
3865
3866
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3860

def update!(**args)
  @condition = args[:condition] if args.key?(:condition)
  @id = args[:id] if args.key?(:id)
  @jobs = args[:jobs] if args.key?(:jobs)
  @repair_modes = args[:repair_modes] if args.key?(:repair_modes)
  @source_phases = args[:source_phases] if args.key?(:source_phases)
end