Class: Google::Apis::MonitoringV3::PolicySnapshot
- Inherits:
-
Object
- Object
- Google::Apis::MonitoringV3::PolicySnapshot
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/monitoring_v3/classes.rb,
lib/google/apis/monitoring_v3/representations.rb,
lib/google/apis/monitoring_v3/representations.rb
Overview
The state of the policy at the time the alert was generated.
Instance Attribute Summary collapse
-
#display_name ⇒ String
The display name of the alert policy.
-
#name ⇒ String
The name of the alert policy resource.
-
#severity ⇒ String
The severity of the alert policy.
-
#user_labels ⇒ Hash<String,String>
The user labels for the alert policy.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PolicySnapshot
constructor
A new instance of PolicySnapshot.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PolicySnapshot
Returns a new instance of PolicySnapshot.
4125 4126 4127 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4125 def initialize(**args) update!(**args) end |
Instance Attribute Details
#display_name ⇒ String
The display name of the alert policy.
Corresponds to the JSON property displayName
4107 4108 4109 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4107 def display_name @display_name end |
#name ⇒ String
The name of the alert policy resource. In the form of "projects/
PROJECT_ID_OR_NUMBER/alertPolicies/ALERT_POLICY_ID".
Corresponds to the JSON property name
4113 4114 4115 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4113 def name @name end |
#severity ⇒ String
The severity of the alert policy.
Corresponds to the JSON property severity
4118 4119 4120 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4118 def severity @severity end |
#user_labels ⇒ Hash<String,String>
The user labels for the alert policy.
Corresponds to the JSON property userLabels
4123 4124 4125 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4123 def user_labels @user_labels end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4130 4131 4132 4133 4134 4135 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4130 def update!(**args) @display_name = args[:display_name] if args.key?(:display_name) @name = args[:name] if args.key?(:name) @severity = args[:severity] if args.key?(:severity) @user_labels = args[:user_labels] if args.key?(:user_labels) end |