Class: Google::Apis::ClouddeployV1::AlertPolicyCheck

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

AlertPolicyCheck configures a set of Cloud Monitoring alerting policies that will be periodically polled for alerts. If any of the listed policies have an active alert, the analysis check will fail.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AlertPolicyCheck

Returns a new instance of AlertPolicyCheck.



235
236
237
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 235

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

Instance Attribute Details

#alert_policiesArray<String>

Required. The Cloud Monitoring Alert Policies to check for active alerts. Format is projects/project/alertPolicies/alert_policy`. Corresponds to the JSON propertyalertPolicies`

Returns:

  • (Array<String>)


221
222
223
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 221

def alert_policies
  @alert_policies
end

#idString

Required. The ID of the analysis check. Corresponds to the JSON property id

Returns:

  • (String)


226
227
228
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 226

def id
  @id
end

#labelsHash<String,String>

Optional. A set of labels to filter active alerts. If set, only alerts having all of the specified labels will be considered. Otherwise, all active alerts will be considered. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


233
234
235
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 233

def labels
  @labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



240
241
242
243
244
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 240

def update!(**args)
  @alert_policies = args[:alert_policies] if args.key?(:alert_policies)
  @id = args[:id] if args.key?(:id)
  @labels = args[:labels] if args.key?(:labels)
end