Debian Codegraph @

docs/dyn/monitoring_v3.projects.alerts.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="monitoring_v3.html">Cloud Monitoring API</a> . <a href="monitoring_v3.projects.html">projects</a> . <a href="monitoring_v3.projects.alerts.html">alerts</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
82 <p class="firstline">Gets a single alert.</p>
83 <p class="toc_element">
84 <code><a href="#list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Lists the existing alerts for the metrics scope of the project.</p>
86 <p class="toc_element">
87 <code><a href="#list_next">list_next()</a></code></p>
88 <p class="firstline">Retrieves the next page of results.</p>
89 <h3>Method Details</h3>
90 <div class="method">
91 <code class="details" id="close">close()</code>
92 <pre>Close httplib2 connections.</pre>
93 </div>
94
95 <div class="method">
96 <code class="details" id="get">get(name, x__xgafv=None)</code>
97 <pre>Gets a single alert.
98
99 Args:
100 name: string, Required. The name of the alert.The format is: projects/[PROJECT_ID_OR_NUMBER]/alerts/[ALERT_ID] The [ALERT_ID] is a system-assigned unique identifier for the alert. (required)
101 x__xgafv: string, V1 error format.
102 Allowed values
103 1 - v1 error format
104 2 - v2 error format
105
106 Returns:
107 An object of the form:
108
109 { # An alert is the representation of a violation of an alert policy. It is a read-only resource that cannot be modified by the accompanied API.
110 &quot;closeTime&quot;: &quot;A String&quot;, # The time when the alert was closed.
111 &quot;log&quot;: { # Information about the log for log-based alerts. # The log information associated with the alert. This field is only populated for log-based alerts.
112 &quot;extractedLabels&quot;: { # The labels extracted from the log.
113 &quot;a_key&quot;: &quot;A String&quot;,
114 },
115 },
116 &quot;metadata&quot;: { # Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message. # The metadata of the monitored resource.
117 &quot;systemLabels&quot;: { # Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including &quot;machine_image&quot;, &quot;vpc&quot;, &quot;subnet_id&quot;, &quot;security_group&quot;, &quot;name&quot;, etc. System label values can be only strings, Boolean values, or a list of strings. For example: { &quot;name&quot;: &quot;my-test-instance&quot;, &quot;security_group&quot;: [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;], &quot;spot_instance&quot;: false }
118 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
119 },
120 &quot;userLabels&quot;: { # Output only. A map of user-defined metadata labels.
121 &quot;a_key&quot;: &quot;A String&quot;,
122 },
123 },
124 &quot;metric&quot;: { # A specific metric, identified by specifying values for all of the labels of a MetricDescriptor. # The metric type and any metric labels preserved from the incident&#x27;s generating condition.
125 &quot;labels&quot;: { # The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.
126 &quot;a_key&quot;: &quot;A String&quot;,
127 },
128 &quot;type&quot;: &quot;A String&quot;, # An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount.
129 },
130 &quot;name&quot;: &quot;A String&quot;, # Identifier. The name of the alert.The format is: projects/[PROJECT_ID_OR_NUMBER]/alerts/[ALERT_ID] The [ALERT_ID] is a system-assigned unique identifier for the alert.
131 &quot;openTime&quot;: &quot;A String&quot;, # The time when the alert was opened.
132 &quot;policy&quot;: { # The state of the policy at the time the alert was generated. # The snapshot of the alert policy that generated this alert.
133 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the alert policy.
134 &quot;name&quot;: &quot;A String&quot;, # The name of the alert policy resource. In the form of &quot;projects/PROJECT_ID_OR_NUMBER/alertPolicies/ALERT_POLICY_ID&quot;.
135 &quot;severity&quot;: &quot;A String&quot;, # The severity of the alert policy.
136 &quot;userLabels&quot;: { # The user labels for the alert policy.
137 &quot;a_key&quot;: &quot;A String&quot;,
138 },
139 },
140 &quot;resource&quot;: { # An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource&#x27;s schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for &quot;gce_instance&quot; has labels &quot;project_id&quot;, &quot;instance_id&quot; and &quot;zone&quot;: { &quot;type&quot;: &quot;gce_instance&quot;, &quot;labels&quot;: { &quot;project_id&quot;: &quot;my-project&quot;, &quot;instance_id&quot;: &quot;12345678901234&quot;, &quot;zone&quot;: &quot;us-central1-a&quot; }} # The monitored resource type and any monitored resource labels preserved from the incident&#x27;s generating condition.
141 &quot;labels&quot;: { # Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels &quot;project_id&quot;, &quot;instance_id&quot;, and &quot;zone&quot;.
142 &quot;a_key&quot;: &quot;A String&quot;,
143 },
144 &quot;type&quot;: &quot;A String&quot;, # Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).
145 },
146 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the alert.
147 }</pre>
148 </div>
149
150 <div class="method">
151 <code class="details" id="list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
152 <pre>Lists the existing alerts for the metrics scope of the project.
153
154 Args:
155 parent: string, Required. The name of the project to list alerts for. (required)
156 filter: string, Optional. An alert is returned if there is a match on any fields belonging to the alert or its subfields.
157 orderBy: string, Optional. A comma-separated list of fields in Alert to use for sorting. The default sort direction is ascending. To specify descending order for a field, add a desc modifier. The following fields are supported: open_time close_timeFor example, close_time desc, open_time will return the alerts closed most recently, with ties broken in the order of older alerts listed first.If the field is not set, the results are sorted by open_time desc.
158 pageSize: integer, Optional. The maximum number of results to return in a single response. If not set to a positive number, at most 50 alerts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
159 pageToken: string, Optional. If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.
160 x__xgafv: string, V1 error format.
161 Allowed values
162 1 - v1 error format
163 2 - v2 error format
164
165 Returns:
166 An object of the form:
167
168 { # The ListAlerts response.
169 &quot;alerts&quot;: [ # The list of alerts.
170 { # An alert is the representation of a violation of an alert policy. It is a read-only resource that cannot be modified by the accompanied API.
171 &quot;closeTime&quot;: &quot;A String&quot;, # The time when the alert was closed.
172 &quot;log&quot;: { # Information about the log for log-based alerts. # The log information associated with the alert. This field is only populated for log-based alerts.
173 &quot;extractedLabels&quot;: { # The labels extracted from the log.
174 &quot;a_key&quot;: &quot;A String&quot;,
175 },
176 },
177 &quot;metadata&quot;: { # Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message. # The metadata of the monitored resource.
178 &quot;systemLabels&quot;: { # Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including &quot;machine_image&quot;, &quot;vpc&quot;, &quot;subnet_id&quot;, &quot;security_group&quot;, &quot;name&quot;, etc. System label values can be only strings, Boolean values, or a list of strings. For example: { &quot;name&quot;: &quot;my-test-instance&quot;, &quot;security_group&quot;: [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;], &quot;spot_instance&quot;: false }
179 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
180 },
181 &quot;userLabels&quot;: { # Output only. A map of user-defined metadata labels.
182 &quot;a_key&quot;: &quot;A String&quot;,
183 },
184 },
185 &quot;metric&quot;: { # A specific metric, identified by specifying values for all of the labels of a MetricDescriptor. # The metric type and any metric labels preserved from the incident&#x27;s generating condition.
186 &quot;labels&quot;: { # The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.
187 &quot;a_key&quot;: &quot;A String&quot;,
188 },
189 &quot;type&quot;: &quot;A String&quot;, # An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount.
190 },
191 &quot;name&quot;: &quot;A String&quot;, # Identifier. The name of the alert.The format is: projects/[PROJECT_ID_OR_NUMBER]/alerts/[ALERT_ID] The [ALERT_ID] is a system-assigned unique identifier for the alert.
192 &quot;openTime&quot;: &quot;A String&quot;, # The time when the alert was opened.
193 &quot;policy&quot;: { # The state of the policy at the time the alert was generated. # The snapshot of the alert policy that generated this alert.
194 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the alert policy.
195 &quot;name&quot;: &quot;A String&quot;, # The name of the alert policy resource. In the form of &quot;projects/PROJECT_ID_OR_NUMBER/alertPolicies/ALERT_POLICY_ID&quot;.
196 &quot;severity&quot;: &quot;A String&quot;, # The severity of the alert policy.
197 &quot;userLabels&quot;: { # The user labels for the alert policy.
198 &quot;a_key&quot;: &quot;A String&quot;,
199 },
200 },
201 &quot;resource&quot;: { # An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource&#x27;s schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for &quot;gce_instance&quot; has labels &quot;project_id&quot;, &quot;instance_id&quot; and &quot;zone&quot;: { &quot;type&quot;: &quot;gce_instance&quot;, &quot;labels&quot;: { &quot;project_id&quot;: &quot;my-project&quot;, &quot;instance_id&quot;: &quot;12345678901234&quot;, &quot;zone&quot;: &quot;us-central1-a&quot; }} # The monitored resource type and any monitored resource labels preserved from the incident&#x27;s generating condition.
202 &quot;labels&quot;: { # Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels &quot;project_id&quot;, &quot;instance_id&quot;, and &quot;zone&quot;.
203 &quot;a_key&quot;: &quot;A String&quot;,
204 },
205 &quot;type&quot;: &quot;A String&quot;, # Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).
206 },
207 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the alert.
208 },
209 ],
210 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more results that match the request. Use the value in the page_token field in a subsequent request to fetch the next set of results. The token is encrypted and only guaranteed to return correct results for 72 hours after it is created. If empty, all results have been returned.
211 &quot;totalSize&quot;: 42, # The estimated total number of matching results for this query.
212 }</pre>
213 </div>
214
215 <div class="method">
216 <code class="details" id="list_next">list_next()</code>
217 <pre>Retrieves the next page of results.
218
219 Args:
220 previous_request: The request for the previous page. (required)
221 previous_response: The response from the request for the previous page. (required)
222
223 Returns:
224 A request object that you can call &#x27;execute()&#x27; on to request the next
225 page. Returns None if there are no more items in the collection.
226 </pre>
227 </div>
228
229 </body></html>