(::Google::Cloud::Monitoring::V3::AlertPolicy) — Required. The updated alerting policy or the updated values for the
fields listed in update_mask.
If update_mask is not empty, any fields in this policy that are
not in update_mask are ignored.
value (::Google::Cloud::Monitoring::V3::AlertPolicy) — Required. The updated alerting policy or the updated values for the
fields listed in update_mask.
If update_mask is not empty, any fields in this policy that are
not in update_mask are ignored.
Returns
(::Google::Cloud::Monitoring::V3::AlertPolicy) — Required. The updated alerting policy or the updated values for the
fields listed in update_mask.
If update_mask is not empty, any fields in this policy that are
not in update_mask are ignored.
Optional. A list of alerting policy field names. If this field is not
empty, each listed field in the existing alerting policy is set to the
value of the corresponding field in the supplied policy (alert_policy),
or to the field's default value if the field is not in the supplied
alerting policy. Fields not listed retain their previous value.
Examples of valid field masks include display_name, documentation,
documentation.content, documentation.mime_type, user_labels,
user_label.nameofkey, enabled, conditions, combiner, etc.
If this field is empty, then the supplied alerting policy replaces the
existing policy. It is the same as deleting the existing policy and
adding the supplied policy, except for the following:
The new policy will have the same [ALERT_POLICY_ID] as the former
policy. This gives you continuity with the former policy in your
notifications and incidents.
Conditions in the new policy will keep their former [CONDITION_ID] if
the supplied condition includes the name field with that
[CONDITION_ID]. If the supplied condition omits the name field,
then a new [CONDITION_ID] is created.
Optional. A list of alerting policy field names. If this field is not
empty, each listed field in the existing alerting policy is set to the
value of the corresponding field in the supplied policy (alert_policy),
or to the field's default value if the field is not in the supplied
alerting policy. Fields not listed retain their previous value.
Examples of valid field masks include display_name, documentation,
documentation.content, documentation.mime_type, user_labels,
user_label.nameofkey, enabled, conditions, combiner, etc.
If this field is empty, then the supplied alerting policy replaces the
existing policy. It is the same as deleting the existing policy and
adding the supplied policy, except for the following:
The new policy will have the same [ALERT_POLICY_ID] as the former
policy. This gives you continuity with the former policy in your
notifications and incidents.
Conditions in the new policy will keep their former [CONDITION_ID] if
the supplied condition includes the name field with that
[CONDITION_ID]. If the supplied condition omits the name field,
then a new [CONDITION_ID] is created.
Optional. A list of alerting policy field names. If this field is not
empty, each listed field in the existing alerting policy is set to the
value of the corresponding field in the supplied policy (alert_policy),
or to the field's default value if the field is not in the supplied
alerting policy. Fields not listed retain their previous value.
Examples of valid field masks include display_name, documentation,
documentation.content, documentation.mime_type, user_labels,
user_label.nameofkey, enabled, conditions, combiner, etc.
If this field is empty, then the supplied alerting policy replaces the
existing policy. It is the same as deleting the existing policy and
adding the supplied policy, except for the following:
The new policy will have the same [ALERT_POLICY_ID] as the former
policy. This gives you continuity with the former policy in your
notifications and incidents.
Conditions in the new policy will keep their former [CONDITION_ID] if
the supplied condition includes the name field with that
[CONDITION_ID]. If the supplied condition omits the name field,
then a new [CONDITION_ID] is created.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::UpdateAlertPolicyRequest (v1.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.1 (latest)](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-UpdateAlertPolicyRequest) \nReference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::UpdateAlertPolicyRequest.\n\nThe protocol for the `UpdateAlertPolicy` request. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #alert_policy\n\n def alert_policy() -\u003e ::Google::Cloud::Monitoring::V3::AlertPolicy\n\n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::AlertPolicy](./Google-Cloud-Monitoring-V3-AlertPolicy)) --- Required. The updated alerting policy or the updated values for the fields listed in `update_mask`. If `update_mask` is not empty, any fields in this policy that are not in `update_mask` are ignored.\n\n### #alert_policy=\n\n def alert_policy=(value) -\u003e ::Google::Cloud::Monitoring::V3::AlertPolicy\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Monitoring::V3::AlertPolicy](./Google-Cloud-Monitoring-V3-AlertPolicy)) --- Required. The updated alerting policy or the updated values for the fields listed in `update_mask`. If `update_mask` is not empty, any fields in this policy that are not in `update_mask` are ignored. \n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::AlertPolicy](./Google-Cloud-Monitoring-V3-AlertPolicy)) --- Required. The updated alerting policy or the updated values for the fields listed in `update_mask`. If `update_mask` is not empty, any fields in this policy that are not in `update_mask` are ignored.\n\n### #update_mask\n\n def update_mask() -\u003e ::Google::Protobuf::FieldMask\n\n**Returns**\n\n- ([::Google::Protobuf::FieldMask](./Google-Protobuf-FieldMask)) ---\n\n Optional. A list of alerting policy field names. If this field is not\n empty, each listed field in the existing alerting policy is set to the\n value of the corresponding field in the supplied policy (`alert_policy`),\n or to the field's default value if the field is not in the supplied\n alerting policy. Fields not listed retain their previous value.\n\n Examples of valid field masks include `display_name`, `documentation`,\n `documentation.content`, `documentation.mime_type`, `user_labels`,\n `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc.\n\n If this field is empty, then the supplied alerting policy replaces the\n existing policy. It is the same as deleting the existing policy and\n adding the supplied policy, except for the following:\n - The new policy will have the same `[ALERT_POLICY_ID]` as the former policy. This gives you continuity with the former policy in your notifications and incidents.\n - Conditions in the new policy will keep their former `[CONDITION_ID]` if the supplied condition includes the `name` field with that `[CONDITION_ID]`. If the supplied condition omits the `name` field, then a new `[CONDITION_ID]` is created.\n\n### #update_mask=\n\n def update_mask=(value) -\u003e ::Google::Protobuf::FieldMask\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::FieldMask](./Google-Protobuf-FieldMask)) ---\n\n Optional. A list of alerting policy field names. If this field is not\n empty, each listed field in the existing alerting policy is set to the\n value of the corresponding field in the supplied policy (`alert_policy`),\n or to the field's default value if the field is not in the supplied\n alerting policy. Fields not listed retain their previous value.\n\n Examples of valid field masks include `display_name`, `documentation`,\n `documentation.content`, `documentation.mime_type`, `user_labels`,\n `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc.\n\n If this field is empty, then the supplied alerting policy replaces the\n existing policy. It is the same as deleting the existing policy and\n adding the supplied policy, except for the following:\n - The new policy will have the same `[ALERT_POLICY_ID]` as the former policy. This gives you continuity with the former policy in your notifications and incidents.\n- Conditions in the new policy will keep their former `[CONDITION_ID]` if the supplied condition includes the `name` field with that `[CONDITION_ID]`. If the supplied condition omits the `name` field, then a new `[CONDITION_ID]` is created. \n**Returns**\n\n- ([::Google::Protobuf::FieldMask](./Google-Protobuf-FieldMask)) ---\n\n Optional. A list of alerting policy field names. If this field is not\n empty, each listed field in the existing alerting policy is set to the\n value of the corresponding field in the supplied policy (`alert_policy`),\n or to the field's default value if the field is not in the supplied\n alerting policy. Fields not listed retain their previous value.\n\n Examples of valid field masks include `display_name`, `documentation`,\n `documentation.content`, `documentation.mime_type`, `user_labels`,\n `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc.\n\n If this field is empty, then the supplied alerting policy replaces the\n existing policy. It is the same as deleting the existing policy and\n adding the supplied policy, except for the following:\n - The new policy will have the same `[ALERT_POLICY_ID]` as the former policy. This gives you continuity with the former policy in your notifications and incidents.\n - Conditions in the new policy will keep their former `[CONDITION_ID]` if the supplied condition includes the `name` field with that `[CONDITION_ID]`. If the supplied condition omits the `name` field, then a new `[CONDITION_ID]` is created."]]