From 4bded6212fa68025dd270c360c359d564ee6201a Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 5 Jan 2021 09:53:44 -0800 Subject: [PATCH] update documentation field on resource monitoring_alert_policy (#4364) (#8114) * update documentation field on resource monitoring_alert_policy * update documentation field on resource monitoring_alert_policy Co-authored-by: Joe Marty Signed-off-by: Modular Magician Co-authored-by: Joe Marty --- .changelog/4364.txt | 3 ++ google/resource_monitoring_alert_policy.go | 9 ++--- .../resource_monitoring_metric_descriptor.go | 34 +++++++++---------- .../r/monitoring_alert_policy.html.markdown | 9 ++--- ...monitoring_metric_descriptor.html.markdown | 28 +++++++-------- 5 files changed, 44 insertions(+), 39 deletions(-) create mode 100644 .changelog/4364.txt diff --git a/.changelog/4364.txt b/.changelog/4364.txt new file mode 100644 index 00000000000..8ec013c0699 --- /dev/null +++ b/.changelog/4364.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google/resource_monitoring_alert_policy.go b/google/resource_monitoring_alert_policy.go index 63684f72eff..9f4ecae76ef 100644 --- a/google/resource_monitoring_alert_policy.go +++ b/google/resource_monitoring_alert_policy.go @@ -682,10 +682,11 @@ name is limited to 512 Unicode characters.`, "documentation": { Type: schema.TypeList, Optional: true, - Description: `A short name or phrase used to identify the policy in dashboards, -notifications, and incidents. To avoid confusion, don't use the same -display name for multiple policies in the same project. The name is -limited to 512 Unicode characters.`, + Description: `Documentation that is included with notifications and incidents related +to this policy. Best practice is for the documentation to include information +to help responders understand, mitigate, escalate, and correct the underlying +problems detected by the alerting policy. Notification channels that have +limited capacity might not show this documentation.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ diff --git a/google/resource_monitoring_metric_descriptor.go b/google/resource_monitoring_metric_descriptor.go index 5ced095e33e..f78d33d6881 100644 --- a/google/resource_monitoring_metric_descriptor.go +++ b/google/resource_monitoring_metric_descriptor.go @@ -116,24 +116,24 @@ func resourceMonitoringMetricDescriptor() *schema.Resource { Optional: true, ForceNew: true, Description: `The units in which the metric value is reported. It is only applicable if the -valueType is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of -the stored metric values. - -Different systems may scale the values to be more easily displayed (so a value of -0.02KBy might be displayed as 20By, and a value of 3523KBy might be displayed as -3.5MBy). However, if the unit is KBy, then the value of the metric is always in -thousands of bytes, no matter how it may be displayed. - -If you want a custom metric to record the exact number of CPU-seconds used by a job, -you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently -1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as -12005. - -Alternatively, if you want a custom metric to record data in a more granular way, you -can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value -12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024). +valueType is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of +the stored metric values. + +Different systems may scale the values to be more easily displayed (so a value of +0.02KBy might be displayed as 20By, and a value of 3523KBy might be displayed as +3.5MBy). However, if the unit is KBy, then the value of the metric is always in +thousands of bytes, no matter how it may be displayed. + +If you want a custom metric to record the exact number of CPU-seconds used by a job, +you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently +1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as +12005. + +Alternatively, if you want a custom metric to record data in a more granular way, you +can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value +12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024). The supported units are a subset of The Unified Code for Units of Measure standard. -More info can be found in the API documentation +More info can be found in the API documentation (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors).`, }, "monitored_resource_types": { diff --git a/website/docs/r/monitoring_alert_policy.html.markdown b/website/docs/r/monitoring_alert_policy.html.markdown index 9807b0103e0..24828605772 100644 --- a/website/docs/r/monitoring_alert_policy.html.markdown +++ b/website/docs/r/monitoring_alert_policy.html.markdown @@ -666,10 +666,11 @@ The `aggregations` block supports: * `documentation` - (Optional) - A short name or phrase used to identify the policy in dashboards, - notifications, and incidents. To avoid confusion, don't use the same - display name for multiple policies in the same project. The name is - limited to 512 Unicode characters. + Documentation that is included with notifications and incidents related + to this policy. Best practice is for the documentation to include information + to help responders understand, mitigate, escalate, and correct the underlying + problems detected by the alerting policy. Notification channels that have + limited capacity might not show this documentation. Structure is documented below. * `project` - (Optional) The ID of the project in which the resource belongs. diff --git a/website/docs/r/monitoring_metric_descriptor.html.markdown b/website/docs/r/monitoring_metric_descriptor.html.markdown index 2f0ba284a5c..e0869d1d5de 100644 --- a/website/docs/r/monitoring_metric_descriptor.html.markdown +++ b/website/docs/r/monitoring_metric_descriptor.html.markdown @@ -130,21 +130,21 @@ The following arguments are supported: * `unit` - (Optional) The units in which the metric value is reported. It is only applicable if the - valueType is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of - the stored metric values. - Different systems may scale the values to be more easily displayed (so a value of - 0.02KBy might be displayed as 20By, and a value of 3523KBy might be displayed as - 3.5MBy). However, if the unit is KBy, then the value of the metric is always in - thousands of bytes, no matter how it may be displayed. - If you want a custom metric to record the exact number of CPU-seconds used by a job, - you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently - 1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as - 12005. - Alternatively, if you want a custom metric to record data in a more granular way, you - can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value - 12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024). + valueType is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of + the stored metric values. + Different systems may scale the values to be more easily displayed (so a value of + 0.02KBy might be displayed as 20By, and a value of 3523KBy might be displayed as + 3.5MBy). However, if the unit is KBy, then the value of the metric is always in + thousands of bytes, no matter how it may be displayed. + If you want a custom metric to record the exact number of CPU-seconds used by a job, + you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently + 1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as + 12005. + Alternatively, if you want a custom metric to record data in a more granular way, you + can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value + 12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024). The supported units are a subset of The Unified Code for Units of Measure standard. - More info can be found in the API documentation + More info can be found in the API documentation (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors). * `metadata` -