Class: Google::Apis::ClouddeployV1::AlertPolicyCheck
- Inherits:
-
Object
- Object
- Google::Apis::ClouddeployV1::AlertPolicyCheck
- 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
-
#alert_policies ⇒ Array<String>
Required.
-
#id ⇒ String
Required.
-
#labels ⇒ Hash<String,String>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AlertPolicyCheck
constructor
A new instance of AlertPolicyCheck.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_policies ⇒ Array<String>
Required. The Cloud Monitoring Alert Policies to check for active alerts.
Format is projects/project/alertPolicies/alert_policy`.
Corresponds to the JSON propertyalertPolicies`
221 222 223 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 221 def alert_policies @alert_policies end |
#id ⇒ String
Required. The ID of the analysis check.
Corresponds to the JSON property id
226 227 228 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 226 def id @id end |
#labels ⇒ Hash<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
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 |