Update an existing asset policy. Use append mode to merge new values with existing ones (e.g., add alerting configs or labels without removing current ones). Use replace mode to completely overwrite the policy configuration.
update_type query parameter controls how values are merged:| Mode | Behavior |
|---|---|
append (default) | Merges new values with existing ones. For example, adding new alerting_config_ids keeps the current ones. |
replace | Completely overwrites the policy. All required fields for the policy type must be provided. |
replace mode, alerting_config_ids is required for alert policies and labels is required for set_label/remove_label policies.Unique identifier of the asset policy
Update strategy. append (default) merges new values with existing ones. replace overwrites the entire policy — all required fields for the policy type must be provided.
append, replace Display name for the policy
Optional list of enumeration IDs to scope this policy to specific enumerations
Type of action to perform when policy matches assets
alert, delete, set_label, remove_label List of labels to apply/remove (required when policy_type is set_label or remove_label). In append mode, merged with existing labels. In replace mode, replaces all labels.
List of alerting configuration IDs (required when policy_type is alert). In append mode, merged with existing configs. In replace mode, replaces all configs.
When true, the policy action is applied to existing matching assets in addition to future assets.