List
|
|||||
|
|
Lists the existing alerting policies for the project
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- View and manage your data across Google Cloud Platform services
- View and write monitoring data for all of your Google and third-party Cloud and API projects
- View monitoring data for all of your Google Cloud and third-party projects
Input
This building block consumes 5 input parameters
Name | Format | Description |
---|---|---|
name Required |
STRING |
The project whose alert policies are to be listed. The format is projects/[PROJECT_ID] Note that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy by name, use the GetAlertPolicy operation, instead |
orderBy |
STRING |
A comma-separated list of fields by which to sort the result. Supports the same set of field references as the filter field. Entries can be prefixed with a minus sign to sort by the field in descending order.For more details, see sorting and filtering |
pageToken |
STRING |
If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call |
pageSize |
INTEGER |
The maximum number of results to return in a single response |
filter |
STRING |
If provided, this field specifies the criteria that must be met by alert policies to be included in the response.For more details, see sorting and filtering |
= Parameter name
= Format
name STRING Required The project whose alert policies are to be listed. The format is projects/[PROJECT_ID] Note that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy by name, use the GetAlertPolicy operation, instead |
orderBy STRING A comma-separated list of fields by which to sort the result. Supports the same set of field references as the filter field. Entries can be prefixed with a minus sign to sort by the field in descending order.For more details, see sorting and filtering |
pageToken STRING If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call |
pageSize INTEGER The maximum number of results to return in a single response |
filter STRING If provided, this field specifies the criteria that must be met by alert policies to be included in the response.For more details, see sorting and filtering |
Output
This building block provides 23 output parameters
Name | Format | Description |
---|---|---|
alertPolicies[] |
OBJECT |
A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview of alert policies, see Introduction to Alerting |
alertPolicies[].name |
STRING |
Required if the policy exists. The resource name for this policy. The syntax is: projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] [ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request |
alertPolicies[].userLabels |
OBJECT |
User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter |
alertPolicies[].userLabels.customKey.value |
STRING |
User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter |
alertPolicies[].displayName |
STRING |
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 |
alertPolicies[].combiner |
ENUMERATION |
How to combine the results of multiple conditions to determine if an incident should be opened |
alertPolicies[].enabled |
BOOLEAN |
Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out |
alertPolicies[].conditions[] |
OBJECT |
A condition is a true/false test that determines when an alerting policy should open an incident. If a condition evaluates to true, it signifies that something is wrong |
alertPolicies[].conditions[].conditionThreshold |
OBJECT |
A condition type that compares a collection of time series against a threshold |
alertPolicies[].conditions[].conditionAbsent |
OBJECT |
A condition type that checks that monitored resources are reporting data. The configuration defines a metric and a set of monitored resources. The predicate is considered in violation when a time series for the specified metric of a monitored resource does not include any data in the specified duration |
alertPolicies[].conditions[].name |
STRING |
Required if the condition exists. The unique resource name for this condition. Its syntax is: projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] [CONDITION_ID] is assigned by Stackdriver Monitoring when the condition is created as part of a new or updated alerting policy.When calling the alertPolicies.create method, do not include the name field in the conditions of the requested alerting policy. Stackdriver Monitoring creates the condition identifiers and includes them in the new policy.When calling the alertPolicies.update method to update a policy, including a condition name causes the existing condition to be updated. Conditions without names are added to the updated policy. Existing conditions are deleted if they are not updated.Best practice is to preserve [CONDITION_ID] if you make only small changes, such as those to condition thresholds, durations, or trigger values. Otherwise, treat the change as a new condition and let the existing condition be deleted |
alertPolicies[].conditions[].displayName |
STRING |
A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy |
alertPolicies[].creationRecord |
OBJECT |
Describes a change made to a configuration |
alertPolicies[].creationRecord.mutateTime |
ANY |
When the change occurred |
alertPolicies[].creationRecord.mutatedBy |
STRING |
The email address of the user making the change |
alertPolicies[].documentation |
OBJECT |
A content string and a MIME type that describes the content string's format |
alertPolicies[].documentation.content |
STRING |
The text of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller |
alertPolicies[].documentation.mimeType |
STRING |
The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown (https://en.wikipedia.org/wiki/Markdown) for more information |
alertPolicies[].mutationRecord |
OBJECT |
Describes a change made to a configuration |
alertPolicies[].mutationRecord.mutateTime |
ANY |
When the change occurred |
alertPolicies[].mutationRecord.mutatedBy |
STRING |
The email address of the user making the change |
alertPolicies[].notificationChannels[] |
STRING |
|
nextPageToken |
STRING |
If there might be more results than were returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method |
= Parameter name
= Format
alertPolicies[] OBJECT A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview of alert policies, see Introduction to Alerting |
alertPolicies[].name STRING Required if the policy exists. The resource name for this policy. The syntax is: projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] [ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request |
alertPolicies[].userLabels OBJECT User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter |
alertPolicies[].userLabels.customKey.value STRING User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter |
alertPolicies[].displayName STRING 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 |
alertPolicies[].combiner ENUMERATION How to combine the results of multiple conditions to determine if an incident should be opened |
alertPolicies[].enabled BOOLEAN Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out |
alertPolicies[].conditions[] OBJECT A condition is a true/false test that determines when an alerting policy should open an incident. If a condition evaluates to true, it signifies that something is wrong |
alertPolicies[].conditions[].conditionThreshold OBJECT A condition type that compares a collection of time series against a threshold |
alertPolicies[].conditions[].conditionAbsent OBJECT A condition type that checks that monitored resources are reporting data. The configuration defines a metric and a set of monitored resources. The predicate is considered in violation when a time series for the specified metric of a monitored resource does not include any data in the specified duration |
alertPolicies[].conditions[].name STRING Required if the condition exists. The unique resource name for this condition. Its syntax is: projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] [CONDITION_ID] is assigned by Stackdriver Monitoring when the condition is created as part of a new or updated alerting policy.When calling the alertPolicies.create method, do not include the name field in the conditions of the requested alerting policy. Stackdriver Monitoring creates the condition identifiers and includes them in the new policy.When calling the alertPolicies.update method to update a policy, including a condition name causes the existing condition to be updated. Conditions without names are added to the updated policy. Existing conditions are deleted if they are not updated.Best practice is to preserve [CONDITION_ID] if you make only small changes, such as those to condition thresholds, durations, or trigger values. Otherwise, treat the change as a new condition and let the existing condition be deleted |
alertPolicies[].conditions[].displayName STRING A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy |
alertPolicies[].creationRecord OBJECT Describes a change made to a configuration |
alertPolicies[].creationRecord.mutateTime ANY When the change occurred |
alertPolicies[].creationRecord.mutatedBy STRING The email address of the user making the change |
alertPolicies[].documentation OBJECT A content string and a MIME type that describes the content string's format |
alertPolicies[].documentation.content STRING The text of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller |
alertPolicies[].documentation.mimeType STRING The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown (https://en.wikipedia.org/wiki/Markdown) for more information |
alertPolicies[].mutationRecord OBJECT Describes a change made to a configuration |
alertPolicies[].mutationRecord.mutateTime ANY When the change occurred |
alertPolicies[].mutationRecord.mutatedBy STRING The email address of the user making the change |
alertPolicies[].notificationChannels[] STRING |
nextPageToken STRING If there might be more results than were returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method |